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

fix: select accessibility #27

Merged
merged 1 commit into from
Jun 24, 2019
Merged

fix: select accessibility #27

merged 1 commit into from
Jun 24, 2019

Conversation

jsomsanith
Copy link
Collaborator

What is the problem this PR is trying to solve?
Select component is not accessible

  1. label is not required
  2. errors are not associated to the select
  3. selects with errors are not set as invalid
  4. icon is decorative but not hidden to SR
  5. progress status is only visual

What is the chosen solution to this problem?

  1. label is required, and associated to the select via for attribute. We introduce the hideLabel props. Be careful to give a clear context when you hide the label in the designs
  2. errors are in a div next to the label, associated with select via aria-describedby
  3. use aria-invalid on select when there is an error
  4. set aria-hidden to the icon
  5. progress has a Loading label, that is associated with the select as a descriptionn, so screen reader will read it on focus. The select has an aria-busy attribute too

Copy link
Collaborator

@kylesuss kylesuss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're killing it right now @jsomsanith 💯

@kylesuss kylesuss merged commit 3b56f36 into master Jun 24, 2019
@kylesuss kylesuss deleted the jsomsanith/fix/select_a11y branch June 24, 2019 20:43
@kylesuss
Copy link
Collaborator

🚀 PR was released in v0.0.27 🚀

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

Successfully merging this pull request may close these issues.

2 participants