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

ADA accessibility label fixes #642

Merged
merged 5 commits into from
Oct 10, 2019
Merged

Conversation

bradwade
Copy link
Contributor

@bradwade bradwade commented Sep 23, 2019

Description

Choices creates an input field with a role="textbox" in order to filter the available options. This input field has no associated label.

This PR passes the placeholder value to the input and sets it as an "aria-label".

This PR also updates an accessibility issue on the demo page where a label had the wrong id in the "for" attribute.

Motivation and Context

This change is required for ADA compliance.

How Has This Been Tested?

The Wave chrome extension can be run against the demo page. Before this PR, you will see the red error label next to the input type with role="textbox".

I updated the expected HTML in templates.test.js so that test is passing.

I ran the suite of tests using npm run test this uncovers errors in select-multiple.spec.js in the master branch and in this branch.

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@bronzehedwick
Copy link

Hm, seems like the failed test is in regards to cypress not starting on the travis server.

@bronzehedwick bronzehedwick mentioned this pull request Sep 30, 2019
6 tasks
@jshjohnson
Copy link
Collaborator

If you merge in latest master, the CI build should be fixed 👍

@bradwade
Copy link
Contributor Author

bradwade commented Oct 9, 2019

@jshjohnson Thanks. I merged master and all tests are passing. @bronzehedwick

@jshjohnson
Copy link
Collaborator

Thanks 👍

@jshjohnson jshjohnson merged commit 5cf226f into Choices-js:master Oct 10, 2019
jshjohnson pushed a commit that referenced this pull request Oct 15, 2019
* Update incorrect 'label-for' in demo index.html file.

* Use placeholder value for search input aria label.

* Updated input template test.

* Adding the compiled, uglified JS.
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

Successfully merging this pull request may close these issues.

3 participants