Should aria-hidden influence other accessibility errors and warnings?

For technical support and bug reports for all editions of CSS HTML Validator, including htmlval for Linux and Mac.
Post Reply
dthomason@pcci.edu
Rank 0 - Newcomer
Posts: 2
Joined: Wed May 08, 2024 10:24 am

Should aria-hidden influence other accessibility errors and warnings?

Post by dthomason@pcci.edu »

Given the following markup:

Code: Select all

<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" viewBox="0 0 100 100" focusable="false" role="img" aria-hidden="true">...</svg>
The following accessibility error is reported:
Because of this <svg> element's "img" role, naming this element with the "aria-label" or "aria-labelledby" attribute to provide an accessible name is required. Visit https://www.w3.org/TR/wai-aria-practice ... e_guidance for more information. [MSGID:NONE]
While I can ask our design team to add an aria-label to this element, it struck me as odd to do so when the element is marked as hidden. I thought I would raise the question here to see if it would make sense for CSS HTML Validator to suppress this error or maybe display a warning rather than an error in cases like this.
User avatar
Albert Wiersch
Site Admin
Posts: 3800
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: Should aria-hidden influence other accessibility errors and warnings?

Post by Albert Wiersch »

Hello,

If aria-hidden="true" then I can downgrade this message to a warning and assign it a message ID (so you can completely disable the message by message ID if you want). Does this sound good?

Thanks,
Albert
Albert Wiersch, CSS HTML Validator Developer • Download CSS HTML Validator FREE Trial
dthomason@pcci.edu
Rank 0 - Newcomer
Posts: 2
Joined: Wed May 08, 2024 10:24 am

Re: Should aria-hidden influence other accessibility errors and warnings?

Post by dthomason@pcci.edu »

Albert,

I think that would make sense. A warning seems appropriate in this case; having a message ID would give us even more flexibility.

Thanks for the quick response!
User avatar
Albert Wiersch
Site Admin
Posts: 3800
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: Should aria-hidden influence other accessibility errors and warnings?

Post by Albert Wiersch »

Great. I've made this change. It should be in the next update (v24.0210+).

There's no scheduled release date for the next update but if you'd like the update right away then let me know and I'll see what I can do!
Albert Wiersch, CSS HTML Validator Developer • Download CSS HTML Validator FREE Trial
Post Reply