Skip to content

Commit

Permalink
add help text (and links) to a11y audits (#1589)
Browse files Browse the repository at this point in the history
* add help text (and links) to a11y audits

* update a11y help texts per feedback
  • Loading branch information
kaycebasques authored and ebidel committed Feb 1, 2017
1 parent 5bbab8d commit 0a14015
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lighthouse-core/audits/accessibility/aria-allowed-attr.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ class ARIAAllowedAttr extends AxeAudit {
category: 'Accessibility',
name: 'aria-allowed-attr',
description: 'Element aria-* attributes are allowed for this role',
helpText: 'Each ARIA `role` supports a specific subset of `aria-*` attributes. ' +
'Mismatching these invalidates the `aria-*` attributes. [Learn ' +
'more](https://developers.google.com/web/tools/lighthouse/audits/aria-allowed-attributes).',
requiredArtifacts: ['Accessibility']
};
}
Expand Down
2 changes: 2 additions & 0 deletions lighthouse-core/audits/accessibility/aria-required-attr.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ class ARIARequiredAttr extends AxeAudit {
category: 'Accessibility',
name: 'aria-required-attr',
description: 'Elements with ARIA roles have the required aria-* attributes',
helpText: 'Some ARIA roles have required attributes that describe the state ' +
'of the element to screen readers. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/required-aria-attributes).',
requiredArtifacts: ['Accessibility']
};
}
Expand Down
3 changes: 3 additions & 0 deletions lighthouse-core/audits/accessibility/aria-valid-attr-value.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ class ARIAValidAttr extends AxeAudit {
category: 'Accessibility',
name: 'aria-valid-attr-value',
description: 'Element aria-* attributes have valid values',
helpText: 'Assistive technologies, like screen readers, can\'t interpret ARIA ' +
'attributes with invalid values. [Learn ' +
'more](https://developers.google.com/web/tools/lighthouse/audits/valid-aria-values).',
requiredArtifacts: ['Accessibility']
};
}
Expand Down
3 changes: 3 additions & 0 deletions lighthouse-core/audits/accessibility/aria-valid-attr.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ class ARIAValidAttr extends AxeAudit {
category: 'Accessibility',
name: 'aria-valid-attr',
description: 'Element aria-* attributes are valid and not misspelled or non-existent.',
helpText: 'Assistive technologies, like screen readers, can\'t interpret ARIA ' +
'attributes with invalid names. [Learn ' +
'more](https://developers.google.com/web/tools/lighthouse/audits/valid-aria-attributes).',
requiredArtifacts: ['Accessibility']
};
}
Expand Down
2 changes: 2 additions & 0 deletions lighthouse-core/audits/accessibility/color-contrast.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ class ColorContrast extends AxeAudit {
category: 'Accessibility',
name: 'color-contrast',
description: 'Background and foreground colors have a sufficient contrast ratio',
helpText: 'Low-contrast text is difficult or impossible for many users to read. ' +
'[Learn more](https://developers.google.com/web/tools/lighthouse/audits/contrast-ratio).',
requiredArtifacts: ['Accessibility']
};
}
Expand Down
3 changes: 3 additions & 0 deletions lighthouse-core/audits/accessibility/image-alt.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ class ImageAlt extends AxeAudit {
category: 'Accessibility',
name: 'image-alt',
description: 'Every image element has an alt attribute',
helpText: 'Screen reader users rely on `alt` text to provide descriptions of ' +
'images. It\'s also used as fallback content when an image fails to load. ' +
'[Learn more](https://developers.google.com/web/tools/lighthouse/audits/alt-attribute).',
requiredArtifacts: ['Accessibility']
};
}
Expand Down
3 changes: 3 additions & 0 deletions lighthouse-core/audits/accessibility/label.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ class Label extends AxeAudit {
category: 'Accessibility',
name: 'label',
description: 'Every form element has a label',
helpText: 'Labels ensure that form controls are announced properly by assistive ' +
'technologies, like screen readers. [Learn ' +
'more](https://developers.google.com/web/tools/lighthouse/audits/form-labels).',
requiredArtifacts: ['Accessibility']
};
}
Expand Down
3 changes: 3 additions & 0 deletions lighthouse-core/audits/accessibility/tabindex.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ class TabIndex extends AxeAudit {
category: 'Accessibility',
name: 'tabindex',
description: 'No element has a `tabindex` attribute greater than 0',
helpText: 'A value greater than 0 implies an explicit navigation ordering. ' +
'Although technically valid, this often creates frustrating experiences ' +
'for users who rely on assistive technologies. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/tabindex).',
requiredArtifacts: ['Accessibility']
};
}
Expand Down

0 comments on commit 0a14015

Please sign in to comment.