WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Safari Voice Over: Empty Groups

for

From: glen walker
Date: Aug 19, 2021 8:33AM


I don't have a Mac to try this on but was curious what VO on iOS did. It
just says "1 blah" through "6 blah" (and skips 5 since it's aria-hidden).
It doesn't mention groups.

I know the codepen is sort of contrived, trying to mimic what you're really
doing so am not sure what your original intent is. In general, divs and
spans are non-semantic to begin with so specifying role="none" or
role="presentation" seems superfluous. It shouldn't make a difference but
it sounds like VO on the Mac behaves differently with the role.

Also, regarding aria-label on divs, check out "2.10 Practical Support:
aria-label, aria-labelledby and aria-describedby" at
https://www.w3.org/TR/using-aria/#label-support. In particular, the third
last bullet point addressing divs and spans.

ARIA attributes should be your last resort to get things accessible.
Hopefully semantic html gets you the behavior you need, and if not, then a
little tweaking of ARIA can help. As pointed out often on this list,
follow the first rule of ARIA use, https://www.w3.org/TR/aria-in-html/#rule1,
which is *not* to use ARIA.