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

feat(target-size-automation): adding target size to the needs-review rules #7330

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
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
10 changes: 10 additions & 0 deletions src/common/components/cards/rich-resolution-content.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,16 @@ export const RichResolutionContent = NamedFC<RichResolutionContentProps>(
</span>
);
}
case 'web/target-size': {
return (
<div>
Targets must be at least 24 by 24 CSS pixels in size or a target must have a
24 by 24 CSS pixel spacing circle that does not intersect with another
target of any size. Check all targets and be sure they have sufficient size
or spacing from another target.
</div>
);
}
default: {
throw new Error(
`Cannot render RichResolutionContent with unrecognized contentId ${contentId}`,
Expand Down
1 change: 1 addition & 0 deletions src/scanner/get-rule-inclusions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ export const needsReviewRules = [
'th-has-data-cells',
'label-content-name-mismatch',
'p-as-heading',
'target-size',
];

export const getNeedsReviewRulesConfig: () => DictionaryStringTo<RuleIncluded> = () => {
Expand Down
1 change: 1 addition & 0 deletions src/tests/unit/tests/common/self-fast-pass.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ describe('SelfFastPass', () => {
'th-has-data-cells',
'label-content-name-mismatch',
'p-as-heading',
'target-size',
],
},
It.isAny(),
Expand Down
Loading