Skip to content

fix(a11y): connect question inputs to heading and description via aria#3228

Merged
Chartman123 merged 1 commit into
mainfrom
fix/3172-aria-labelledby-question-inputs
Mar 24, 2026
Merged

fix(a11y): connect question inputs to heading and description via aria#3228
Chartman123 merged 1 commit into
mainfrom
fix/3172-aria-labelledby-question-inputs

Conversation

@pringelmann
Copy link
Copy Markdown
Collaborator

@pringelmann pringelmann commented Mar 18, 2026

Summary

Screen readers couldn't associate question inputs with their title or description when tabbing through a form submission. This adds aria-labelledby and aria-describedby to all question type components, pointing to the title <h3> and description <div> for each question.

For Dropdown, File, and Color - where the input already has its own accessible name - the input is wrapped in div[role="group"] so the question title is announced at the group level without overriding the input's own label.

Also centralizes titleId/descriptionId in QuestionMixin.js (previously duplicated in QuestionMultiple and QuestionGrid).

TODO

  • All 8 question type components updated
  • Playwright e2e tests for aria attributes

Checklist

@pringelmann pringelmann self-assigned this Mar 18, 2026
@pringelmann pringelmann force-pushed the fix/3172-aria-labelledby-question-inputs branch from 4a1057b to ddb741e Compare March 18, 2026 16:52
@pringelmann pringelmann added this to the 5.3 milestone Mar 23, 2026
@pringelmann pringelmann added 3. to review Waiting for reviews a11y related to accessibility bug Something isn't working feature: 📝 submitting responses labels Mar 23, 2026
Add aria-labelledby and aria-describedby to all question type inputs,
connecting them to the question title and description so screen readers
announce them when a respondent focuses an input field.

Fixes #3172

Signed-off-by: Peter Ringelmann <peter.ringelmann@nextcloud.com>
@pringelmann pringelmann force-pushed the fix/3172-aria-labelledby-question-inputs branch from ddb741e to 075bd83 Compare March 23, 2026 09:39
@pringelmann pringelmann marked this pull request as ready for review March 23, 2026 09:39
@Chartman123 Chartman123 merged commit ada927b into main Mar 24, 2026
48 checks passed
@Chartman123 Chartman123 deleted the fix/3172-aria-labelledby-question-inputs branch March 24, 2026 13:53
@github-project-automation github-project-automation Bot moved this from Todo to Done in A11Y initiative 2026 Mar 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews a11y related to accessibility bug Something isn't working feature: 📝 submitting responses

Projects

Development

Successfully merging this pull request may close these issues.

[a11y] connect question heading, description with question input

3 participants