Skip to content

Commit

Permalink
Add consistent help assessment.
Browse files Browse the repository at this point in the history
  • Loading branch information
codeofdusk committed Oct 26, 2023
1 parent d4def81 commit 13d96a5
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/assessments/repetitive-content/assessment.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { test as content } from 'content/test';
import * as React from 'react';
import { AssessmentBuilder } from '../assessment-builder';
import { BypassBlocks } from './test-steps/bypass-blocks';
import { ConsistentHelp } from './test-steps/consistent-help';
import { ConsistentIdentification } from './test-steps/consistent-identification';
import { ConsistentNavigation } from './test-steps/consistent-navigation';

Expand All @@ -32,5 +33,5 @@ export const RepetitiveContentAssessment = AssessmentBuilder.Manual({
gettingStarted: gettingStartedText,
title,
guidance,
requirements: [BypassBlocks, ConsistentNavigation, ConsistentIdentification],
requirements: [BypassBlocks, ConsistentNavigation, ConsistentIdentification, ConsistentHelp],
});
64 changes: 64 additions & 0 deletions src/assessments/repetitive-content/test-steps/consistent-help.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
import { link } from 'content/link';
import * as content from 'content/test/repetitive-content/consistent-help';
import * as React from 'react';
import { ManualTestRecordYourResults } from '../../common/manual-test-record-your-results';
import { Requirement } from '../../types/requirement';
import { RepetitiveContentTestStep } from './test-steps';

const consistentHelpDescription: JSX.Element = (
<span>
Ensure help – or mechanism(s) to request help – are consistently located in the same
relative location across a{' '}
<a href="https://w3c.github.io/wcag/guidelines/#dfn-set-of-web-pages">
set of web pages/screens
</a>
.
</span>
);

const consistentHelpHowToTest: JSX.Element = (
<div>
<blockquote>
<p>
<em>Note: this criterion does not require help to be provided.</em>
</p>
</blockquote>
<ol>
<li>
<p>
Examine the target page to identify "help" mechanisms (for example links to
help, etc.) on the page. Determine if this is a set of web pages with blocks of
content that are repeated on multiple pages.
</p>
</li>
<li>
<p>
Verify that all helpful information and mechanisms provided are consistent with
other pages in terms of location, behavior and relative to the other content of
the page &amp; UI for all components where help resides.
</p>
</li>
<ManualTestRecordYourResults isMultipleFailurePossible={true} />
</ol>
<p>
<em>Exemption</em>:{' '}
<em>
The location of a help mechanism can change based on user input, for example
resizing of the window that changes the location of the help link – this would still
pass this rule.
</em>
</p>
</div>
);

export const ConsistentHelp: Requirement = {
key: RepetitiveContentTestStep.consistentHelp,
name: 'Consistent help',
description: consistentHelpDescription,
howToTest: consistentHelpHowToTest,
isManual: true,
guidanceLinks: [link.WCAG_3_2_6],
...content,
};
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ export enum RepetitiveContentTestStep {
bypassBlocks = 'bypassBlocks',
consistentNavigation = 'consistentNavigation',
consistentIdentification = 'consistentIdentification',
consistentHelp = 'consistentHelp',
}

0 comments on commit 13d96a5

Please sign in to comment.