From 4f0e0d5b5bca104a6b3ea51406b1e18c3bea7f9b Mon Sep 17 00:00:00 2001 From: Adam Raine <6752989+adamraine@users.noreply.github.com> Date: Tue, 17 Oct 2023 09:52:54 -0700 Subject: [PATCH] core(accessibility): hide experimental axe rules (#15543) --- core/config/default-config.js | 6 +- .../reports/sample-flow-result.json | 92 +++++++++---------- core/test/results/sample_v2.json | 32 +++---- .../test/generator/report-generator-test.js | 2 +- .../test/renderer/category-renderer-test.js | 2 +- 5 files changed, 67 insertions(+), 67 deletions(-) diff --git a/core/config/default-config.js b/core/config/default-config.js index be85c1ee1682..804507abda3a 100644 --- a/core/config/default-config.js +++ b/core/config/default-config.js @@ -549,7 +549,6 @@ const defaultConfig = { {id: 'image-redundant-alt', weight: 1, group: 'a11y-names-labels'}, {id: 'input-button-name', weight: 10, group: 'a11y-names-labels'}, {id: 'input-image-alt', weight: 10, group: 'a11y-names-labels'}, - {id: 'label-content-name-mismatch', weight: 7, group: 'a11y-names-labels'}, {id: 'label', weight: 7, group: 'a11y-names-labels'}, {id: 'link-in-text-block', weight: 7, group: 'a11y-color-contrast'}, {id: 'link-name', weight: 7, group: 'a11y-names-labels'}, @@ -562,8 +561,6 @@ const defaultConfig = { {id: 'skip-link', weight: 3, group: 'a11y-names-labels'}, {id: 'tabindex', weight: 7, group: 'a11y-navigation'}, {id: 'table-duplicate-name', weight: 1, group: 'a11y-tables-lists'}, - {id: 'table-fake-caption', weight: 7, group: 'a11y-tables-lists'}, - {id: 'td-has-header', weight: 10, group: 'a11y-tables-lists'}, {id: 'td-headers-attr', weight: 7, group: 'a11y-tables-lists'}, {id: 'th-has-data-cells', weight: 7, group: 'a11y-tables-lists'}, {id: 'valid-lang', weight: 7, group: 'a11y-language'}, @@ -584,6 +581,9 @@ const defaultConfig = { {id: 'identical-links-same-purpose', weight: 0, group: 'hidden'}, {id: 'landmark-one-main', weight: 0, group: 'hidden'}, {id: 'target-size', weight: 0, group: 'hidden'}, + {id: 'label-content-name-mismatch', weight: 0, group: 'hidden'}, + {id: 'table-fake-caption', weight: 0, group: 'hidden'}, + {id: 'td-has-header', weight: 0, group: 'hidden'}, ], }, 'best-practices': { diff --git a/core/test/fixtures/user-flows/reports/sample-flow-result.json b/core/test/fixtures/user-flows/reports/sample-flow-result.json index 2f685e25ae0e..40a140c42759 100644 --- a/core/test/fixtures/user-flows/reports/sample-flow-result.json +++ b/core/test/fixtures/user-flows/reports/sample-flow-result.json @@ -4279,11 +4279,6 @@ "weight": 0, "group": "a11y-names-labels" }, - { - "id": "label-content-name-mismatch", - "weight": 7, - "group": "a11y-names-labels" - }, { "id": "label", "weight": 7, @@ -4344,16 +4339,6 @@ "weight": 1, "group": "a11y-tables-lists" }, - { - "id": "table-fake-caption", - "weight": 7, - "group": "a11y-tables-lists" - }, - { - "id": "td-has-header", - "weight": 10, - "group": "a11y-tables-lists" - }, { "id": "td-headers-attr", "weight": 0, @@ -4433,6 +4418,21 @@ "id": "target-size", "weight": 0, "group": "hidden" + }, + { + "id": "label-content-name-mismatch", + "weight": 0, + "group": "hidden" + }, + { + "id": "table-fake-caption", + "weight": 0, + "group": "hidden" + }, + { + "id": "td-has-header", + "weight": 0, + "group": "hidden" } ], "id": "accessibility", @@ -15050,11 +15050,6 @@ "weight": 0, "group": "a11y-names-labels" }, - { - "id": "label-content-name-mismatch", - "weight": 7, - "group": "a11y-names-labels" - }, { "id": "label", "weight": 7, @@ -15115,16 +15110,6 @@ "weight": 1, "group": "a11y-tables-lists" }, - { - "id": "table-fake-caption", - "weight": 7, - "group": "a11y-tables-lists" - }, - { - "id": "td-has-header", - "weight": 10, - "group": "a11y-tables-lists" - }, { "id": "td-headers-attr", "weight": 0, @@ -15204,6 +15189,21 @@ "id": "target-size", "weight": 0, "group": "hidden" + }, + { + "id": "label-content-name-mismatch", + "weight": 0, + "group": "hidden" + }, + { + "id": "table-fake-caption", + "weight": 0, + "group": "hidden" + }, + { + "id": "td-has-header", + "weight": 0, + "group": "hidden" } ], "id": "accessibility", @@ -21903,11 +21903,6 @@ "weight": 0, "group": "a11y-names-labels" }, - { - "id": "label-content-name-mismatch", - "weight": 7, - "group": "a11y-names-labels" - }, { "id": "label", "weight": 7, @@ -21968,16 +21963,6 @@ "weight": 1, "group": "a11y-tables-lists" }, - { - "id": "table-fake-caption", - "weight": 7, - "group": "a11y-tables-lists" - }, - { - "id": "td-has-header", - "weight": 10, - "group": "a11y-tables-lists" - }, { "id": "td-headers-attr", "weight": 0, @@ -22057,10 +22042,25 @@ "id": "target-size", "weight": 0, "group": "hidden" + }, + { + "id": "label-content-name-mismatch", + "weight": 0, + "group": "hidden" + }, + { + "id": "table-fake-caption", + "weight": 0, + "group": "hidden" + }, + { + "id": "td-has-header", + "weight": 0, + "group": "hidden" } ], "id": "accessibility", - "score": 0.96 + "score": 0.95 }, "best-practices": { "title": "Best Practices", diff --git a/core/test/results/sample_v2.json b/core/test/results/sample_v2.json index e44bd62c5380..c71dfb5ef0d5 100644 --- a/core/test/results/sample_v2.json +++ b/core/test/results/sample_v2.json @@ -6375,11 +6375,6 @@ "weight": 0, "group": "a11y-names-labels" }, - { - "id": "label-content-name-mismatch", - "weight": 7, - "group": "a11y-names-labels" - }, { "id": "label", "weight": 7, @@ -6440,16 +6435,6 @@ "weight": 1, "group": "a11y-tables-lists" }, - { - "id": "table-fake-caption", - "weight": 7, - "group": "a11y-tables-lists" - }, - { - "id": "td-has-header", - "weight": 10, - "group": "a11y-tables-lists" - }, { "id": "td-headers-attr", "weight": 0, @@ -6529,10 +6514,25 @@ "id": "target-size", "weight": 0, "group": "hidden" + }, + { + "id": "label-content-name-mismatch", + "weight": 0, + "group": "hidden" + }, + { + "id": "table-fake-caption", + "weight": 0, + "group": "hidden" + }, + { + "id": "td-has-header", + "weight": 0, + "group": "hidden" } ], "id": "accessibility", - "score": 0.8 + "score": 0.77 }, "best-practices": { "title": "Best Practices", diff --git a/report/test/generator/report-generator-test.js b/report/test/generator/report-generator-test.js index 81c92c1123ad..bd2fb27ba55e 100644 --- a/report/test/generator/report-generator-test.js +++ b/report/test/generator/report-generator-test.js @@ -107,7 +107,7 @@ describe('ReportGenerator', () => { category,score \\"performance\\",\\"0.28\\" -\\"accessibility\\",\\"0.8\\" +\\"accessibility\\",\\"0.77\\" \\"best-practices\\",\\"0.18\\" \\"seo\\",\\"0.67\\" \\"pwa\\",\\"0.38\\" diff --git a/report/test/renderer/category-renderer-test.js b/report/test/renderer/category-renderer-test.js index d89333f18e1e..001065a55b0a 100644 --- a/report/test/renderer/category-renderer-test.js +++ b/report/test/renderer/category-renderer-test.js @@ -301,7 +301,7 @@ describe('CategoryRenderer', () => { ); const gauge = categoryDOM.querySelector('.lh-fraction__content'); - assert.equal(gauge.textContent.trim(), '22/27', 'fraction is included'); + assert.equal(gauge.textContent.trim(), '19/24', 'fraction is included'); const score = categoryDOM.querySelector('.lh-category-header'); const title = score.querySelector('.lh-fraction__label');