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(target-size): use binary display mode #15910

Merged
merged 3 commits into from
Apr 3, 2024
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
2 changes: 1 addition & 1 deletion cli/test/smokehouse/test-definitions/a11y.js
Original file line number Diff line number Diff line change
Expand Up @@ -900,7 +900,7 @@ const expectations = {
},
},
'target-size': {
score: 1,
score: 0,
details: {
items: [
{
Expand Down
1 change: 0 additions & 1 deletion core/audits/accessibility/target-size.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ class TargetSize 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: 24 additions & 9 deletions core/test/fixtures/user-flows/reports/sample-flow-result.json
Original file line number Diff line number Diff line change
Expand Up @@ -2701,8 +2701,13 @@
"id": "target-size",
"title": "Touch targets have sufficient size and spacing.",
"description": "Touch targets with sufficient size and spacing help users who may have difficulty targeting small controls to activate the targets. [Learn more about touch targets](https://dequeuniversity.com/rules/axe/4.9/target-size).",
"score": null,
"scoreDisplayMode": "notApplicable"
"score": 1,
"scoreDisplayMode": "binary",
"details": {
"type": "table",
"headings": [],
"items": []
}
},
"td-has-header": {
"id": "td-has-header",
Expand Down Expand Up @@ -4365,7 +4370,7 @@
},
{
"id": "target-size",
"weight": 0,
"weight": 7,
"group": "a11y-best-practices"
},
{
Expand Down Expand Up @@ -14467,8 +14472,13 @@
"id": "target-size",
"title": "Touch targets have sufficient size and spacing.",
"description": "Touch targets with sufficient size and spacing help users who may have difficulty targeting small controls to activate the targets. [Learn more about touch targets](https://dequeuniversity.com/rules/axe/4.9/target-size).",
"score": null,
"scoreDisplayMode": "notApplicable"
"score": 1,
"scoreDisplayMode": "binary",
"details": {
"type": "table",
"headings": [],
"items": []
}
},
"td-has-header": {
"id": "td-has-header",
Expand Down Expand Up @@ -15253,7 +15263,7 @@
},
{
"id": "target-size",
"weight": 0,
"weight": 7,
"group": "a11y-best-practices"
},
{
Expand Down Expand Up @@ -20347,8 +20357,13 @@
"id": "target-size",
"title": "Touch targets have sufficient size and spacing.",
"description": "Touch targets with sufficient size and spacing help users who may have difficulty targeting small controls to activate the targets. [Learn more about touch targets](https://dequeuniversity.com/rules/axe/4.9/target-size).",
"score": null,
"scoreDisplayMode": "notApplicable"
"score": 1,
"scoreDisplayMode": "binary",
"details": {
"type": "table",
"headings": [],
"items": []
}
},
"td-has-header": {
"id": "td-has-header",
Expand Down Expand Up @@ -22081,7 +22096,7 @@
},
{
"id": "target-size",
"weight": 0,
"weight": 7,
"group": "a11y-best-practices"
},
{
Expand Down
13 changes: 9 additions & 4 deletions core/test/results/sample_v2.json
Original file line number Diff line number Diff line change
Expand Up @@ -4037,8 +4037,13 @@
"id": "target-size",
"title": "Touch targets have sufficient size and spacing.",
"description": "Touch targets with sufficient size and spacing help users who may have difficulty targeting small controls to activate the targets. [Learn more about touch targets](https://dequeuniversity.com/rules/axe/4.9/target-size).",
"score": null,
"scoreDisplayMode": "notApplicable"
"score": 1,
"scoreDisplayMode": "binary",
"details": {
"type": "table",
"headings": [],
"items": []
}
},
"td-has-header": {
"id": "td-has-header",
Expand Down Expand Up @@ -6452,7 +6457,7 @@
},
{
"id": "target-size",
"weight": 0,
"weight": 7,
"group": "a11y-best-practices"
},
{
Expand Down Expand Up @@ -6547,7 +6552,7 @@
}
],
"id": "accessibility",
"score": 0.77
"score": 0.78
},
"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 @@ -107,7 +107,7 @@ describe('ReportGenerator', () => {
category,score
\\"performance\\",\\"0.28\\"
\\"accessibility\\",\\"0.77\\"
\\"accessibility\\",\\"0.78\\"
\\"best-practices\\",\\"0.35\\"
\\"seo\\",\\"0.73\\"
\\"pwa\\",\\"0.38\\"
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 @@ -304,7 +304,7 @@ describe('CategoryRenderer', () => {
);

const gauge = categoryDOM.querySelector('.lh-fraction__content');
assert.equal(gauge.textContent.trim(), '19/24', 'fraction is included');
assert.equal(gauge.textContent.trim(), '20/25', 'fraction is included');

const score = categoryDOM.querySelector('.lh-category-header');
const title = score.querySelector('.lh-fraction__label');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ describe('Snapshot', function() {
'document-title',
'html-has-lang',
'label',
'target-size',
'meta-description',
]);

Expand Down
Loading