From 480cf2199af9251a07d9772177ded6fcf52499fc Mon Sep 17 00:00:00 2001 From: JGibson2019 Date: Thu, 9 May 2024 14:46:42 -0500 Subject: [PATCH 1/4] adding target size to the needs-review rules --- src/scanner/get-rule-inclusions.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/scanner/get-rule-inclusions.ts b/src/scanner/get-rule-inclusions.ts index 3bfc153b1a1..7cad3e9d516 100644 --- a/src/scanner/get-rule-inclusions.ts +++ b/src/scanner/get-rule-inclusions.ts @@ -61,6 +61,7 @@ export const needsReviewRules = [ 'th-has-data-cells', 'label-content-name-mismatch', 'p-as-heading', + 'target-size', ]; export const getNeedsReviewRulesConfig: () => DictionaryStringTo = () => { From af2451b023d6a9f4e73d50f936b1e2c2d83dcc03 Mon Sep 17 00:00:00 2001 From: JGibson2019 Date: Thu, 9 May 2024 15:25:32 -0500 Subject: [PATCH 2/4] updated the self-fast-pass test file with the new needs review rule --- src/tests/unit/tests/common/self-fast-pass.test.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/tests/unit/tests/common/self-fast-pass.test.ts b/src/tests/unit/tests/common/self-fast-pass.test.ts index b8a47d5acc6..db6b4166b6f 100644 --- a/src/tests/unit/tests/common/self-fast-pass.test.ts +++ b/src/tests/unit/tests/common/self-fast-pass.test.ts @@ -74,6 +74,7 @@ describe('SelfFastPass', () => { 'th-has-data-cells', 'label-content-name-mismatch', 'p-as-heading', + 'target-size', ], }, It.isAny(), From b51e830739e3599a05a03ce53139ac1582e1795c Mon Sep 17 00:00:00 2001 From: JGibson2019 Date: Thu, 16 May 2024 11:41:55 -0500 Subject: [PATCH 3/4] added how to check guidance for needs review rule --- .../components/cards/rich-resolution-content.tsx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/common/components/cards/rich-resolution-content.tsx b/src/common/components/cards/rich-resolution-content.tsx index 90bb764c2d4..c8c2fbcb5ec 100644 --- a/src/common/components/cards/rich-resolution-content.tsx +++ b/src/common/components/cards/rich-resolution-content.tsx @@ -108,6 +108,16 @@ export const RichResolutionContent = NamedFC( ); } + case 'web/target-size': { + return ( +
+ 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. +
+ ); + } default: { throw new Error( `Cannot render RichResolutionContent with unrecognized contentId ${contentId}`, From 3ad9a5ea0c19d9462224870d802c2e783678bd91 Mon Sep 17 00:00:00 2001 From: JGibson2019 Date: Thu, 16 May 2024 11:46:30 -0500 Subject: [PATCH 4/4] formatting fix --- src/common/components/cards/rich-resolution-content.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/common/components/cards/rich-resolution-content.tsx b/src/common/components/cards/rich-resolution-content.tsx index c8c2fbcb5ec..8a32d4e1cbb 100644 --- a/src/common/components/cards/rich-resolution-content.tsx +++ b/src/common/components/cards/rich-resolution-content.tsx @@ -111,9 +111,9 @@ export const RichResolutionContent = NamedFC( case 'web/target-size': { return (
- 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 + 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.
);