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.
|
eps1lon
left a comment
There was a problem hiding this comment.
Looks great. Just some editorial changes.
|
@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
leveloption 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
leveloption 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-levelattribute.Any role other than
"heading"using theleveloption, will throw an error.Checklist: