feat(a11y): wire aria-controls + aria-activedescendant on @mention editor #636

Open
opened 2026-05-19 23:32:31 +02:00 by marcel · 0 comments
Owner

Context

PR #629's @mention dropdown is mounted to document.body (imperative mount); it's not a child of the editor's contenteditable in the DOM. Screen-reader users have no signal that the listbox exists while focus is in the editor.

Leonie FINDING-MENTION-003 on #10936.

Required

  • Editor's contenteditable declares aria-controls={listboxId} when the dropdown is open.
  • Editor's contenteditable declares aria-activedescendant={highlightedOptionId} so screen readers announce the highlighted option without focus shift.
  • Listbox id is stable for the lifetime of one suggestion session.
  • Each <div role="option"> has a stable id referenced by aria-activedescendant.
  • axe-core scan passes (validate with the E2E in issue 5 above).

Acceptance

  • Implemented in PersonMentionEditor + MentionDropdown.
  • Manual SR test with NVDA or VoiceOver shows the listbox and the current option are announced.

Reviewer rationale: Leonie on PR #629 comments #10936, #10972.

## Context PR #629's @mention dropdown is mounted to `document.body` (imperative `mount`); it's not a child of the editor's contenteditable in the DOM. Screen-reader users have no signal that the listbox exists while focus is in the editor. Leonie FINDING-MENTION-003 on #10936. ## Required - [ ] Editor's contenteditable declares `aria-controls={listboxId}` when the dropdown is open. - [ ] Editor's contenteditable declares `aria-activedescendant={highlightedOptionId}` so screen readers announce the highlighted option without focus shift. - [ ] Listbox `id` is stable for the lifetime of one suggestion session. - [ ] Each `<div role="option">` has a stable `id` referenced by `aria-activedescendant`. - [ ] axe-core scan passes (validate with the E2E in issue 5 above). ## Acceptance - [ ] Implemented in PersonMentionEditor + MentionDropdown. - [ ] Manual SR test with NVDA or VoiceOver shows the listbox and the current option are announced. Reviewer rationale: Leonie on PR #629 comments #10936, #10972.
marcel added the P3-laterfeatureui labels 2026-05-19 23:32:35 +02:00
Sign in to join this conversation.
No Label P3-later feature ui
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: marcel/familienarchiv#636