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

accessibility: buttons should use aria-pressed #48

Closed
derekeder opened this issue May 21, 2024 · 2 comments
Closed

accessibility: buttons should use aria-pressed #48

derekeder opened this issue May 21, 2024 · 2 comments
Assignees

Comments

@derekeder
Copy link
Member

From #45 (comment)

@derekeder
Copy link
Member Author

from @vkoves:

We want aria-pressed="true" to be added to the button whenever the active class is applied.

This needs to be done in javascript, so a convenient way to do it would be to create a toggleActive() function that both sets the class for an element and then adds the aria-pressed value too.

We would do this everywhere the active class was being added / removed.
https://github.com/chihacknight/il-solar-map/blob/main/js/map.js#L295

@derekeder
Copy link
Member Author

closed via #62

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

No branches or pull requests

2 participants