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

Refactor aria JS to not be repetitive #137

Open
ashleykolodziej opened this issue Mar 30, 2018 · 1 comment
Open

Refactor aria JS to not be repetitive #137

ashleykolodziej opened this issue Mar 30, 2018 · 1 comment

Comments

@ashleykolodziej
Copy link
Contributor

The JS around aria-labels is a little repetitive - it probably could be rethought to more easily set aria-labels correctly, as well as provide a framework for setting common aria labels on different types of functionality, like toggle, sliding panel, etc. Needs some thought though.

@ashleykolodziej
Copy link
Contributor Author

In particular these two blocks are really similar:

https://github.com/bu-ist/responsive-foundation/blob/develop/js-dev/toggle.js#L18-L24
https://github.com/bu-ist/responsive-foundation/blob/develop/js-dev/toggle.js#L40-L47

It would be cool to think about how to allow child theme devs to access this type of JS so when we write custom JS for toggles or UI like on http://www.bu.edu/com/pathfinder/, we don't have to rewrite this function every time and a dev can just say "this should do the aria thing" as a long term goal. Short term, maybe there is a way to write a function that generalizes this a little more.

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