This repository has been archived by the owner on Jan 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 327
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1499 from hashicorp/ui-a11y-updates
UI: Fix most a11y violations, modernize a11y testing setup
- Loading branch information
Showing
15 changed files
with
233 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
<SvgPatterns /> | ||
<Header /> | ||
|
||
<section id="page"> | ||
<main id="page"> | ||
{{outlet}} | ||
</section> | ||
</main> | ||
|
||
<AppFooter/> | ||
<Notifications/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { ContextObject, RunOptions } from 'axe-core'; | ||
import { setupGlobalA11yHooks, setEnableA11yAudit, setRunOptions } from 'ember-a11y-testing/test-support'; | ||
|
||
// ember-a11y-testing allows us to pass `include` and `exclude` context | ||
// parameters as run options. This isn’t documented, and isn’t represented in | ||
// the type defintions but you can see it’s covered by the test suite here: | ||
// https://github.com/ember-a11y/ember-a11y-testing/blob/v4.0.7/tests/acceptance/a11y-audit-test.ts | ||
// | ||
// This reassures TypeScript that `include` and `exclude` are acceptable. | ||
type OptionsWithContext = RunOptions & ContextObject; | ||
|
||
// Selectors of elements to exclude from a11y auditing. See the following docs | ||
// for more: | ||
// https://github.com/dequelabs/axe-core/blob/develop/doc/API.md#include-exclude-object | ||
const exclude = [['.pds-logomark'], ['.pds-tabNav'], ['.card-header']]; | ||
|
||
export function setup(): void { | ||
setupGlobalA11yHooks(() => true); | ||
setEnableA11yAudit(true); | ||
setRunOptions({ exclude } as OptionsWithContext); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.