Skip to content
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

Proposed better organization of a11y audits #7019

Closed
robdodson opened this issue Jan 15, 2019 · 5 comments · Fixed by #7129
Closed

Proposed better organization of a11y audits #7019

robdodson opened this issue Jan 15, 2019 · 5 comments · Fixed by #7129

Comments

@robdodson
Copy link
Contributor

robdodson commented Jan 15, 2019

I was wondering how LH folks feel about me putting together a PR to better categorize the accessibility audits? The current categories are kind of vague, e.g. "uses attributes correctly" for example.

Here's a proposed reorg:

Best practices

- [id] attributes on the page are unique
- [user-scalable="no"] is not used in the <meta name="viewport"> element and the [maximum-scale] attribute is not less than 5.
- The document does not use <meta http-equiv="refresh">

Navigation

- [accesskey] values are unique
- No element has a [tabindex] value greater than 0
- The page contains a heading, skip link, or landmark region

Names and labels

- Document has a <title> element
- Form elements have associated labels
- Buttons have an accessible name
- Links have a discernible name
- <frame> or <iframe> elements have a title
- <object> elements have [alt] text
- Image elements have [alt] attributes
- <input type="image"> elements have [alt] text

ARIA

- [role]s have all required [aria-*] attributes
- Elements with [role] that require specific children [role]s, are present
- [role]s are contained by their required parent element
- [role] values are valid
- [aria-*] attributes match their roles
- [aria-*] attributes have valid values
- [aria-*] attributes are valid and not misspelled

Audio and video

- <audio> elements contain a <track> element with [kind="captions"]
- <video> elements contain a <track> element with [kind="captions"]
- <video> elements contain a <track> element with [kind="description"]

Tables and lists

- Cells in a <table> element that use the [headers] attribute only refer to other cells of that same table.
- <th> elements and elements with [role="columnheader"/"rowheader"] have data cells they describe.
- Presentational <table> elements avoid using <th>, <caption> or the [summary] attribute.
- <dl>'s contain only properly-ordered <dt> and <dd> groups, <script> or <template> elements.
- Definition list items are wrapped in <dl> elements
- Lists contain only <li> elements and script supporting elements (<script> and <template>).
- List items (<li>) are contained within <ul> or <ol> parent elements

Contrast

- Background and foreground colors have a sufficient contrast ratio

Internationalization and localization

- <html> element has a [lang] attribute
- <html> element has a valid value for its [lang] attribute
- [lang] attributes have a valid value

Manual audits

# Note, these are unchanged

- Interactive elements indicate their purpose and state
- Visual order on the page follows DOM order
- The page has a logical tab order
- Interactive controls are keyboard focusable
- The user's focus is directed to new content added to the page
- User focus is not accidentally trapped in a region
- Offscreen content is hidden from assistive technology
- Headings don't skip levels
- HTML5 landmark elements are used to improve navigation
- Custom controls have associated labels
- Custom controls have ARIA roles
@robdodson
Copy link
Contributor Author

oops I just remembered that some of these are manual audits, let me redo the list with that section...

@brendankenny
Copy link
Member

I was wondering how LH folks feel about me putting together a PR to better categorize the accessibility audits?

Definitely definitely welcome!

with a semver caveat:

  • If this ends up renaming categories/better descriptions, that's (probably) totally great any time.
  • If this ends up regrouping audits and/or reprioritizing weights, however, we'll need to wait for a major breaking change, which is basically May-ish after today.

If it's both, we can always split it up to what can land any time and what needs to land later.

@robdodson
Copy link
Contributor Author

robdodson commented Jan 15, 2019

I updated my list to include the manual audits and combined the keyboard access + headings & landmarks categories because manual audits sucked up most of them.

If this ends up regrouping audits and/or reprioritizing weights

It wouldn't change the weights but it does completely reorganize all of the subheadings. For example, "Elements use attributes correctly" currently contains stuff for tabindex and image alt text. That category gets replaced and those audits go to live with "Navigation" and "Names and labels" respectively.

@brendankenny
Copy link
Member

It wouldn't change the weights but it does completely reorganize all of the subheadings.

it was pointed out to me that this wouldn't affect scoring or where individual audits are located in the lighthouse results, so this actually (probably) is fine for a point release.

@robdodson
Copy link
Contributor Author

OK, I'll follow up with a PR then :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants