Visitar URL original
USWDS-Site - Text input: Recategorize the labels and instructions accessibility test by AKnassa · Pull Request #3255 · uswds/uswds-site · GitHub
Skip to content

USWDS-Site - Text input: Recategorize the labels and instructions accessibility test - #3255

Open
AKnassa wants to merge 2 commits into
uswds:mainfrom
AKnassa:ak-2845-text-input-wcag
Open

AKnassa wants to merge 2 commits into
uswds:mainfrom
AKnassa:ak-2845-text-input-wcag

Conversation

@AKnassa

@AKnassa AKnassa commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Summary

Recategorized a text input accessibility test under the correct WCAG criterion and added the missing visible-labels test, using the wording the accessibility audit supplied.

Related issue

Closes #2845

Problem statement

On the Text input accessibility tests page, the screen reader test "Screen reader announces field labels and instructions" was filed under WCAG 3.3.2 (Labels or Instructions). But 3.3.2 covers whether visible labels and instructions exist — what a screen reader announces is programmatic markup, which is WCAG 1.3.1 (Info and Relationships). This was an accessibility audit finding, and the audit spelled out the exact fix.

Solution

Two changes to _data/accessibility-tests/text-input.yml, following the issue's instructions exactly:

  • Moved the existing screen reader test from 3.3.2 to 1.3.1, keeping its wording unchanged (the issue: "Keep the same wording, it works for this success criteria").
  • Added a new general test under 3.3.2 with the issue's wording: "Visible labels or instructions are present." It's marked pass — verified directly by checking that both text input examples on the component page show visible labels.

Also added a changelog entry to the Text input accessibility tests page. The new test's "version tested" follows the file's existing convention (3.8.0, matching all sibling entries); the team may prefer the currently-bundled version instead — happy to adjust.

Testing and review

  • The rendered page now shows 10 tests (was 9), with the screen reader test under "1.3.1 Info and relationships" and the new test under "3.3.2 Labels or instructions"; summary counts update consistently.
  • bundle exec rspec passes (10 examples, 0 failures).
  • The changelog entry's PR number field will be filled in with this PR's number.
  • To review: open Components → Text input → Accessibility tests and check the two moved/added entries against the issue.

The screen reader test for announced labels and
instructions was categorized under WCAG 3.3.2, which
covers the presence of visible labels — programmatic
announcement is 1.3.1 (Info and Relationships).

Recategorize the existing test to 1.3.1 (wording
unchanged, per the issue) and add a general test for
visible labels under 3.3.2 using the issue's approved
wording. Include a changelog entry; its PR number gets
backfilled once a PR exists.

Fixes uswds#2845
@AKnassa
AKnassa marked this pull request as ready for review July 19, 2026 01:33

@chandracarney chandracarney left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Great addition here, thank you for the contribution! 🥳 I added some minor comments.

test_type: general
version_tested: 3.8.0
wcag_criterion: 1.4.1
- summary: Visible labels or instructions are present.

@chandracarney chandracarney Jul 24, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Small tweak here, update line 26 to Labels or instructions are present and visible.

I realize this deviates from the original issue's instructions, but I wanted to bring it a little more in line with our formatting/wording.

version_tested: 3.8.0
wcag_criterion: 1.4.1
- summary: Visible labels or instructions are present.
summary_additional: There are clearly visible instructions or labels to identify what type of data is expected in the field.

@chandracarney chandracarney Jul 24, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Small tweak here, let's modify line 27 here fit a little better with our formatting: When you view a text input, you find clear, simple labels or instructions to identify the type of information expected in the field, and the format information is expected in.

I realize this deviates from the original issue's instructions, but I wanted to bring it a little more in line with our formatting/wording.

test_type: screen_reader
version_tested: 3.8.0
wcag_criterion: 3.3.2
wcag_criterion: 1.3.1

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Small nitpick here, now that the number changed, let's bump this to the top of the screen reader section so that the criterion ordering is sequential.

@github-project-automation github-project-automation Bot moved this from Triage to In progress in USWDS Core Project Data Jul 24, 2026
@chandracarney chandracarney added Affects: Accessibility 🟡 Affects access for disabled users or assistive tech. Record the barrier; not a severity score. A11y Audit Accessibility audit work or its findings. Preserve the test scope and evidence in the issue. labels Jul 24, 2026
@chandracarney chandracarney moved this from In progress to Initial Fed Review in USWDS Core Project Data Jul 24, 2026
@chandracarney chandracarney added the Needs: Author Response 🔴 Waiting on a specific author action; also used by commit-signature automation. label Aug 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A11y Audit Accessibility audit work or its findings. Preserve the test scope and evidence in the issue. Affects: Accessibility 🟡 Affects access for disabled users or assistive tech. Record the barrier; not a severity score. Needs: Author Response 🔴 Waiting on a specific author action; also used by commit-signature automation.

Projects

No open projects
Status: Initial fed review

Development

Successfully merging this pull request may close these issues.

USWDS - Bug: Change labels or instructions criteria to be for wording only

2 participants