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(a11y): disable target-size hidden audit #15854

Merged
merged 5 commits into from
Mar 6, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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
55 changes: 28 additions & 27 deletions cli/test/smokehouse/test-definitions/a11y.js
Original file line number Diff line number Diff line change
Expand Up @@ -930,33 +930,34 @@ const expectations = {
],
},
},
'target-size': {
score: 1,
details: {
items: [
{
node: {
'type': 'node',
'selector': 'body > section > button#target-size-1',
'snippet': '<button id="target-size-1">',
// Exact target size can vary depending on the device.
'explanation': /^Fix any of the following:\n {2}Target has insufficient size \([0-9.]+px by [0-9.]+px, should be at least 24px by 24px\)\n {2}Target has insufficient space to its closest neighbors. Safe clickable space has a diameter of [0-9.]+px instead of at least 24px\.$/,
'nodeLabel': '+',
},
},
{
node: {
'type': 'node',
'selector': 'body > section > span#target-size-2',
'snippet': '<span role="button" tabindex="0" id="target-size-2">',
// Exact target size can vary depending on the device.
'explanation': /^Fix any of the following:\n {2}Target has insufficient size \([0-9.]+px by [0-9.]+px, should be at least 24px by 24px\)\n {2}Target has insufficient space to its closest neighbors. Safe clickable space has a diameter of [0-9.]+px instead of at least 24px\.$/,
'nodeLabel': 'o',
},
},
],
},
},
// TODO: https://github.com/GoogleChrome/lighthouse/issues/15824
// 'target-size': {
// score: 1,
// details: {
// items: [
// {
// node: {
// 'type': 'node',
// 'selector': 'body > section > button#target-size-1',
// 'snippet': '<button id="target-size-1">',
// // Exact target size can vary depending on the device.
// 'explanation': /^Fix any of the following:\n {2}Target has insufficient size \([0-9.]+px by [0-9.]+px, should be at least 24px by 24px\)\n {2}Target has insufficient space to its closest neighbors. Safe clickable space has a diameter of [0-9.]+px instead of at least 24px\.$/,
// 'nodeLabel': '+',
// },
// },
// {
// node: {
// 'type': 'node',
// 'selector': 'body > section > span#target-size-2',
// 'snippet': '<span role="button" tabindex="0" id="target-size-2">',
// // Exact target size can vary depending on the device.
// 'explanation': /^Fix any of the following:\n {2}Target has insufficient size \([0-9.]+px by [0-9.]+px, should be at least 24px by 24px\)\n {2}Target has insufficient space to its closest neighbors. Safe clickable space has a diameter of [0-9.]+px instead of at least 24px\.$/,
// 'nodeLabel': 'o',
// },
// },
// ],
// },
// },
'td-has-header': {
score: 0,
details: {
Expand Down
6 changes: 4 additions & 2 deletions core/config/default-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,8 @@ const defaultConfig = {
'accessibility/tabindex',
'accessibility/table-duplicate-name',
'accessibility/table-fake-caption',
'accessibility/target-size',
// TODO: https://github.com/GoogleChrome/lighthouse/issues/15824
// 'accessibility/target-size',
'accessibility/td-has-header',
'accessibility/td-headers-attr',
'accessibility/th-has-data-cells',
Expand Down Expand Up @@ -586,7 +587,8 @@ const defaultConfig = {
{id: 'empty-heading', weight: 0, group: 'hidden'},
{id: 'identical-links-same-purpose', weight: 0, group: 'hidden'},
{id: 'landmark-one-main', weight: 0, group: 'hidden'},
{id: 'target-size', weight: 0, group: 'hidden'},
// TODO: https://github.com/GoogleChrome/lighthouse/issues/15824
// {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'},
Expand Down
3 changes: 2 additions & 1 deletion core/gather/gatherers/accessibility.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ async function runA11yChecks() {
'tabindex': {enabled: true},
'table-duplicate-name': {enabled: true},
'table-fake-caption': {enabled: true},
'target-size': {enabled: true},
// TODO: https://github.com/GoogleChrome/lighthouse/issues/15824
// 'target-size': {enabled: true},
'td-has-header': {enabled: true},
},
});
Expand Down
Loading
Loading