Skip to content

Commit

Permalink
deps: update axe-core to latest (#7020)
Browse files Browse the repository at this point in the history
  • Loading branch information
brendankenny committed Jan 15, 2019
1 parent 82819a0 commit 457133e
Show file tree
Hide file tree
Showing 49 changed files with 539 additions and 484 deletions.
2 changes: 1 addition & 1 deletion .appveyor.yml
Expand Up @@ -42,7 +42,7 @@ test_script:
# FIXME: Exclude Appveyor from running `perf` smoketest until we fix the flake.
# https://github.com/GoogleChrome/lighthouse/issues/5053
# - yarn smoke
- yarn smoke ally pwa pwa2 pwa3 dbw redirects seo offline byte metrics
- yarn smoke a11y pwa pwa2 pwa3 dbw redirects seo offline byte metrics

cache:
#- chrome-win32 -> appveyor.yml,package.json
Expand Down
15 changes: 7 additions & 8 deletions lighthouse-cli/test/cli/__snapshots__/index-test.js.snap
Expand Up @@ -114,9 +114,6 @@ Object {
Object {
"path": "manual/pwa-each-page-has-url",
},
Object {
"path": "accessibility/accesskeys",
},
Object {
"path": "accessibility/aria-allowed-attr",
},
Expand Down Expand Up @@ -219,6 +216,9 @@ Object {
Object {
"path": "accessibility/video-description",
},
Object {
"path": "accessibility/manual/accesskeys",
},
Object {
"path": "accessibility/manual/custom-controls-labels",
},
Expand Down Expand Up @@ -361,11 +361,6 @@ Object {
"categories": Object {
"accessibility": Object {
"auditRefs": Array [
Object {
"group": "a11y-correct-attributes",
"id": "accesskeys",
"weight": 1,
},
Object {
"group": "a11y-aria",
"id": "aria-allowed-attr",
Expand Down Expand Up @@ -536,6 +531,10 @@ Object {
"id": "video-description",
"weight": 3,
},
Object {
"id": "accesskeys",
"weight": 0,
},
Object {
"id": "logical-tab-order",
"weight": 0,
Expand Down
8 changes: 1 addition & 7 deletions lighthouse-cli/test/fixtures/a11y/a11y_tester.html
Expand Up @@ -11,11 +11,6 @@
<meta name="viewport" content="user-scalable=no, maximum-scale=1.0">
</head>
<body>
<p>accesskeys</p>
<section>
<div accesskey="h" tabindex="0">accesskey h</div>
<div accesskey="h" tabindex="0">accesskey h</div>
</section>
<p>aria-allowed-attr</p>
<section>
<div
Expand Down Expand Up @@ -126,8 +121,7 @@
</section>
<p>layout-table</p>
<section>
<table id="layout-table" role="presentation">
<th></th>
<table id="layout-table">
</table>
</section>
<p>link-name</p>
Expand Down
16 changes: 6 additions & 10 deletions lighthouse-cli/test/smokehouse/a11y/expectations.js
Expand Up @@ -13,14 +13,6 @@ module.exports = [
requestedUrl: 'http://localhost:10200/a11y/a11y_tester.html',
finalUrl: 'http://localhost:10200/a11y/a11y_tester.html',
audits: {
'accesskeys': {
score: 0,
details: {
items: {
length: 1,
},
},
},
'aria-allowed-attr': {
score: 0,
details: {
Expand Down Expand Up @@ -166,10 +158,10 @@ module.exports = [
},
},
'layout-table': {
score: 0,
score: 1,
details: {
items: {
length: 1,
length: 0,
},
},
},
Expand Down Expand Up @@ -237,6 +229,10 @@ module.exports = [
},
},
},
'accesskeys': {
score: null,
scoreDisplayMode: 'manual',
},
},
},
];
2 changes: 1 addition & 1 deletion lighthouse-cli/test/smokehouse/run-smoke.js
Expand Up @@ -26,7 +26,7 @@ const smokehouseDir = 'lighthouse-cli/test/smokehouse/';

/** @type {Array<SmoketestDfn>} */
const SMOKETESTS = [{
id: 'ally',
id: 'a11y',
config: smokehouseDir + 'a11y/a11y-config.js',
expectations: 'a11y/expectations.js',
batch: 'parallel-first',
Expand Down
2 changes: 1 addition & 1 deletion lighthouse-core/audits/accessibility/aria-allowed-attr.js
Expand Up @@ -21,7 +21,7 @@ const UIStrings = {
/** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
description: 'Each ARIA `role` supports a specific subset of `aria-*` attributes. ' +
'Mismatching these invalidates the `aria-*` attributes. [Learn ' +
'more](https://dequeuniversity.com/rules/axe/2.2/aria-allowed-attr?application=lighthouse).',
'more](https://dequeuniversity.com/rules/axe/3.1/aria-allowed-attr?application=lighthouse).',
};

const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings);
Expand Down
2 changes: 1 addition & 1 deletion lighthouse-core/audits/accessibility/aria-required-attr.js
Expand Up @@ -20,7 +20,7 @@ const UIStrings = {
failureTitle: '`[role]`s do not have all required `[aria-*]` attributes',
/** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
description: 'Some ARIA roles have required attributes that describe the state ' +
'of the element to screen readers. [Learn more](https://dequeuniversity.com/rules/axe/2.2/aria-required-attr?application=lighthouse).',
'of the element to screen readers. [Learn more](https://dequeuniversity.com/rules/axe/3.1/aria-required-attr?application=lighthouse).',
};

const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings);
Expand Down
Expand Up @@ -23,7 +23,7 @@ const UIStrings = {
/** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
description: 'Some ARIA parent roles must contain specific child roles to perform ' +
'their intended accessibility functions. ' +
'[Learn more](https://dequeuniversity.com/rules/axe/2.2/aria-required-children?application=lighthouse).',
'[Learn more](https://dequeuniversity.com/rules/axe/3.1/aria-required-children?application=lighthouse).',
};

const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings);
Expand Down
Expand Up @@ -22,7 +22,7 @@ const UIStrings = {
/** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
description: 'Some ARIA child roles must be contained by specific parent roles to ' +
'properly perform their intended accessibility functions. ' +
'[Learn more](https://dequeuniversity.com/rules/axe/2.2/aria-required-parent?application=lighthouse).',
'[Learn more](https://dequeuniversity.com/rules/axe/3.1/aria-required-parent?application=lighthouse).',
};

const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings);
Expand Down
2 changes: 1 addition & 1 deletion lighthouse-core/audits/accessibility/aria-roles.js
Expand Up @@ -21,7 +21,7 @@ const UIStrings = {
/** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
description: 'ARIA roles must have valid values in order to perform their ' +
'intended accessibility functions. ' +
'[Learn more](https://dequeuniversity.com/rules/axe/2.2/aria-roles?application=lighthouse).',
'[Learn more](https://dequeuniversity.com/rules/axe/3.1/aria-roles?application=lighthouse).',
};

const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings);
Expand Down
Expand Up @@ -21,7 +21,7 @@ const UIStrings = {
/** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
description: 'Assistive technologies, like screen readers, can\'t interpret ARIA ' +
'attributes with invalid values. [Learn ' +
'more](https://dequeuniversity.com/rules/axe/2.2/aria-valid-attr-value?application=lighthouse).',
'more](https://dequeuniversity.com/rules/axe/3.1/aria-valid-attr-value?application=lighthouse).',
};

const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings);
Expand Down
2 changes: 1 addition & 1 deletion lighthouse-core/audits/accessibility/aria-valid-attr.js
Expand Up @@ -21,7 +21,7 @@ const UIStrings = {
/** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
description: 'Assistive technologies, like screen readers, can\'t interpret ARIA ' +
'attributes with invalid names. [Learn ' +
'more](https://dequeuniversity.com/rules/axe/2.2/aria-valid-attr?application=lighthouse).',
'more](https://dequeuniversity.com/rules/axe/3.1/aria-valid-attr?application=lighthouse).',
};

const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings);
Expand Down
2 changes: 1 addition & 1 deletion lighthouse-core/audits/accessibility/audio-caption.js
Expand Up @@ -23,7 +23,7 @@ const UIStrings = {
description: 'Captions make audio elements usable for deaf or hearing-impaired users, ' +
'providing critical information such as who is talking, what they\'re saying, ' +
'and other non-speech information. ' +
'[Learn more](https://dequeuniversity.com/rules/axe/2.2/audio-caption?application=lighthouse).',
'[Learn more](https://dequeuniversity.com/rules/axe/3.1/audio-caption?application=lighthouse).',
};

const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings);
Expand Down
2 changes: 1 addition & 1 deletion lighthouse-core/audits/accessibility/button-name.js
Expand Up @@ -21,7 +21,7 @@ const UIStrings = {
/** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
description: 'When a button doesn\'t have an accessible name, screen readers announce it ' +
'as "button", making it unusable for users who rely on screen readers. ' +
'[Learn more](https://dequeuniversity.com/rules/axe/2.2/button-name?application=lighthouse).',
'[Learn more](https://dequeuniversity.com/rules/axe/3.1/button-name?application=lighthouse).',
};

const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings);
Expand Down
2 changes: 1 addition & 1 deletion lighthouse-core/audits/accessibility/bypass.js
Expand Up @@ -22,7 +22,7 @@ const UIStrings = {
/** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
description: 'Adding ways to bypass repetitive content lets keyboard users navigate the ' +
'page more efficiently. ' +
'[Learn more](https://dequeuniversity.com/rules/axe/2.2/bypass?application=lighthouse).',
'[Learn more](https://dequeuniversity.com/rules/axe/3.1/bypass?application=lighthouse).',
};

const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings);
Expand Down
2 changes: 1 addition & 1 deletion lighthouse-core/audits/accessibility/color-contrast.js
Expand Up @@ -22,7 +22,7 @@ const UIStrings = {
'sufficient contrast ratio.',
/** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
description: 'Low-contrast text is difficult or impossible for many users to read. ' +
'[Learn more](https://dequeuniversity.com/rules/axe/2.2/color-contrast?application=lighthouse).',
'[Learn more](https://dequeuniversity.com/rules/axe/3.1/color-contrast?application=lighthouse).',
};

const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings);
Expand Down
2 changes: 1 addition & 1 deletion lighthouse-core/audits/accessibility/definition-list.js
Expand Up @@ -23,7 +23,7 @@ const UIStrings = {
/** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
description: 'When definition lists are not properly marked up, screen readers may produce ' +
'confusing or inaccurate output. ' +
'[Learn more](https://dequeuniversity.com/rules/axe/2.2/definition-list?application=lighthouse).',
'[Learn more](https://dequeuniversity.com/rules/axe/3.1/definition-list?application=lighthouse).',
};

const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings);
Expand Down
2 changes: 1 addition & 1 deletion lighthouse-core/audits/accessibility/dlitem.js
Expand Up @@ -21,7 +21,7 @@ const UIStrings = {
/** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
description: 'Definition list items (`<dt>` and `<dd>`) must be wrapped in a ' +
'parent `<dl>` element to ensure that screen readers can properly announce them. ' +
'[Learn more](https://dequeuniversity.com/rules/axe/2.2/dlitem?application=lighthouse).',
'[Learn more](https://dequeuniversity.com/rules/axe/3.1/dlitem?application=lighthouse).',
};

const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings);
Expand Down
2 changes: 1 addition & 1 deletion lighthouse-core/audits/accessibility/duplicate-id.js
Expand Up @@ -21,7 +21,7 @@ const UIStrings = {
/** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
description: 'The value of an id attribute must be unique to prevent ' +
'other instances from being overlooked by assistive technologies. ' +
'[Learn more](https://dequeuniversity.com/rules/axe/2.2/duplicate-id?application=lighthouse).',
'[Learn more](https://dequeuniversity.com/rules/axe/3.1/duplicate-id?application=lighthouse).',
};

const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings);
Expand Down
2 changes: 1 addition & 1 deletion lighthouse-core/audits/accessibility/frame-title.js
Expand Up @@ -20,7 +20,7 @@ const UIStrings = {
failureTitle: '`<frame>` or `<iframe>` elements do not have a title',
/** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
description: 'Screen reader users rely on frame titles to describe the contents of frames. ' +
'[Learn more](https://dequeuniversity.com/rules/axe/2.2/frame-title?application=lighthouse).',
'[Learn more](https://dequeuniversity.com/rules/axe/3.1/frame-title?application=lighthouse).',
};

const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings);
Expand Down
2 changes: 1 addition & 1 deletion lighthouse-core/audits/accessibility/html-has-lang.js
Expand Up @@ -23,7 +23,7 @@ const UIStrings = {
'that the page is in the default language that the user chose when setting up the ' +
'screen reader. If the page isn\'t actually in the default language, then the screen ' +
'reader might not announce the page\'s text correctly. ' +
'[Learn more](https://dequeuniversity.com/rules/axe/2.2/html-lang?application=lighthouse).',
'[Learn more](https://dequeuniversity.com/rules/axe/3.1/html-has-lang?application=lighthouse).',
};

const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings);
Expand Down
2 changes: 1 addition & 1 deletion lighthouse-core/audits/accessibility/html-lang-valid.js
Expand Up @@ -22,7 +22,7 @@ const UIStrings = {
/** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
description: 'Specifying a valid [BCP 47 language](https://www.w3.org/International/questions/qa-choosing-language-tags#question) ' +
'helps screen readers announce text properly. ' +
'[Learn more](https://dequeuniversity.com/rules/axe/2.2/valid-lang?application=lighthouse).',
'[Learn more](https://dequeuniversity.com/rules/axe/3.1/valid-lang?application=lighthouse).',
};

const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings);
Expand Down
2 changes: 1 addition & 1 deletion lighthouse-core/audits/accessibility/image-alt.js
Expand Up @@ -21,7 +21,7 @@ const UIStrings = {
/** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
description: 'Informative elements should aim for short, descriptive alternate text. ' +
'Decorative elements can be ignored with an empty alt attribute. ' +
'[Learn more](https://dequeuniversity.com/rules/axe/2.2/image-alt?application=lighthouse).',
'[Learn more](https://dequeuniversity.com/rules/axe/3.1/image-alt?application=lighthouse).',
};

const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings);
Expand Down
2 changes: 1 addition & 1 deletion lighthouse-core/audits/accessibility/input-image-alt.js
Expand Up @@ -21,7 +21,7 @@ const UIStrings = {
/** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
description: 'When an image is being used as an `<input>` button, providing alternative ' +
'text can help screen reader users understand the purpose of the button. ' +
'[Learn more](https://dequeuniversity.com/rules/axe/2.2/input-image-alt?application=lighthouse).',
'[Learn more](https://dequeuniversity.com/rules/axe/3.1/input-image-alt?application=lighthouse).',
};

const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings);
Expand Down
2 changes: 1 addition & 1 deletion lighthouse-core/audits/accessibility/label.js
Expand Up @@ -21,7 +21,7 @@ const UIStrings = {
/** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
description: 'Labels ensure that form controls are announced properly by assistive ' +
'technologies, like screen readers. [Learn ' +
'more](https://dequeuniversity.com/rules/axe/2.2/label?application=lighthouse).',
'more](https://dequeuniversity.com/rules/axe/3.1/label?application=lighthouse).',
};

const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings);
Expand Down
2 changes: 1 addition & 1 deletion lighthouse-core/audits/accessibility/layout-table.js
Expand Up @@ -25,7 +25,7 @@ const UIStrings = {
description: 'A table being used for layout purposes should not include data elements, ' +
'such as the th or caption elements or the summary attribute, because this can ' +
'create a confusing experience for screen reader users. ' +
'[Learn more](https://dequeuniversity.com/rules/axe/2.2/layout-table?application=lighthouse).',
'[Learn more](https://dequeuniversity.com/rules/axe/3.1/layout-table?application=lighthouse).',
};

const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings);
Expand Down
2 changes: 1 addition & 1 deletion lighthouse-core/audits/accessibility/link-name.js
Expand Up @@ -22,7 +22,7 @@ const UIStrings = {
description: 'Link text (and alternate text for images, when used as links) that is ' +
'discernible, unique, and focusable improves the navigation experience for ' +
'screen reader users. ' +
'[Learn more](https://dequeuniversity.com/rules/axe/2.2/link-name?application=lighthouse).',
'[Learn more](https://dequeuniversity.com/rules/axe/3.1/link-name?application=lighthouse).',
};

const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings);
Expand Down
2 changes: 1 addition & 1 deletion lighthouse-core/audits/accessibility/list.js
Expand Up @@ -23,7 +23,7 @@ const UIStrings = {
/** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
description: 'Screen readers have a specific way of announcing lists. Ensuring proper list ' +
'structure aids screen reader output. ' +
'[Learn more](https://dequeuniversity.com/rules/axe/2.2/list?application=lighthouse).',
'[Learn more](https://dequeuniversity.com/rules/axe/3.1/list?application=lighthouse).',
};

const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings);
Expand Down
2 changes: 1 addition & 1 deletion lighthouse-core/audits/accessibility/listitem.js
Expand Up @@ -22,7 +22,7 @@ const UIStrings = {
/** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
description: 'Screen readers require list items (`<li>`) to be contained within a ' +
'parent `<ul>` or `<ol>` to be announced properly. ' +
'[Learn more](https://dequeuniversity.com/rules/axe/2.2/listitem?application=lighthouse).',
'[Learn more](https://dequeuniversity.com/rules/axe/3.1/listitem?application=lighthouse).',
};

const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings);
Expand Down

0 comments on commit 457133e

Please sign in to comment.