2 ms·
> it probably has some default behavior in screen readers to explain that it's collapsable. Yes, and it reads leaves as collapsed, the user expands them and th
by galoisgirl 6y ago
> it probably has some default behavior in screen readers to explain that it's collapsable.
Yes, and it reads leaves as collapsed, the user expands them and there's nothing there. That's confusing.
> The alternative of using some show/hide element with an onClick handler probably doesn't work as well for screen readers without a bunch of aria tags.
Yeah, `aria-expanded` (you need an expanded CSS class anyway) and maybe `aria-owns`. Titanic work.
The cool thing about accessibility is that you have to think a lot less. You just open https://www.w3.org/TR/wai-aria-practices-1.1 https://www.w3.org/TR/wai-aria-practices-1.1 , find the widget or scenario you need and do as they say. Win-win.
- lucasmullens 6y agoWhat do you mean by "the user expands them and there's nothing there"?