From 457133eac07e54d6a9c02b3604b88b7437f1f8d6 Mon Sep 17 00:00:00 2001 From: Brendan Kenny Date: Tue, 15 Jan 2019 15:08:22 -0800 Subject: [PATCH] deps: update axe-core to latest (#7020) --- .appveyor.yml | 2 +- .../test/cli/__snapshots__/index-test.js.snap | 15 +- .../test/fixtures/a11y/a11y_tester.html | 8 +- .../test/smokehouse/a11y/expectations.js | 16 +- lighthouse-cli/test/smokehouse/run-smoke.js | 2 +- .../audits/accessibility/aria-allowed-attr.js | 2 +- .../accessibility/aria-required-attr.js | 2 +- .../accessibility/aria-required-children.js | 2 +- .../accessibility/aria-required-parent.js | 2 +- .../audits/accessibility/aria-roles.js | 2 +- .../accessibility/aria-valid-attr-value.js | 2 +- .../audits/accessibility/aria-valid-attr.js | 2 +- .../audits/accessibility/audio-caption.js | 2 +- .../audits/accessibility/button-name.js | 2 +- .../audits/accessibility/bypass.js | 2 +- .../audits/accessibility/color-contrast.js | 2 +- .../audits/accessibility/definition-list.js | 2 +- .../audits/accessibility/dlitem.js | 2 +- .../audits/accessibility/duplicate-id.js | 2 +- .../audits/accessibility/frame-title.js | 2 +- .../audits/accessibility/html-has-lang.js | 2 +- .../audits/accessibility/html-lang-valid.js | 2 +- .../audits/accessibility/image-alt.js | 2 +- .../audits/accessibility/input-image-alt.js | 2 +- lighthouse-core/audits/accessibility/label.js | 2 +- .../audits/accessibility/layout-table.js | 2 +- .../audits/accessibility/link-name.js | 2 +- lighthouse-core/audits/accessibility/list.js | 2 +- .../audits/accessibility/listitem.js | 2 +- .../accessibility/{ => manual}/accesskeys.js | 24 +- .../audits/accessibility/meta-refresh.js | 2 +- .../audits/accessibility/meta-viewport.js | 2 +- .../audits/accessibility/object-alt.js | 2 +- .../audits/accessibility/tabindex.js | 2 +- .../audits/accessibility/td-headers-attr.js | 2 +- .../audits/accessibility/th-has-data-cells.js | 2 +- .../audits/accessibility/valid-lang.js | 2 +- .../audits/accessibility/video-caption.js | 2 +- .../audits/accessibility/video-description.js | 2 +- lighthouse-core/config/default-config.js | 4 +- lighthouse-core/lib/i18n/en-US.json | 86 +++-- .../audits/accessibility/accesskeys-test.js | 43 --- .../html/renderer/category-renderer-test.js | 2 +- .../test/report/html/renderer/dom-test.js | 4 +- .../test/results/artifacts/artifacts.json | 296 ++++++++++-------- lighthouse-core/test/results/sample_v2.json | 238 ++++++++------ package.json | 2 +- proto/sample_v2_round_trip.json | 207 +++++++----- yarn.lock | 8 +- 49 files changed, 539 insertions(+), 484 deletions(-) rename lighthouse-core/audits/accessibility/{ => manual}/accesskeys.js (70%) delete mode 100644 lighthouse-core/test/audits/accessibility/accesskeys-test.js diff --git a/.appveyor.yml b/.appveyor.yml index 69de01ad5d79..71902d735df3 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -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 diff --git a/lighthouse-cli/test/cli/__snapshots__/index-test.js.snap b/lighthouse-cli/test/cli/__snapshots__/index-test.js.snap index 937a7bf3abd7..884aaa7bd912 100644 --- a/lighthouse-cli/test/cli/__snapshots__/index-test.js.snap +++ b/lighthouse-cli/test/cli/__snapshots__/index-test.js.snap @@ -114,9 +114,6 @@ Object { Object { "path": "manual/pwa-each-page-has-url", }, - Object { - "path": "accessibility/accesskeys", - }, Object { "path": "accessibility/aria-allowed-attr", }, @@ -219,6 +216,9 @@ Object { Object { "path": "accessibility/video-description", }, + Object { + "path": "accessibility/manual/accesskeys", + }, Object { "path": "accessibility/manual/custom-controls-labels", }, @@ -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", @@ -536,6 +531,10 @@ Object { "id": "video-description", "weight": 3, }, + Object { + "id": "accesskeys", + "weight": 0, + }, Object { "id": "logical-tab-order", "weight": 0, diff --git a/lighthouse-cli/test/fixtures/a11y/a11y_tester.html b/lighthouse-cli/test/fixtures/a11y/a11y_tester.html index afa2429441cb..cc7a20dbf5cd 100644 --- a/lighthouse-cli/test/fixtures/a11y/a11y_tester.html +++ b/lighthouse-cli/test/fixtures/a11y/a11y_tester.html @@ -11,11 +11,6 @@ -

accesskeys

-
-
accesskey h
-
accesskey h
-

aria-allowed-attr

layout-table

- - +

link-name

diff --git a/lighthouse-cli/test/smokehouse/a11y/expectations.js b/lighthouse-cli/test/smokehouse/a11y/expectations.js index 77518a99c0e3..256d91c9272d 100644 --- a/lighthouse-cli/test/smokehouse/a11y/expectations.js +++ b/lighthouse-cli/test/smokehouse/a11y/expectations.js @@ -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: { @@ -166,10 +158,10 @@ module.exports = [ }, }, 'layout-table': { - score: 0, + score: 1, details: { items: { - length: 1, + length: 0, }, }, }, @@ -237,6 +229,10 @@ module.exports = [ }, }, }, + 'accesskeys': { + score: null, + scoreDisplayMode: 'manual', + }, }, }, ]; diff --git a/lighthouse-cli/test/smokehouse/run-smoke.js b/lighthouse-cli/test/smokehouse/run-smoke.js index a456d8410302..bea6c5f9f170 100644 --- a/lighthouse-cli/test/smokehouse/run-smoke.js +++ b/lighthouse-cli/test/smokehouse/run-smoke.js @@ -26,7 +26,7 @@ const smokehouseDir = 'lighthouse-cli/test/smokehouse/'; /** @type {Array} */ const SMOKETESTS = [{ - id: 'ally', + id: 'a11y', config: smokehouseDir + 'a11y/a11y-config.js', expectations: 'a11y/expectations.js', batch: 'parallel-first', diff --git a/lighthouse-core/audits/accessibility/aria-allowed-attr.js b/lighthouse-core/audits/accessibility/aria-allowed-attr.js index 8d9b75ca8cba..a59a1df94e02 100644 --- a/lighthouse-core/audits/accessibility/aria-allowed-attr.js +++ b/lighthouse-core/audits/accessibility/aria-allowed-attr.js @@ -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); diff --git a/lighthouse-core/audits/accessibility/aria-required-attr.js b/lighthouse-core/audits/accessibility/aria-required-attr.js index dabb0707126a..11806a531450 100644 --- a/lighthouse-core/audits/accessibility/aria-required-attr.js +++ b/lighthouse-core/audits/accessibility/aria-required-attr.js @@ -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); diff --git a/lighthouse-core/audits/accessibility/aria-required-children.js b/lighthouse-core/audits/accessibility/aria-required-children.js index 12f246b3b18f..cad716b9746f 100644 --- a/lighthouse-core/audits/accessibility/aria-required-children.js +++ b/lighthouse-core/audits/accessibility/aria-required-children.js @@ -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); diff --git a/lighthouse-core/audits/accessibility/aria-required-parent.js b/lighthouse-core/audits/accessibility/aria-required-parent.js index 6dc4e42371c2..78cc1567d02c 100644 --- a/lighthouse-core/audits/accessibility/aria-required-parent.js +++ b/lighthouse-core/audits/accessibility/aria-required-parent.js @@ -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); diff --git a/lighthouse-core/audits/accessibility/aria-roles.js b/lighthouse-core/audits/accessibility/aria-roles.js index af3a0a522a85..892eded097e4 100644 --- a/lighthouse-core/audits/accessibility/aria-roles.js +++ b/lighthouse-core/audits/accessibility/aria-roles.js @@ -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); diff --git a/lighthouse-core/audits/accessibility/aria-valid-attr-value.js b/lighthouse-core/audits/accessibility/aria-valid-attr-value.js index 45df1851f5c2..c5956d1fb1ab 100644 --- a/lighthouse-core/audits/accessibility/aria-valid-attr-value.js +++ b/lighthouse-core/audits/accessibility/aria-valid-attr-value.js @@ -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); diff --git a/lighthouse-core/audits/accessibility/aria-valid-attr.js b/lighthouse-core/audits/accessibility/aria-valid-attr.js index 40656b4adf9a..7eec95125013 100644 --- a/lighthouse-core/audits/accessibility/aria-valid-attr.js +++ b/lighthouse-core/audits/accessibility/aria-valid-attr.js @@ -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); diff --git a/lighthouse-core/audits/accessibility/audio-caption.js b/lighthouse-core/audits/accessibility/audio-caption.js index 64f0957fd08e..b694a983b993 100644 --- a/lighthouse-core/audits/accessibility/audio-caption.js +++ b/lighthouse-core/audits/accessibility/audio-caption.js @@ -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); diff --git a/lighthouse-core/audits/accessibility/button-name.js b/lighthouse-core/audits/accessibility/button-name.js index 745a6cac5bb3..df2a71efc6ba 100644 --- a/lighthouse-core/audits/accessibility/button-name.js +++ b/lighthouse-core/audits/accessibility/button-name.js @@ -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); diff --git a/lighthouse-core/audits/accessibility/bypass.js b/lighthouse-core/audits/accessibility/bypass.js index 829341c41ad8..c128c32f4d21 100644 --- a/lighthouse-core/audits/accessibility/bypass.js +++ b/lighthouse-core/audits/accessibility/bypass.js @@ -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); diff --git a/lighthouse-core/audits/accessibility/color-contrast.js b/lighthouse-core/audits/accessibility/color-contrast.js index 1f579c9cf4ee..e055ef9f96a2 100644 --- a/lighthouse-core/audits/accessibility/color-contrast.js +++ b/lighthouse-core/audits/accessibility/color-contrast.js @@ -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); diff --git a/lighthouse-core/audits/accessibility/definition-list.js b/lighthouse-core/audits/accessibility/definition-list.js index ca09a9f7d792..b7f31b6ac2aa 100644 --- a/lighthouse-core/audits/accessibility/definition-list.js +++ b/lighthouse-core/audits/accessibility/definition-list.js @@ -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); diff --git a/lighthouse-core/audits/accessibility/dlitem.js b/lighthouse-core/audits/accessibility/dlitem.js index 704a0f7e233f..3a0f91590ca5 100644 --- a/lighthouse-core/audits/accessibility/dlitem.js +++ b/lighthouse-core/audits/accessibility/dlitem.js @@ -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 (`
` and `
`) must be wrapped in a ' + 'parent `
` 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); diff --git a/lighthouse-core/audits/accessibility/duplicate-id.js b/lighthouse-core/audits/accessibility/duplicate-id.js index 9ae1d34818fc..078f9fad476b 100644 --- a/lighthouse-core/audits/accessibility/duplicate-id.js +++ b/lighthouse-core/audits/accessibility/duplicate-id.js @@ -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); diff --git a/lighthouse-core/audits/accessibility/frame-title.js b/lighthouse-core/audits/accessibility/frame-title.js index be18becd17d4..c9c2d55748d8 100644 --- a/lighthouse-core/audits/accessibility/frame-title.js +++ b/lighthouse-core/audits/accessibility/frame-title.js @@ -20,7 +20,7 @@ const UIStrings = { failureTitle: '`` or `