-
Notifications
You must be signed in to change notification settings - Fork 792
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(checks): deprecate role-none and role-presentation for presentational-role #2503
Conversation
@@ -87,6 +87,7 @@ function buildRules(grunt, options, commons, callback) { | |||
var tags = options.tags ? options.tags.split(/\s*,\s*/) : []; | |||
var rules = result.rules; | |||
var checks = result.checks; | |||
parseChecks(checks); |
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.
From the code, a check's metatdata was only added to axe._load
if a rule used it. Since role-none
and role-presentation
were no longer used in any rule, their metadata was never added. This caused any translation file that passed translations for those checks to fail axe.configure
with
"Locale provided for unknown check: "role-none""
To fix I added this line to parse all checks regardless of if a rule uses it or not.
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.
minor stuff
<iframe | ||
src="frame-title/frames/level1a.html" | ||
id="violation4" | ||
role="none" | ||
aria-live="assertive" | ||
></iframe> |
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.
We may have to do more work for iframes here later. I don't think this is correct, but we'll get to it when Jey finishes his work on iframes in ACT. Acceptable for now.
Co-authored-by: Wilco Fiers <WilcoFiers@users.noreply.github.com>
Co-authored-by: Wilco Fiers <WilcoFiers@users.noreply.github.com>
The
presentational-role
check is written in such a way that as long as the end role of the element is presentation/none the check will pass. This enables it to be used for things that don't use explicit role to make it presentation, such as an images emptyalt
attribute. That should help when fixing #2502 so we don't have to check the role in that check.Also, I removed the presentational check on the
link-name
rule as there is no way to disable a link from being focusable without a) making it hidden which prevents the rule from running on it or b) removing thehref
attribute which goes against theselector
of the rule.Closes issue: #2454
Reviewer checks
Required fields, to be filled out by PR reviewer(s)