-
Notifications
You must be signed in to change notification settings - Fork 779
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
fix: ignore invalid and allow redundant role in aria-allowed-role #1118
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
119fe33
fix: ignore invalid and allow redundant role in aria-allowed-role
jeeyyy fceb0d7
test: aria allowed roles, tests for invalid and redundant roles
jeeyyy 4ea825a
fix: allowed combobox, searchbox, spinbutton role on type input text
jeeyyy 401d41e
test: aria allowed role unit tests
jeeyyy 2086d07
test: get role tests for segments
jeeyyy dcacb51
refactor: review based code changes
jeeyyy 2170563
test: add more integration tests
jeeyyy 39e7784
refactor: based on review
jeeyyy a54843e
test: add tests for aria-allowed-role
jeeyyy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
return ( | ||
axe.commons.aria.getRole(node, { | ||
noImplicit: true, | ||
dpub: true, | ||
fallback: true | ||
}) !== null | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ | |
<section id="pass-section-role-doc-bib" role="doc-bibliography"></section> | ||
<ul><li id='pass-li-role-doc-biblioentry' role="doc-biblioentry"></li></ul> | ||
<aside id='pass-aside-doc-example' role='doc-example'></aside> | ||
<div id='pass-div-has-any-role' role='divAnyRoleEvenInvalid'></div> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Instead of removing, I suggest you put in a valid role. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. Added it back again. This diff only watches this line, so comment is not going stale. |
||
<div id='pass-div-has-any-role' role='contentinfo'></div> | ||
<div id="pass-div-valid-role" role="link">ok</div> | ||
<ol id="pass-ol-valid-role" role="directory"></ol> | ||
<nav id="pass-nav-role-doc-index" role="doc-index"></nav> | ||
|
@@ -27,6 +27,12 @@ <h1 id="pass-h1-role-doc-subtitle" role="doc-subtitle"></h1> | |
<header id='pass-header-valid-role' role="group"></header> | ||
<footer id='pass-footer-valid-role' role="group"></footer> | ||
<embed id='pass-embed-valid-role' role='img'> | ||
<input type="text" role="textbox" id="pass-input-text-redundant-role"/> | ||
<input type="text" role="textbox combobox" id="pass-input-multiple-roles"/> | ||
<input type="text" role="searchbox invalidrole" id="pass-input-multiple-valid-and-invalid-roles"/> | ||
<input aria-autocomplete="list" aria-label="some label" autocomplete="off" role="searchbox" type="text" aria-expanded="true" id='pass-input-text-role-searchbox'> | ||
<input aria-autocomplete="list" aria-label="some label" autocomplete="off" role="combobox" type="text" aria-expanded="true" id='pass-input-text-role-combobox'> | ||
<input aria-autocomplete="list" aria-label="some label" autocomplete="off" role="spinbutton" type="text" aria-expanded="true" id='pass-input-text-role-spinbutton'> | ||
<input type="image" role="link" id="pass-input-image-valid-role"> | ||
<input type="checkbox" role='menuitemcheckbox' id='pass-input-checkbox-valid-role' > | ||
<h1 id='pass-h1-valid-role' role='none'></h1> | ||
|
@@ -46,4 +52,6 @@ <h1 id='pass-h1-valid-role' role='none'></h1> | |
<input type="image" id="fail-input-image-invalid-role" role='doc-afterword'> | ||
<button id="fail-button-role-cell" role='cell'></button> | ||
<aside id='fail-aside-doc-foreword' role='doc-foreword'></aside> | ||
<aside id="fail-aside-role-tab" role='tab'></aside> | ||
<aside id="fail-aside-role-tab" role='tab'></aside> | ||
<button id='fail-button-role-gridcell' role="gridcell" title="IconCheckmark" aria-label="IconCheckmark icon"></button> | ||
<input id='fail-input-role-gridcell-multiple-role' role="gridcell combobox"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
General question: How did we miss this, and how do we know we're not missing more stuff this time around?
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.
This is the holy grail source of truth - https://www.w3.org/TR/html-aria/ to construct these mappings.
There are 3 caveats with this:
To answer your specific Q, we missed this case due to an overlap of 1 and 2 above.
I am going through the table once more to ensure the mappings are right.