Disclosure (Show/Hide)
Keyboard Expectations
- Enter or Space = Toggle content
Focus Expectations
- Trigger has visible keyboard
:focus
state
Labelling Expectations
- Trigger has role of button (e.g.
<button>
) - When content is visible,
button
has aria-expanded set totrue
. When content is hidden, it is set tofalse
. - (Optional)
button
references content with aria-controls