WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Custom tabs with a single tab panel: does it pose accessibility issues?

for

From: glen walker
Date: Aug 1, 2023 5:15PM


The tablist, tab, and tabpanel roles don't say you can't do that, but
whether it's a good idea will take a bit of testing on various platforms
(mac, pc, mobile), with various browsers (edge, safari, firefox, chrome),
and various screen readers (nvda, jaws, voiceover, talkback, narrator).

From a software engineering perspective, I can understand the theory behind
doing that. In general, reusing an object is more efficient (memory-wise)
than having a bunch of objects where the unused ones are hidden. The hidden
ones still take up memory.

However, changing aria-controls might have unexpected results.
Aria-controls is a property (https://www.w3.org/TR/wai-aria/#dfn-property)
and not a state (https://www.w3.org/TR/wai-aria/#dfn-state) so is not
expected to change, but there's nothing in the spec that says it can't
change. See also https://www.w3.org/TR/wai-aria/#statevsprop

Fortunately (for your case), aria-controls doesn't do a whole lot. I think
JAWS might announce a special key sequence to get to the controlled object
but there's no shortcut key to get back to the controller. I think other
screen readers ignore it so setting and changing aria-controls might not do
anything.

This article is 7 years old but still might be appropriate -
https://heydonworks.com/article/aria-controls-is-poop/