-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Add non-experimental axe tests. #1768
Conversation
name: 'accesskeys', | ||
description: 'All accesskeys in the document are unique.', | ||
helpText: '`accesskey` attributes allow the user to quickly activiate or focus part ' + | ||
'of the page.' + |
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.
need an extra space
Whoa that is HUUUUUUGE. Not sure what to do about it, but if 1-more audits fails that whole thing will be open. That'll probably be the case for most sites. |
First up. This was some work! nice job wrangling it all together. I really like getting the helptext quickly as I don't understand all of these too well. :) A few ideas and questions.. Combine into fewer auditsThis is a larger issue.. but I think we can combine a bunch of these into fewer audits. As a result we won't have a wall of text when the Accessibility section is there. (as in the above screenshot) So in this approach. You have a group like "Elements applying ARIA follow correct practices". Then if there is a failure, you open it up and see the results grouped by element. (Basically a list of elements and associated axe violations) I spent some time trying to group them. I also ran the tests on a bunch of sites to make sure the ones that will fail a lot have a clear top-level description. So here's my proposal ....
Top level aggregationI'm working on a separate proposal around overall IA, but part of that proposal is that Accessibility breaks out into a separate top-level Aggregation. (So we'd have: PWA, Security, Accessibility, Performance, Best Practices). These would also be the selectable with checkboxes for people to only get what they want. LanguageI notice we don't always use language consistently. Note how we are referring to elements and attribute values: We need to be consistent with uses of "All" and "Every" or the lackthereof. (I think the last option is probably best: bypass questionis the Audit feedbackCan you add a note on the Can you add something like this to the image-alt helptext?
Admittedly both of these changes won't belong in the helptext necessarily if we do the above combining. that's a lot but that's what i'm thinkin.. wdyt? |
FYI My proposed new IA for the report includes the above categorization for accessibility |
I updated the help text language to be more consistent. I may bug @ebidel or @brendankenny tomorrow when we're all back in the office to get their help combining the audits |
021a04f
to
9c4c463
Compare
@paulirish I think this is ready for review again, whenever you have a chance. |
category: 'Accessibility', | ||
name: 'accesskeys', | ||
description: '`[accesskey]` values are unique.', | ||
helpText: '`accesskey` attributes allow the user to quickly activiate or focus part ' + |
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.
activate
@@ -0,0 +1,44 @@ | |||
/** | |||
* @license | |||
* Copyright 2016 Google Inc. All rights reserved. |
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.
2017 for these new files
'use strict'; | ||
|
||
/** | ||
* @fileoverview Ensures elements with an ARIA role that require child roles contain them. |
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 sentence was hard to parse. Something like "Ensures elements contain a child role when their parent ARIA role requires it."
'use strict'; | ||
|
||
/** | ||
* @fileoverview Ensures elements with an ARIA role that require parent roles are contained by them. |
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.
same comment
category: 'Accessibility', | ||
name: 'input-image-alt', | ||
description: '`<input type="image">` elements have `[alt]` text.', | ||
helpText: 'When an image is being used as an `<input>` button providing alternative text ' + |
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.
button,
category: 'Accessibility', | ||
name: 'valid-lang', | ||
description: '`[lang]` attributes have a valid value.', | ||
helpText: 'Specifying a valid BCP 47 language on elements helps ensure that text is ' + |
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.
add a link: [BCP 47 language](LINK?)
'use strict'; | ||
|
||
/** | ||
* @fileoverview Ensures every HTML document has a `lang` attribute. |
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.
update
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.
LGTM. One more thing.
return { | ||
category: 'Accessibility', | ||
name: 'button-name', | ||
description: 'buttons have an accessible name.', |
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.
c7ad289
to
a39dff3
Compare
🎱🍐✨✨! |
Big PR I know :P
This adds most of the axe tests with a few exceptions:
<blink>
tag and some stuff around image mapstabindex
test which is a simple test, and was already checked into lighthouse so I figure it's ok to leave it in place.