Improve accordion card summary a11y
Categories
(Toolkit :: UI Widgets, enhancement, P3)
Tracking
()
People
(Reporter: tgiles, Unassigned)
References
Details
(Whiteboard: [recomp])
The bug summary should be updated once we decide on an approach. The clickable div approach is the first I thought of, but there may be other valid solutions too.
As part of Bug 1846846, I disabled two rules in our Storybook specifically for the accordion card of moz-card.stories.mjs
. I would like to re-enable those rules by changing the accordion heading button to a clickable div.
Normally changing a button with its built-in semantics to a clickable div is a bad idea. In this case, all the button does is toggle the <details>
element of the accordion card type. Currently it's not even focusable since it has tabindex="-1"
but I think it's still part of the accessibility tree. The button is just another click target for mouse users, since the <details>
element can be focused and opened/closed with keyboard and mouse so there's no degraded user experience as far as I can tell.
Updated•9 months ago
|
Comment 1•7 months ago
|
||
We should work with #accessibility-frontend-reviewers on this.
Updated•3 months ago
|
Description
•