-
Notifications
You must be signed in to change notification settings - Fork 182
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into cm-release-notes-update
- Loading branch information
Showing
68 changed files
with
2,560 additions
and
145 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/accessibility-tests/ | ||
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-accessibility' | ||
--- | ||
|
||
{% 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 |
---|---|---|
@@ -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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
permalink: /components/button/accessibility-tests/ | ||
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-accessibility' | ||
--- | ||
|
||
{% 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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
- **Use proper landmarks for each identifier section.** Each identifier section should be either a `section` or a `nav`, and include an appropriate `aria-label` property. | ||
- **Add an `alt` attribute to each logo image.** Use `[Agency shortname] logo` as the alt text for each logo image you add.. | ||
- **Use `image` role for any SVG images.** Use `role="img"` with any SVG logo image. | ||
- **Add an `alt` attribute to each logo image.** Use `[Agency shortname] logo` as the alt text for each logo image you add. | ||
- **Use `image` role for any SVG images.** Use `role="img"` with any SVG logo image. |
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/accessibility-tests/ | ||
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-accessibility' | ||
--- | ||
|
||
{% 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,62 @@ | ||
# Creating accessibility test 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/accessibility-tests directory. | ||
2. Give it a name that matches the component's name field in its respective accessibility.md 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.