Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

USWDS-Site: Added radio button accessibility test page #2821

Merged
merged 13 commits into from
Sep 18, 2024
11 changes: 11 additions & 0 deletions _components/radio-buttons/accessibility-tests.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
permalink: /components/radio-buttons/accessibility-tests/
layout: accessibility-test
component:
name: radio buttons
title: Radio buttons accessibility tests
category: Components
lead: Any USWDS radio buttons component should pass these manual accessibility tests.
RachelCorsino marked this conversation as resolved.
Show resolved Hide resolved
changelog:
key: 'component-radio-buttons-accessibility'
---
12 changes: 2 additions & 10 deletions _components/radio-buttons/radio-buttons.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,8 @@ permalink: /components/radio-buttons/
redirect_from:
- /form-controls/09-radio-buttons/
subnav:
- text: Preview
href: '#radio-buttons-preview'
- text: Code
href: '#radio-buttons-code'
- text: Guidance
href: '#radio-buttons-guidance'
- text: Package
href: '#radio-buttons-package'
- text: Latest updates
href: '#changelog'
- text: Radio button accessibility tests
href: /components/radio-buttons/accessibility-tests/
title: Radio buttons
type: component
variants:
Expand Down
72 changes: 72 additions & 0 deletions _data/accessibility-tests/radio-buttons.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
title: Radio buttons
component_status: pass
test_items:
# General tests
- summary: Focus indicator on radio button is clearly visible.
summary_additional: When you use a keyboard to focus on a radio button group, you will see a visible outline or other clear indication of focus.
test_status: pass
test_type: general
version_tested: 3.8.0
wcag_criterion: 3.2.1
RachelCorsino marked this conversation as resolved.
Show resolved Hide resolved
- summary: Radio button labels are descriptive, brief and clear.
summary_additional: When you view radio buttons, all labels have short descriptions that are easy to understand and act on.
test_status: pass
test_type: general
version_tested: 3.8.0
wcag_criterion: 2.4.6
- summary: All clickable elements touch target size meet height and width requirements.
RachelCorsino marked this conversation as resolved.
Show resolved Hide resolved
summary_additional: The size and spacing of the touch target are at least 24px wide and 24px tall.
test_status: pass
test_type: general
version_tested: 3.8.0
wcag_criterion: 2.5.8
# Keyboard navigation tests
- summary: Radio button focus can be moved and selection can be selected or deselected.
summary_additional: When you use the spacebar and arrow keys on a keyboard, you can toggle between selections and clearly see when the choice is selected or not.
test_status: pass
test_type: keyboard
version_tested: 3.8.0
wcag_criterion: 3.2.1
- summary: Radio button focus follows logical content order.
summary_additional: When you tab through the radio button group with a keyboard, the focus stays in order of the content as intended.
test_status: pass
test_type: keyboard
version_tested: 3.8.0
wcag_criterion: 2.4.3
- summary: Radio buttons are still fully functional using only keystrokes.
summary_additional: When you use a keyboard to navigate to the radio button option, you are able to move focus, check and uncheck buttons, and move focus into and out of the radio group. If none of the radio buttons are checked, focus is set on the first radio button in the group.
test_status: pass
test_type: keyboard
version_tested: 3.8.0
wcag_criterion: 2.1.1
# Screen reader tests
- summary: Screen reader announces question before any radio button and then related elements.
summary_additional: When listening to the radio button using a screen reader, you hear the question related to the radio button read first. Then you will hear the radio button and label and its checked state.
test_status: pass
test_type: screen_reader
version_tested: 3.8.2
wcag_criterion: 4.1.2
- summary: Screen reader announces instructions for radio button fields and options for radio button groups.
summary_additional: When listening to the radio button using a screen reader, any instructions related to the field and you also hear all the options in the button group.
RachelCorsino marked this conversation as resolved.
Show resolved Hide resolved
test_status: pass
test_type: screen_reader
RachelCorsino marked this conversation as resolved.
Show resolved Hide resolved
version_tested: 3.8.0
wcag_criterion: 3.3.2
- summary: Screen reader values for radio buttons match screen display.
summary_additional: When using a screen reader, you can hear the same value for the radio button that is shown on the screen.
test_status: pass
test_type: screen_reader
version_tested: 3.8.0
wcag_criterion: 2.5.3
- summary: Screen reader announces all labels.
summary_additional: When you use a screen reader and navigate to a radio button, you hear every label or title associated with that radio button.
test_status: pass
test_type: screen_reader
version_tested: 3.8.0
wcag_criterion: 1.3.5
amyleadem marked this conversation as resolved.
Show resolved Hide resolved
- summary: Screen reader announces number and focus position inside radio button group.
summary_additional: When you use a screen reader and navigate to a radio button group, you hear focus position, and how many other button options there are within that group.
test_status: pass
test_type: screen_reader
version_tested: 3.8.0
wcag_criterion: 1.3.1
8 changes: 8 additions & 0 deletions _data/changelogs/component-radio-buttons-accessibility.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
title: Radio button accessibility tests
type: component
items:
- date: NNNN-NN-NN
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

We need to update the changelog dates before merge

thisisdano marked this conversation as resolved.
Show resolved Hide resolved
summary: Added accessibility tests page.
affectsGuidance: true
githubPr: 2821
githubRepo: uswds-site
5 changes: 5 additions & 0 deletions _data/changelogs/component-radio-buttons.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ title: Radio buttons
type: component
changelogURL:
items:
- date: NNNN-NN-NN
thisisdano marked this conversation as resolved.
Show resolved Hide resolved
summary: Added WCAG compliance tag and accessibility test status section.
affectsGuidance: true
githubPr: 2821
githubRepo: uswds-site
- date: 2023-09-29
summary: Updated radio and checkbox tile styling to have lighter borders.
summaryAdditional:
Expand Down
Loading