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

Add Aria roles for accesibility #21

Closed
cibernox opened this issue Oct 8, 2015 · 5 comments
Closed

Add Aria roles for accesibility #21

cibernox opened this issue Oct 8, 2015 · 5 comments

Comments

@cibernox
Copy link
Owner

cibernox commented Oct 8, 2015

Accesibility matters. This is a must.

@ghost
Copy link

ghost commented Jan 23, 2016

Things you need to consider for accessibility (hint, it's not only aria roles)

  • Being able to tab into the component. And respecting the tabindex property.
  • Clicking on a label that has the for property set to the id property of the component, should activate the component. (The for, id combo also links the label to the component for the screenreader)
  • Support aria-labeledby, aria-describedby and required.
  • Needs to respect being disabled when a <fieldset> is set to disabled.

@jmacqueen
Copy link
Contributor

Apologies if I am weighing in with things you already know...

This is a favorite reference for me when doing a11y-friendly work. I cannot recommend it highly enough. It nicely digests the relevant portions of the WCAG suggestions for accessibility AND it's broken down by component type with links to some vanilla JS implementations

https://www.w3.org/TR/wai-aria-practices-1.1/#combobox

The examples aren't a perfect matchup for what you have here, but the Dojo combobox with autocomplete does a really good job and isn't far off. role="combobox" is on the containing <div> and the use of aria-owns and aria-expanded are things I don't see referenced in this issue.

The other advantage of attributes like aria-disabled and aria-selected (as referenced in the Listbox section) is that you can select on them directly in your CSS instead of creating special classes for those states.

@cibernox
Copy link
Owner Author

cibernox commented Feb 2, 2016

@jmacqueen Thanks for the reference. @martndemus did already some work on it, but this is helpful.

@knownasilya
Copy link
Contributor

Would love required support..

@ghost
Copy link

ghost commented Feb 2, 2016

@knownasilya @jmacqueen I have to get back to the WIP pull request, I hope to get back to it this weekend. See #254

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

3 participants