Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

expandable panel has broken aria #38

Open
bkardell opened this issue Aug 10, 2015 · 1 comment
Open

expandable panel has broken aria #38

bkardell opened this issue Aug 10, 2015 · 1 comment

Comments

@bkardell
Copy link
Owner

Currently, at least in the directive version, aria-expanded isn't set until the user interacts with it once. Further, it is swapping aria-expanded and aria-hidden which won't give the right advice when a panel begins life closed (or is closed).

@LJWatson
Copy link
Collaborator

When a panel is expanded (and can be collapsed), aria-expanded="true" should be set on the paneltitle. This should be done from the outset. When the panel is collapsed, the attribute should be toggled to false. This will ensure that when (keyboard) focus moves to the paneltitle, screen readers correctly announce the state of the panel.

Whereas aria-expanded indicates the state of the panel, aria-hidden changes its state (in the accessibility layer). When aria-hidden="true" the content in question is removed from the browser's accessibility tree. It would therefore be used on the container for the panel content (the bit that collapses).
::
So when aria-expanded="true" is set on the paneltitle, set aria-hidden="false" on the panel content. These would then be reversed when the panel was collapsed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants