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

Use ARIA roles to designate behaviour #34

Open
naasking opened this issue Dec 18, 2016 · 2 comments
Open

Use ARIA roles to designate behaviour #34

naasking opened this issue Dec 18, 2016 · 2 comments

Comments

@naasking
Copy link

Like most CSS frameworks, you use classes to designate various controls which your JS enhances with dynamic behaviour. That works fine, but isn't great for accessibility.

I suggest an alternate, more semantic approach using ARIA roles to designate behaviour with the CSS and JS selecting on the role attribute, ie. [role~="tab"] to designate the clickable tabs, [role~="tabpanel"] for the panel with the content, use the aria-expanded attribute to track the state, etc.

Then you leave class attributes only for purely visual styling, like font, color, grids, whitespace, etc. The idea is basically something like this:

http://heydonworks.com/practical_aria_examples/

The roles attribute is supported all the way back to IE 8, which preserves your range of supported browsers. So this approach doesn't lose any behaviour or introduce extensibility problems, but you get proper accessibility for all of your core components for free.

@radogado
Copy link
Owner

Hi @naasking yes absolutely. It's been on my to-do list, because natUIve is all about accessibility and works on IE8, functional without JS, readable without CSS etc. Thanks!

@radogado
Copy link
Owner

Some aria attributes used for the new drop down nav.

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