Skip to content

fix(a11y): keep the focus and list structure in the editor - #3868

Merged
AndyScherzinger merged 3 commits into
mainfrom
fix/a11y-editor-focus-and-lists
Nov 11, 2026
Merged

AndyScherzinger merged 3 commits into
mainfrom
fix/a11y-editor-focus-and-lists

Conversation

@AndyScherzinger

Copy link
Copy Markdown
Member

Split out of #3833, so it can be merged and backported on its own. The commits are unchanged and drop out of #3833 once this is merged.

  • Adding a question moves the focus to its title for every question type, not only for checkbox and radio questions.
  • In the editor, the field of the answer "Other" is no longer a list item outside of a list.
  • Moving a question to the top or the end moves the focus to its other move button instead of losing it to the page.

Tests

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI

Adding a question moves the focus to the title of the new question.
Only checkbox and radio questions handed their root element to
useQuestion, so for all other types the focus stayed on the closed
menu and fell back to the page. Every question component now hands
its root element to useQuestion.

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
In the editor, the field of the answer "Other" was a list item after the
list of the options, outside of any list. Assistive technologies only
expect list items within a list, so it is a plain element now.

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
Moving a question up keeps the focus on its "Move question up" button.
Once the question is the first one, that button is disabled, so the
focus fell back to the page and the next Tab started at the top. The
same happened with "Move question down" for the last question.

Move the focus to the other move button of the question in that case.

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
@AndyScherzinger AndyScherzinger added bug Something isn't working 3. to review Waiting for reviews labels Nov 11, 2026
@AndyScherzinger AndyScherzinger self-assigned this Nov 11, 2026
@Chartman123

Copy link
Copy Markdown
Collaborator

/backport to stable5.4

@backportbot backportbot Bot added the backport-request Pending backport by the backport-bot label Nov 11, 2026
@AndyScherzinger
AndyScherzinger merged commit 11a3bf1 into main Nov 11, 2026
42 checks passed
@AndyScherzinger
AndyScherzinger deleted the fix/a11y-editor-focus-and-lists branch November 11, 2026 09:07
@backportbot backportbot Bot removed the backport-request Pending backport by the backport-bot label Nov 11, 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 bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants