Skip to content

Commit 1eac6e0

Browse files
madalynrosemadalynrose
andauthored
feat(medium-pass-2): Add "why it matters" content for quick assess requirements (#6317)
#### Details This PR adds content that will appear in the "Why it matters" gray box for Quick Assess requirements. ##### Motivation Feature work 🚀 ##### Context This PR just adds the new content. A later PR will display this content for quick assess requirements. #### Pull request checklist <!-- If a checklist item is not applicable to this change, write "n/a" in the checkbox --> - [n/a] Addresses an existing issue: #0000 - [x] Ran `yarn fastpass` - [x] Added/updated relevant unit test(s) (and ran `yarn test`) - [x] Verified code coverage for the changes made. Check coverage report at: `<rootDir>/test-results/unit/coverage` - [x] PR title *AND* final merge commit title both start with a semantic tag (`fix:`, `chore:`, `feat(feature-name):`, `refactor:`). See `CONTRIBUTING.md`. - [n/a] (UI changes only) Added screenshots/GIFs to description above - [n/a] (UI changes only) Verified usability with NVDA/JAWS Co-authored-by: madalynrose <madparker@microsoft.com>
1 parent 7f63c54 commit 1eac6e0

File tree

21 files changed

+116
-20
lines changed

21 files changed

+116
-20
lines changed

src/assessments/types/requirement.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ export interface Requirement {
3333
howToTest: JSX.Element;
3434
addFailureInstruction?: string;
3535
infoAndExamples?: ContentPageComponent;
36+
whyItMatters?: ContentPageComponent;
37+
helpfulResourceLinks?: HyperlinkDefinition[];
3638
isManual: boolean;
3739
// This is for semi-manual cases where we can't present a list of instances like an assisted
3840
// test would, but can infer a PASS or FAIL state. If not specified, acts like () => UNKNOWN.

src/content/test/adaptable-content/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import * as contrast from './contrast';
44
import { guidance } from './guidance';
55
import * as hoverFocusContent from './hover-focus-content';
66
import * as orientation from './orientation';
7-
import * as reflow from './reflow';
7+
import { infoAndExamples as reflow } from './reflow';
88
import * as resizeText from './resize-text';
99
import * as textSpacing from './text-spacing';
1010

src/content/test/adaptable-content/reflow.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@
22
// Licensed under the MIT License.
33
import { create, React } from '../../common';
44

5+
export const whyItMatters = create(() => (
6+
<p>
7+
Having to scroll in two directions is difficult for everyone. Having to scroll in the direction of reading makes reading especially
8+
difficult for people with certain disabilities, including people with low vision, who are more likely to need enlarged text in a
9+
single column as well as people with reading disabilities that make it difficult to visually track long lines of text. It also
10+
impacts people with motor disabilities who find scrolling difficult on the webpage.
11+
</p>
12+
));
13+
514
export const infoAndExamples = create(({ Markup }) => (
615
<>
716
<p>Content must be visible without having to scroll both vertically and horizontally.</p>

src/content/test/contrast/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import * as graphics from './graphics';
44
import { guidance } from './guidance';
55
import * as stateChanges from './state-changes';
6-
import * as uiComponents from './ui-components';
6+
import { infoAndExamples as uiComponents } from './ui-components';
77

88
export const contrast = {
99
guidance,

src/content/test/contrast/ui-components.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22
// Licensed under the MIT License.
33
import { create, React } from '../../common';
44

5+
export const whyItMatters = create(({ Link }) => (
6+
<p>
7+
Most people find it easier to see and use UI Components when they have sufficient contrast against the background. People with low
8+
vision, limited color perception, or <Link.Presbyopia /> are especially likely to struggle with controls when contrast is too low.
9+
</p>
10+
));
11+
512
export const infoAndExamples = create(({ Markup, Link }) => (
613
<>
714
<p>Visual information used to indicate states and boundaries of active UI Components must have sufficient contrast.</p>

src/content/test/focus/focus-order.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@
22
// Licensed under the MIT License.
33
import { create, React } from '../../common';
44

5+
export const whyItMatters = create(() => (
6+
<p>
7+
When users navigate through a web page, they expect to encounter controls and other content in an order that makes sense and makes
8+
it easy to use the page's functionality. Poor focus order can be disorienting to people who use screen readers or screen magnifiers
9+
and to people with reading disorders. Poor focus order can also make it difficult or even painful for people who use keyboards
10+
because of mobility impairments.
11+
</p>
12+
));
13+
514
export const infoAndExamples = create(({ Markup }) => (
615
<>
716
<p>Components must receive focus in an order that preserves meaning and operability.</p>

src/content/test/focus/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright (c) Microsoft Corporation. All rights reserved.
22
// Licensed under the MIT License.
33
import * as closingContent from './closing-content';
4-
import * as focusOrder from './focus-order';
4+
import { infoAndExamples as focusOrder } from './focus-order';
55
import { guidance } from './guidance';
66
import * as modalDialogs from './modal-dialogs';
77
import * as revealingContent from './revealing-content';

src/content/test/headings/heading-level.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22
// Licensed under the MIT License.
33
import { create, React } from '../../common';
44

5+
export const whyItMatters = create(() => (
6+
<p>
7+
Heading levels communicate the relative importance of headings within a page. People with good vision can infer heading levels
8+
through visual cues—higher-level headings typically have greater visual prominence than lower-level headings. Users of assistive
9+
technology rely on programmatic cues to perceive heading levels.
10+
</p>
11+
));
12+
513
export const infoAndExamples = create(({ Markup, Link }) => (
614
<>
715
<p>A heading's programmatic level must match the level that's presented visually.</p>

src/content/test/headings/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
// Licensed under the MIT License.
33
import { guidance } from './guidance';
44
import * as headingFunction from './heading-function';
5-
import * as headingLevel from './heading-level';
6-
import * as noMissingHeadings from './no-missing-headings';
5+
import { infoAndExamples as headingLevel } from './heading-level';
6+
import { infoAndExamples as noMissingHeadings } from './no-missing-headings';
77

88
export const headings = {
99
guidance,

src/content/test/headings/no-missing-headings.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22
// Licensed under the MIT License.
33
import { create, React } from '../../common';
44

5+
export const whyItMatters = create(() => (
6+
<p>
7+
People with good vision can quickly scan a page to identify headings based solely on their appearance, such as large or bold font,
8+
preceding white space, or indentation. Users of assistive technologies can't find headings that aren't properly coded.
9+
</p>
10+
));
11+
512
export const infoAndExamples = create(({ Markup, Link }) => (
613
<>
714
<p>Text that looks like a heading must be coded as a heading.</p>

0 commit comments

Comments
 (0)