-
Notifications
You must be signed in to change notification settings - Fork 471
feat(ByRole): Add 'level' option for *ByRole('heading') #757
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
feat(ByRole): Add 'level' option for *ByRole('heading') #757
Conversation
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 0b1402e:
|
Codecov Report
@@ Coverage Diff @@
## master #757 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 24 24
Lines 667 675 +8
Branches 176 181 +5
=========================================
+ Hits 667 675 +8
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great. Just some editorial changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Solid 👍
@all-contributors please add @winterlamon for code and tests |
I've put up a pull request to add @winterlamon! 🎉 |
🎉 This PR is included in version 7.23.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
What:
Adds the
level
option for the*ByRole('heading')
queries as proposed in #743Why:
There may be situations in which headings should be queried by a specific level rather than all heading levels.
How:
Using the
level
option in the*ByRole('heading')
queries includes the elements with the"heading"
role matching the indicated level, either by the semantic HTML heading elements<h1>-<h6>
or matching thearia-level
attribute.Any role other than
"heading"
using thelevel
option, will throw an error.Checklist: