Skip to content

fix(a11y): semantics for QueryaDropdown trigger and menu items - #1396

Merged
ZhuchkaTriplesix merged 1 commit into
devfrom
issue/1371-dropdown-semantics
Oct 10, 2026
Merged

ZhuchkaTriplesix merged 1 commit into
devfrom
issue/1371-dropdown-semantics

Conversation

@ZhuchkaTriplesix

Copy link
Copy Markdown
Member

Closes #1371

Problem

QueryaDropdown handled keys and focus but had no Semantics: the trigger read as unlabelled text, a screen reader could not tell whether the menu was open, and menu items did not say which one is selected.

Change

  • Trigger: Semantics(button: true, enabled: widget.enabled, expanded: controller.isOpen, value: label, hint: widget.hint). MenuAnchor rebuilds the trigger on open/close, so expanded follows the menu.
  • Menu items: Semantics(button: true, enabled: ..., selected: item.value == value) around the MenuItemButton (its own label semantics merge with it).
  • No visual or behavioural change.

Tests

test/shared/widgets/querya_dropdown_semantics_test.dart: trigger flags (value, hint, collapsed), disabled state, and the expanded flag plus selected / unselected item after opening.

Not run locally; CI is the check.

The trigger is now a Semantics button carrying the current value, the hint
and whether the menu is expanded; each menu item reports button, enabled
and selected. Closes #1371.
@github-actions github-actions Bot added bug Something isn't working frontend Theme parser epic label: frontend accessibility Reduced motion, OS accessibility preferences ui User interface components and widgets P2 Medium priority / Parity & Refactoring labels Oct 10, 2026
@ZhuchkaTriplesix
ZhuchkaTriplesix merged commit 9ddc2fd into dev Oct 10, 2026
13 checks passed
@ZhuchkaTriplesix
ZhuchkaTriplesix deleted the issue/1371-dropdown-semantics branch October 11, 2026 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

accessibility Reduced motion, OS accessibility preferences bug Something isn't working frontend Theme parser epic label: frontend P2 Medium priority / Parity & Refactoring ui User interface components and widgets

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant