StackExchange / StackExchange/Stacks

Notify users of input validation with aria-live

Open
#1,053 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

accessibility
Dominant language
TypeScript
Stars
672
Forks
107
Avg merge
2d 12h
Merged PRs (30d)
26

Description

Describe the bug
For the input validation, there should be an aria-live="assertive" on the validation message in cases where the message is added to the DOM/view. (There’s an example of this here from Deque.) With this attribute, screen readers will read this announcement to users when it appears. There is no mention of this in the Stacks documentation.

To Reproduce
Steps to reproduce the behavior:

  1. In Pickles (or any other SO4T instance) go to Questions, open the filter, and save a custom filter.
  2. Use a screen reader of your choosing to observe what happens when you change a filter and try to save another custom filter with the same name.
  3. Note that the validation message is not read out.

Expected behavior
Include a note in Inputs > Validation states about using aria-live.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked Stacks documentation at Inputs > Validation states and compare it with the linked Deque aria-live example. Done means the validation guidance covers announcing dynamically added messages with aria-live="assertive" and addresses the reproduced screen-reader case.

Written by the indexing model from the issue text.

Assessment

Tech stack
html
Domain
accessibility, documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.