You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 www-validator@w3.org.)
HTML <a href="mailto:info@example.com"><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 www-validator@w3.org.)
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:
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 www-validator@w3.org.)
HTML
<a href="mailto:info@example.com"><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 www-validator@w3.org.)
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: