markup-validator icon indicating copy to clipboard operation
markup-validator copied to clipboard

False-negative for role="graphics-symbol img"

Open frederike-ramin opened this issue 10 months ago • 0 comments

When we check our website with the HTML checker, we get the following error:

Error: Bad value graphics-symbol img for attribute role on element svg.

From line 1, column 3081; to line 1, column 3290

-01-bold"><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24" data-testid="Home…on" role="graphics-symbol img" focusable="false" aria-hidden="true" class="!h-[1.6rem] !w-[1.6rem]"><path 

Even though the documentation on the graphics-symbol role clearly states:

To support user agents and assistive technologies based on the ARIA 1.0 specification, authors may wish to include the img role as a fallback value, in the form role="graphics-symbol img", if that is not already the default semantic role for the element.

Which one is correct? The documentation or the validator?

frederike-ramin avatar Apr 23 '24 09:04 frederike-ramin