I’m still confused on how this works. And I’ve read a whole lot on this.
If your icon is purely decorative, include a aria-hidden=‘true’ attribute.
aria-hidden should only be used when you really want to hide the svg element completely from screen readers. If you use SVG to embed an image that is not just decorative, you need to make sure there is a text alternative.
What would be, or constitute as opposite of purely decorative?
Would a play/pause image svg be decorative or would it not be?
You click on it and it goes from play to pause, is that decorative, or is that not decorative.
Would aria-hidden="true" be placed on SVG’s that use a title for instance?
Adding aria-hidden=“true” to an icon tells the assistive technology to skip over this information, as it will not improve the user experience and has the potential to worsen it.
aria-hidden=“true” should only apply to a decorative icon
(But as was concluded in your other thread, a title is still needed on decorative images)
You would not want to hide an interactive button using aria-hidden=“true”
I would like to get a 2nd opinion on this, because on images you can leave alt=" " blank inside. Can you do the same thing with title, leave it empty inside?
I think you might be mixing up two different ‘titles’ - one is the <title></title> tag in the head of the html page, and the other one is an html attribute title= .
My take, not tested, is that <title> within <svg> is so when an external SVG file is requested directly the title will show in the browsers tab bar similar to an HTML files title. But I could very well be wrong and there’s more to it than that.
Please don’t change your post after someone has responded to it. It just creates confusion, because then the response doesn’t always make sense. You were asking about titles in the context of images.
I’m trying to find some documentation that says: “You must put a <title> element on all SVG’s no matter whether or not they are decorative, or interactive.” Something along those lines.
Not always the easiest to understand, but I think the W3C documentation is the “authority” when it comes to specifications. Not that all user agents will implement things the same, or even at all, but the working group goes to effort to put together how they think things should be.
Authors should always provide a ‘title’ child element to the outermost svg element within a stand-alone SVG document. The ‘title’ child element to an ‘svg’ element serves the purposes of identifying the content of the given SVG document fragment.
Providing an alternative equivalent for inaccessible content is one of the primary ways authors can make their documents accessible to people with disabilities. The alternative content fulfills essentially the same function or purpose for users with disabilities as the primary content does for users without any disability. Text equivalents are always required for graphic information (refer to [WCAG10], Checkpoint 1.1, and Guideline 1 in general). I