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

core: make bypass, th-has-data-cells, and video-caption informative #14453

Merged
merged 2 commits into from
Oct 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions cli/test/smokehouse/test-definitions/a11y.js
Original file line number Diff line number Diff line change
Expand Up @@ -331,12 +331,8 @@ const expectations = {
},
},
'bypass': {
score: 1,
details: {
type: 'table',
headings: [],
items: [],
},
score: null,
scoreDisplayMode: 'notApplicable',
},
'color-contrast': {
score: 0,
Expand Down
1 change: 1 addition & 0 deletions core/audits/accessibility/bypass.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ class Bypass extends AxeAudit {
title: str_(UIStrings.title),
failureTitle: str_(UIStrings.failureTitle),
description: str_(UIStrings.description),
scoreDisplayMode: AxeAudit.SCORING_MODES.INFORMATIVE,
requiredArtifacts: ['Accessibility'],
};
}
Expand Down
1 change: 1 addition & 0 deletions core/audits/accessibility/th-has-data-cells.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ class THHasDataCells extends AxeAudit {
title: str_(UIStrings.title),
failureTitle: str_(UIStrings.failureTitle),
description: str_(UIStrings.description),
scoreDisplayMode: AxeAudit.SCORING_MODES.INFORMATIVE,
requiredArtifacts: ['Accessibility'],
};
}
Expand Down
1 change: 1 addition & 0 deletions core/audits/accessibility/video-caption.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ class VideoCaption extends AxeAudit {
title: str_(UIStrings.title),
failureTitle: str_(UIStrings.failureTitle),
description: str_(UIStrings.description),
scoreDisplayMode: AxeAudit.SCORING_MODES.INFORMATIVE,
requiredArtifacts: ['Accessibility'],
};
}
Expand Down
33 changes: 9 additions & 24 deletions core/test/fixtures/fraggle-rock/reports/sample-flow-result.json
Original file line number Diff line number Diff line change
Expand Up @@ -2642,13 +2642,8 @@
"id": "bypass",
"title": "The page contains a heading, skip link, or landmark region",
"description": "Adding ways to bypass repetitive content lets keyboard users navigate the page more efficiently. [Learn more about bypass blocks](https://dequeuniversity.com/rules/axe/4.4/bypass).",
"score": 1,
"scoreDisplayMode": "binary",
"details": {
"type": "table",
"headings": [],
"items": []
}
"score": null,
"scoreDisplayMode": "notApplicable"
},
"color-contrast": {
"id": "color-contrast",
Expand Down Expand Up @@ -4146,7 +4141,7 @@
},
{
"id": "bypass",
"weight": 3,
"weight": 0,
"group": "a11y-navigation"
},
{
Expand Down Expand Up @@ -11282,13 +11277,8 @@
"id": "bypass",
"title": "The page contains a heading, skip link, or landmark region",
"description": "Adding ways to bypass repetitive content lets keyboard users navigate the page more efficiently. [Learn more about bypass blocks](https://dequeuniversity.com/rules/axe/4.4/bypass).",
"score": 1,
"scoreDisplayMode": "binary",
"details": {
"type": "table",
"headings": [],
"items": []
}
"score": null,
"scoreDisplayMode": "notApplicable"
},
"color-contrast": {
"id": "color-contrast",
Expand Down Expand Up @@ -12504,7 +12494,7 @@
},
{
"id": "bypass",
"weight": 3,
"weight": 0,
"group": "a11y-navigation"
},
{
Expand Down Expand Up @@ -16615,13 +16605,8 @@
"id": "bypass",
"title": "The page contains a heading, skip link, or landmark region",
"description": "Adding ways to bypass repetitive content lets keyboard users navigate the page more efficiently. [Learn more about bypass blocks](https://dequeuniversity.com/rules/axe/4.4/bypass).",
"score": 1,
"scoreDisplayMode": "binary",
"details": {
"type": "table",
"headings": [],
"items": []
}
"score": null,
"scoreDisplayMode": "notApplicable"
},
"color-contrast": {
"id": "color-contrast",
Expand Down Expand Up @@ -18288,7 +18273,7 @@
},
{
"id": "bypass",
"weight": 3,
"weight": 0,
"group": "a11y-navigation"
},
{
Expand Down
13 changes: 4 additions & 9 deletions core/test/results/sample_v2.json
Original file line number Diff line number Diff line change
Expand Up @@ -3552,13 +3552,8 @@
"id": "bypass",
"title": "The page contains a heading, skip link, or landmark region",
"description": "Adding ways to bypass repetitive content lets keyboard users navigate the page more efficiently. [Learn more about bypass blocks](https://dequeuniversity.com/rules/axe/4.4/bypass).",
"score": 1,
"scoreDisplayMode": "binary",
"details": {
"type": "table",
"headings": [],
"items": []
}
"score": null,
"scoreDisplayMode": "notApplicable"
},
"color-contrast": {
"id": "color-contrast",
Expand Down Expand Up @@ -6392,7 +6387,7 @@
},
{
"id": "bypass",
"weight": 3,
"weight": 0,
"group": "a11y-navigation"
},
{
Expand Down Expand Up @@ -6562,7 +6557,7 @@
}
],
"id": "accessibility",
"score": 0.78
"score": 0.77
},
"best-practices": {
"title": "Best Practices",
Expand Down
2 changes: 1 addition & 1 deletion report/test/generator/report-generator-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ describe('ReportGenerator', () => {

category,score
\\"performance\\",\\"0.26\\"
\\"accessibility\\",\\"0.78\\"
\\"accessibility\\",\\"0.77\\"
\\"best-practices\\",\\"0.27\\"
\\"seo\\",\\"0.67\\"
\\"pwa\\",\\"0.33\\"
Expand Down
2 changes: 1 addition & 1 deletion report/test/renderer/category-renderer-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ describe('CategoryRenderer', () => {
);

const gauge = categoryDOM.querySelector('.lh-fraction__content');
assert.equal(gauge.textContent.trim(), '13/18', 'fraction is included');
assert.equal(gauge.textContent.trim(), '12/17', 'fraction is included');

const score = categoryDOM.querySelector('.lh-category-header');
const title = score.querySelector('.lh-fraction__label');
Expand Down