-
Notifications
You must be signed in to change notification settings - Fork 174
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 #2138 from uswds/al-prototype-a11y
USWDS-Site - Accessibility test checklist page
- Loading branch information
Showing
40 changed files
with
1,476 additions
and
67 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
permalink: /components/accordion/checklist/ | ||
layout: styleguide | ||
component: | ||
name: accordion | ||
title: Accordion accessibility tests | ||
category: Components | ||
lead: Any USWDS accordion should pass these manual accessibility tests. | ||
changelog: | ||
key: 'component-accordion-checklist' | ||
--- | ||
|
||
{% include accessibility-tests/index.html %} |
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,3 +1,6 @@ | ||
- **Code header areas in the accordion as buttons.** Using a `<button type="button">` assures accordions are usable with both screen readers and keyboards. | ||
- **Use meaningful expansion button labels.** Aim for informative labels like “Explore federal compliance checklists” rather than vague ones like “Click here.” | ||
- **Use `aria-controls` to associate an accordion button with its related content.** Connect an accordion button control with its appropriate content region by referencing the controlled element’s `id` in the button's `aria-controls` attribute. | ||
- **Use unique ids.** Each button has a unique name, `aria-controls="[id]"`, that associates the control with the appropriate region by referencing the controlled element’s `id`. | ||
- **Accordions use javascript to set the `hidden` values of their content areas.** Each content area will have its `hidden` attribute set by the component, depending on its corresponding button’s `aria-expanded` attribute. To ensure your content is accessible in the event that the JavaScript does not load or is disabled, you should not manually set `hidden` on any of your content areas. | ||
- **You do not need to add text alternatives for the collapsed and expanded accordion states.** These states are set programmatically with JavaScript. |
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,13 @@ | ||
--- | ||
permalink: /components/button/checklist/ | ||
layout: styleguide | ||
component: | ||
name: button | ||
title: Button accessibility tests | ||
category: Components | ||
lead: Any USWDS button should pass these manual accessibility tests. | ||
changelog: | ||
key: 'component-button-checklist' | ||
--- | ||
|
||
{% include accessibility-tests/index.html %} |
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,13 @@ | ||
--- | ||
permalink: /components/link/checklist/ | ||
layout: styleguide | ||
component: | ||
name: link | ||
title: Link accessibility tests | ||
category: Components | ||
lead: Any USWDS link should pass these manual accessibility tests. | ||
changelog: | ||
key: 'component-link-checklist' | ||
--- | ||
|
||
{% include accessibility-tests/index.html %} |
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,9 @@ | ||
title: Accordion checklist | ||
type: component | ||
changelogURL: | ||
items: | ||
- date: 2024-01-17 | ||
summary: Added accessibility tests page. | ||
affectsGuidance: true | ||
githubPr: 2138 | ||
githubRepo: uswds-site |
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,9 @@ | ||
title: Button checklist | ||
type: component | ||
changelogURL: | ||
items: | ||
- date: 2024-01-17 | ||
summary: Added accessibility tests page. | ||
affectsGuidance: true | ||
githubPr: 2138 | ||
githubRepo: uswds-site |
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,9 @@ | ||
title: Link checklist | ||
type: component | ||
changelogURL: | ||
items: | ||
- date: 2024-01-17 | ||
summary: Added accessibility tests page. | ||
affectsGuidance: true | ||
githubPr: 2138 | ||
githubRepo: uswds-site |
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,62 @@ | ||
# Creating checklists | ||
|
||
## Available data keys | ||
|
||
| Key | Description | Optional | Value type | Standard values | Displayed | | ||
| :------------------ | :--------------------------------------- | -------- | ---------- | -------------------------------------- | --------- | | ||
| title | Component name | no | string | N/A | No | | ||
| component_status | WCAG status for entire component | no | string | pass, fail | Yes | | ||
| summary | Short description of the test | no | string | N/A | yes | | ||
| summary_additional | Additional description of the test | no | string | N/A | yes | | ||
| test_status | Outcome of the individual test | no | string | pass, fail, conditional, exception | yes | | ||
| test_type | Type of assistive technology used | no | string | general, zoom, keyboard, screen_reader | yes | | ||
| status_details | Additional details about the status | yes | string | N/A | yes | | ||
| github_issue_number | Related GitHub issue number | yes | number | N/A | Yes | | ||
| github_issue_repo | Related GitHub issue repo | yes | string | uswds, uswds-site | Yes | | ||
| version_tested | The USWDS version number that was tested | no | string | N/A | yes | | ||
| wcag_criterion | The related WCAG criterion number | no | string | N/A | yes | | ||
|
||
## Creating a new checklist file | ||
|
||
1. Create a new .yml file in the _data/checklists directory. | ||
2. Give it a name that matches the component.name on the related component's checklist markdown file. | ||
3. Copy the following template into the file: | ||
```yaml | ||
title: | ||
component_status: | ||
test_items: | ||
# General tests | ||
- summary: | ||
summary_additional: | ||
test_status: | ||
test_type: general | ||
version_tested: | ||
wcag_criterion: | ||
# Zoom/screen magnification tests | ||
- summary: | ||
summary_additional: | ||
test_status: | ||
test_type: zoom | ||
version_tested: | ||
wcag_criterion: | ||
# Keyboard navigation tests | ||
- summary: | ||
summary_additional: | ||
test_status: | ||
test_type: keyboard | ||
version_tested: | ||
wcag_criterion: | ||
# Screen reader tests | ||
- summary: | ||
summary_additional: | ||
test_status: | ||
test_type: screen_reader | ||
version_tested: | ||
wcag_criterion: | ||
``` | ||
4. Fill in the data according to the data table above. | ||
Create a new data item for each test performed and group the items by the type of assistive technology used in the test. | ||
## Using .yml files | ||
- Tab spacing matters in yaml files. Incorrect spacing can cause errors, so make sure your items line up. |
Oops, something went wrong.