{"id":17024437,"date":"2023-09-04T13:32:43","date_gmt":"2023-09-04T13:32:43","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/wcag-accessibility-issue\/"},"modified":"2023-09-04T13:36:08","modified_gmt":"2023-09-04T13:36:08","slug":"wcag-accessibility-issue","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/wcag-accessibility-issue\/","title":{"rendered":"WCAG Accessibility Issue"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">In Gutenberg, I have added your Service Section and added 6 service blocks. All is fine, except in the website&#8217;s first-time load, the WebAIM WAVE tool shows a warning for all the Service Links.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><strong>Empty link<\/strong>\nA link contains no text.<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>What It Means<\/strong><br \/>A link contains no text.<br \/><br \/><strong>Why It Matters<\/strong><br \/>If a link contains no text, the function or purpose of the link will not be presented to the user. This can introduce confusion for keyboard and screen reader users.<br \/><br \/><strong>How to Fix It<\/strong><br \/>Remove the empty link or provide text within the link that describes the functionality and\/or target of that link.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><strong>&lt;!-- Inaccessible Inline SVG Empty Link generate from your Code --&gt;<\/strong>\n&lt;div class=\"link\"&gt;\n&lt;a href=\"https:\/\/domain.com\/\"&gt;\n&lt;svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 493.356 493.356\"&gt;\n&lt;path d=\"M490.498,239.278l-109.632-99.929c-3.046-2.474-6.376-2.95-9.993-1.427c-3.613,1.525-5.427,4.283-5.427,8.282v63.954H9.136 c-2.666,0-4.856,0.855-6.567,2.568C0.859,214.438,0,216.628,0,219.292v54.816c0,2.663,0.855,4.853,2.568,6.563 c1.715,1.712,3.905,2.567,6.567,2.567h356.313v63.953c0,3.812,1.817,6.57,5.428,8.278c3.62,1.529,6.95,0.951,9.996-1.708 l109.632-101.077c1.903-1.902,2.852-4.182,2.852-6.849C493.356,243.367,492.401,241.181,490.498,239.278z\"&gt;&lt;\/path&gt;\n&lt;\/svg&gt;\n&lt;\/a&gt;\n&lt;\/div&gt;<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code><strong>&lt;!-- Accessible Fixed Inline SVG Link --&gt;<\/strong>\n&lt;div class=\"link\"&gt;\n&lt;title id=\"sstitletext\"&gt;Service Title&lt;\/title&gt;\n&lt;a href=\"https:\/\/domain.com\/\"&gt;\n&lt;svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 493.356 493.356\" role=\"img\" aria-labelledby=\"sstitletext\"&gt;\n&lt;path d=\"M490.498,239.278l-109.632-99.929c-3.046-2.474-6.376-2.95-9.993-1.427c-3.613,1.525-5.427,4.283-5.427,8.282v63.954H9.136 c-2.666,0-4.856,0.855-6.567,2.568C0.859,214.438,0,216.628,0,219.292v54.816c0,2.663,0.855,4.853,2.568,6.563 c1.715,1.712,3.905,2.567,6.567,2.567h356.313v63.953c0,3.812,1.817,6.57,5.428,8.278c3.62,1.529,6.95,0.951,9.996-1.708 l109.632-101.077c1.903-1.902,2.852-4.182,2.852-6.849C493.356,243.367,492.401,241.181,490.498,239.278z\"&gt;&lt;\/path&gt;\n&lt;\/svg&gt;\n&lt;\/a&gt;\n&lt;\/div&gt;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">I have added <strong>role =&#8221;img&#8221; <\/strong>and <strong>aria-labelledby=&#8221;sstitletext&#8221;<\/strong> to the &lt;svg&gt; tag where the attributes match the ids of the defined title. When a screen reader encounters the SVG, it would read out the Service Section Title: &#8220;Service Title.&#8221;  This basically works like an IMG Tag ALT attribute.<br \/><br \/>Please replace the Title value with the Service Title.  Kindly update your plugin with Fixed code and release a new version, so that I can update the plugin in my end to fix accessibility issues at the earliest.<\/p>\n","protected":false},"template":"","class_list":["post-17024437","topic","type-topic","status-publish","hentry","topic-tag-web-accessibility"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/17024437","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":1,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/17024437\/revisions"}],"predecessor-version":[{"id":17024447,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/17024437\/revisions\/17024447"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=17024437"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}