larsenwork / web.svg.min

Vector icons, badges, flags etc. über optimised for web use.
384 stars 31 forks source link

Add title elements for accessibility #11

Open simison opened 6 years ago

simison commented 6 years ago

SVG spec has <title> tag to help accessibility with screen readers. Oftentimes web developers ignore accessibility, but adding this directly to these svg files would make sure this will always be accessible for blind people:

<a href="#">
  <svg><title>Download on the app store</title> ...</svg>
</a>

Where as otherwise developers would need to do this:

<a href="#" aria-label="Download on the app store">
  <svg> ...</svg>
</a>

Anyone who pays attention to accessibility will make screen readers ignore whole svg or title tag if they want to provide an alternative text (e.g. when doing <a href="#"><svg></svg> Facebook</a>).

Small addition but would make a huge improvement for lots of folks out there. :-)

ahmadalfy commented 5 years ago

I would second that request. I still rely on this project daily so if the maintainer would give me access to contribute I would be happy to address this issue

larsenwork commented 5 years ago

Sounds great @ahmadalfy — would you mind just doing a PR? I could also add you as maintainer if you'd prefer that.

ahmadalfy commented 5 years ago

Will do, no problem I will create the PR 🙂