-
Notifications
You must be signed in to change notification settings - Fork 779
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Flag unsupported roles (#1064)
Adds `unsupported` property to the `lookupTable.role` dictionary. New option for `aria.isValidRole` to `flagUnsupported` roles. Defaults to `false` since this commons function is reused for multiple checks. Part one of #918. TODO: - Add `unsupported` to lookupTable.attributes - Figure out what to do with globalAttributes, which are currently a flat array - Add `axe.commons.support` API and enable control of it through `axe.configure` ## Reviewer checks **Required fields, to be filled out by PR reviewer(s)** - [x] Follows the commit message policy, appropriate for next version - [x] Has documentation updated, a DU ticket, or requires no documentation change - [x] Includes new tests, or was unnecessary - [x] Code is reviewed for security by: @WilcoFiers
- Loading branch information
1 parent
d262a35
commit 5515ee6
Showing
9 changed files
with
310 additions
and
132 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
return !axe.commons.aria.isValidRole(node.getAttribute('role'), { | ||
flagUnsupported: true | ||
}); |
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,11 @@ | ||
{ | ||
"id": "unsupportedrole", | ||
"evaluate": "unsupportedrole.js", | ||
"metadata": { | ||
"impact": "critical", | ||
"messages": { | ||
"pass": "ARIA role is supported", | ||
"fail": "The role used is not widely supported in assistive technologies" | ||
} | ||
} | ||
} |
Oops, something went wrong.