-
Notifications
You must be signed in to change notification settings - Fork 265
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
Nu Html Checker - Warning: Possible misuse of aria-label #1687
Comments
aria-label is not allowed on generic elements, per your examples the spans. looks like you're using font icons. you could just put an aria-label on the hyperlink itself. something simple like "email" and "call". you don't really need to tell people they're icons. nor do you need to tell people to "click" (these are hyperlinks after all - people know how to use them). if the phone number isn't part of the visible text, then you don't need to include that either (why only let screen reader users know what number they're calling and not everyone?) |
I was checking webpage using Nu Html Checker - https://validator.w3.org/nu/ and got these warnings.
Not sure why this would trigger a warning since the aria-label describes the link on these two examples. Thanks.
Warning: Possible misuse of aria-label. (If you disagree with this warning, file an issue report or send e-mail to [email protected].)
HTML
<a href="mailto:[email protected]"><span class="bi bi-envelope" aria-label="Envelope icon - click to email"></span></a>
Warning: Possible misuse of aria-label. (If you disagree with this warning, file an issue report or send e-mail to [email protected].)
HTML
<a href="tel:+1-713-555-1212"><span class="bi bi-phone" aria-label="Phone icon - click to call 1-713-555-1212"></span></a>
The text was updated successfully, but these errors were encountered: