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 3 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
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