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

Allow aria-invalid on any element #259

Merged

Conversation

missilev
Copy link
Contributor

Closes #252

What:
This PR allows checking if any element is valid, not only on form elements.

Why:
Regarding #252 we need to provide a possibility to check the validity of the element even it's not a form element.

How:
I adapted isElementInvalid function to conditionally call checkValidity if element supports it.

Checklist:

  • Documentation
  • Tests
  • Updated Type Definitions
  • Ready to be merged

@codecov
Copy link

codecov bot commented Jun 11, 2020

Codecov Report

Merging #259 into master will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #259   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           23        23           
  Lines          309       313    +4     
  Branches        73        73           
=========================================
+ Hits           309       313    +4     
Impacted Files Coverage Δ
src/to-be-invalid.js 100.00% <100.00%> (ø)

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 159a7a2...f845e58. Read the comment docs.

@gnapse gnapse merged commit 14d1630 into testing-library:master Jun 11, 2020
@gnapse
Copy link
Member

gnapse commented Jun 11, 2020

@all-contributors add @missilev for code, test

@allcontributors
Copy link
Contributor

@gnapse

I've put up a pull request to add @missilev! 🎉

@gnapse
Copy link
Member

gnapse commented Jun 11, 2020

🎉 This PR is included in version 5.10.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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.

Allow aria-invalid on any element?
2 participants