Skip to content

fix(label): support aria-label #42

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

Merged
merged 1 commit into from
Apr 4, 2018
Merged

Conversation

kentcdodds
Copy link
Member

What: This adds support for aria-label in getByLabelText API

Why: Because sometimes you have an input which has styling to suggest its purpose (a visible label is unnecessary) and can use the aria-label for users who are using a screen reader.

How:

  • Change the queryByPlaceholder to a general queryByAttribute (not exposed) and use that for queryByPlaceholder, queryByTestId, and inside queryByLabelText.
  • Add a test to verify the aria-label support
  • Update the docs

Checklist:

  • Documentation
  • Tests
  • Ready to be merged
  • Added myself to contributors table N/A

@codecov
Copy link

codecov bot commented Apr 4, 2018

Codecov Report

Merging #42 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master    #42   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           5      5           
  Lines          85     85           
  Branches       19     19           
=====================================
  Hits           85     85
Impacted Files Coverage Δ
src/queries.js 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 825cd48...7527be0. Read the comment docs.

@kentcdodds kentcdodds merged commit 34c974d into master Apr 4, 2018
@kentcdodds kentcdodds deleted the pr/support-aria-label branch April 4, 2018 13:59
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.

1 participant