SimpleSharingButtons icon indicating copy to clipboard operation
SimpleSharingButtons copied to clipboard

SVG icons need alternative text

Open aardrian opened this issue 8 years ago • 1 comments

This is not related to the missing alt attribute. I raise that in issue #8 and should still be added to the <img> in the SVG version.

This relates to the SVG files themselves missing alternative text. For example, if you look at the source of the Twitter SVG, it has no alternative text.

Suggest modifying each of the SVG files to have a <title> and <desc> element. So the SVG would open like this:

<svg height="512" viewBox="0 0 512 512" width="512" xmlns="http://www.w3.org/2000/svg" aria-labelledby="title" aria-describedby="desc">
    <title id="title">Twitter</title>
    <desc id="desc">The Twitter share icon.</desc>
    <rect …/><path …/>
</svg>

You can find more context and tips in the article Tips for Creating Accessible SVG, though some may not apply as your code references SVG via the <img> element.

aardrian avatar Jun 02 '16 19:06 aardrian

@aardrian Hmm, I didn't actually create the SVGs, so I wonder if I should contact the original author(s) and use their modified files.

I am going to keep this issue open for now while I think about this a bit more.

stefanbohacek avatar Aug 21 '16 04:08 stefanbohacek