-
Notifications
You must be signed in to change notification settings - Fork 12.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Auto-accessibility #16274
Comments
Hi! Thanks for being part of the Font Awesome Community and thanks for reporting this. WAVE = https://wave.webaim.org/ ? I will ask for some community feedback on another issue related to SVG and titles to see if there is any other tool that requires both |
Yes, WAVE is a Chrome plug-in that implements the rules of https://wave.webaim.org |
Does the title cause issues? |
It's not an accessibility failure but a warning. The tool flags the redundancy of the title attribute when aria-labelledby and a title element are also present. I believe this is only true where the two are identical. The only issue comes when accessibility reports are full of warnings and we have to explain that's just how it is or programmatically remove the redundant title. |
Ok, if it was causing an actual issue I'd be more willing to work on it. As it sits this would be a breaking change to Font Awesome behavior. We will most likely not change this. |
@robmadole So you don’t find it causing an actual issue? 🤷♂️ It might only cause a warn in WAVE, but in addition leads to UI issues in certain browsers like double tooltips, which is rather annoying when giving the endusers a bad experience. I’ve had to remove it programmatically for now, but seems a bit odd and seems tedious. |
@nj can you provide a reproducible example of the double tooltip? |
Our guidance would be that having both a title attribute and By W3C's "Accessible Name and Description Computation" algorithm, the One of our employees, Bryan Garaventa, was one of the creators of that algorithm and he provides a simple tool for testing HTML snippets using the algorithm. https://whatsock.github.io/w3c-alternative-text-computation/Editable%20Live%20Input%20AccName%20Test.html Just paste your snippet into the textarea and click "Paste & Test" to see the calculated accessible name. Using the below snippets, I get the same result. With redundant tags
Without redundant tags
|
Thanks @gtibrett ! Let me noodle on this. What I'm worried about is a breaking change. |
👍🏼Happy to help with a11y testing |
Got a bit more info from our Chief Accessibility Officer.
|
Hello everyone 👋, The simplest solution in that case would be last option. So the code for an icon should be something like: <svg class="fa-magic" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" role="img" aria-label="Magic icon label">
<path fill="currentColor" d="M101.1 505L7 410.9c-9.4-9.4-9.4-24.6 0-33.9L377 7c9.4-9.4 24.6-9.4 33.9 0l94.1 94.1c9.4 9.4 9.4 24.6 0 33.9L135 505c-9.3 9.3-24.5 9.3-33.9 0zM304 159.2l48.8 48.8 89.9-89.9-48.8-48.8-89.9 89.9zM138.9 39.3l-11.7 23.8-26.2 3.8c-4.7.7-6.6 6.5-3.2 9.8l19 18.5-4.5 26.1c-.8 4.7 4.1 8.3 8.3 6.1L144 115l23.4 12.3c4.2 2.2 9.1-1.4 8.3-6.1l-4.5-26.1 19-18.5c3.4-3.3 1.5-9.1-3.2-9.8L160.8 63l-11.7-23.8c-2-4.1-8.1-4.1-10.2.1zm97.7-20.7l-7.8 15.8-17.5 2.6c-3.1.5-4.4 4.3-2.1 6.5l12.6 12.3-3 17.4c-.5 3.1 2.8 5.5 5.6 4L240 69l15.6 8.2c2.8 1.5 6.1-.9 5.6-4l-3-17.4 12.6-12.3c2.3-2.2 1-6.1-2.1-6.5l-17.5-2.5-7.8-15.8c-1.4-3-5.4-3-6.8-.1zm-192 0l-7.8 15.8L19.3 37c-3.1.5-4.4 4.3-2.1 6.5l12.6 12.3-3 17.4c-.5 3.1 2.8 5.5 5.6 4L48 69l15.6 8.2c2.8 1.5 6.1-.9 5.6-4l-3-17.4 12.6-12.3c2.3-2.2 1-6.1-2.1-6.5l-17.5-2.5-7.8-15.8c-1.4-3-5.4-3-6.8-.1zm416 223.5l-7.8 15.8-17.5 2.5c-3.1.5-4.4 4.3-2.1 6.5l12.6 12.3-3 17.4c-.5 3.1 2.8 5.5 5.6 4l15.6-8.2 15.6 8.2c2.8 1.5 6.1-.9 5.6-4l-3-17.4 12.6-12.3c2.3-2.2 1-6.1-2.1-6.5l-17.5-2.5-7.8-15.8c-1.4-2.8-5.4-2.8-6.8 0z"/>
</svg> If we want to use SVG as a decorative element all we need to do is add |
Hey all, thank you again for taking the time to help us with this. What we are going to do for version 6 is to remove the |
Confirmed, released in 6.0.0-beta2. |
Auto-accessibility (SVG with JavaScript) generates code that is flagged as a warning by WAVE. Note, this is not a failure but still something that may need to be addressed.
The title attribute that is used to trigger auto accessibility is regarded as redundant once the title element and aria-labelledby attributes are injected.
Perhaps the original title could be removed at this point.
The text was updated successfully, but these errors were encountered: