Skip to content

Fix survey choice questions being read twice by screen readers - #14709

Open
amirabayoumi wants to merge 1 commit into
masterfrom
TAN-8599-fix-survey-choice-question-a11y
Open

Fix survey choice questions being read twice by screen readers#14709
amirabayoumi wants to merge 1 commit into
masterfrom
TAN-8599-fix-survey-choice-question-a11y

Conversation

@amirabayoumi

@amirabayoumi amirabayoumi commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Survey multiple-choice questions were read out twice by screen readers —
both the question and each option.
Two separate causes.

The question was rendered twice:

  • once in a <label for="…"> pointing at an id that does not exist
  • once in a <legend> wrapped in a <span>, so it named nothing

Both ended up as loose text, read one after the other.

Each option was rendered twice:

  • the <label> wrapped the input, so its text named the checkbox
  • the same text also stayed in the reading order as its own node

A label only gets absorbed into the control's name when it sits beside
the input and is bound with for=.

What changed

  • Removed the two hidden <legend> elements — they duplicated the
    question and named nothing.
  • CheckboxWithLabel now gives the input an id and renders the label as
    a sibling bound with htmlFor, instead of wrapping the input.
  • Checkbox now forwards ariaLabel to the input. It previously landed
    on the wrapper <div>, so it never worked.
  • Survey options pass ariaLabel, so the checkbox is named once even
    though the visible label is a <Text> element.

Changelog

A11y

  • Fix survey CheckboxMultiSelect questions being read twice by screen readers

For translators

@notion-workspace

Copy link
Copy Markdown

@amirabayoumi
amirabayoumi requested a review from IvaKop September 2, 2026 09:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant