jakearchibald / svgomg

Web GUI for SVGO
https://jakearchibald.github.io/svgomg/
MIT License
5.8k stars 482 forks source link

Remove title from inline SVGs #359

Closed XhmikosR closed 3 years ago

XhmikosR commented 3 years ago

The parent element already has the title set. Also, add aria-hidden="true" in the SVGs.

This should still be OK, but please confirm.

/CC @patrickhlauke if you have a little time to confirm :)

netlify[bot] commented 3 years ago

✔️ Deploy Preview for svgomg ready!

🔨 Explore the source changes: 6be135ecefd74f82c005a9f464f080debaf4cf66

🔍 Inspect the deploy log: https://app.netlify.com/sites/svgomg/deploys/6183c9ec11ce1c00083eaeb4

😎 Browse the preview: https://deploy-preview-359--svgomg.netlify.app

patrickhlauke commented 3 years ago

confirming that those <title> elements in the SVGs are redundant, and can lead to excessively verbose announcements in some cases - for instance, in Chrome/NVDA, the floating action buttons are announced as:

Preview on vivid background graphic button Preview on vivid background
Copy as text graphic button Copy as text
Download graphic link Download

This PR looks good to me. Checking the preview, those FABs are now announced as:

Preview on vivid background button  
Copy as text button  
Download link  
XhmikosR commented 3 years ago

Perfect, thanks! I plan to tackle more a11y issues but I'm going step by step because it's an old codebase :)

patrickhlauke commented 3 years ago

that's sometimes the best way. small incremental steps still make a much more immediate and positive change than holding off for one giant rewrite of stuff that takes ages.