Repository navigation
[a11y] Add expanded state in Semantics widget on Android #92040
Description
Use case
I cannot set expanded or collapsed states for screen readers. This accessibility issue is WCAG's conformance level A, Criterion 4.1.2: Name, Role, Value
WCAG: https://www.w3.org/WAI/WCAG21/Understanding/name-role-value
I would like the Semantics widget to have an expanded parameter so that it announces the state for VoiceOver and TalkBack.
After creating this parameter in Semantics, I recommend putting it in the Material's Accordion and similar components.
Proposal
Analyze the behavior of the accessibilityState={{expanded: true}} parameter of React Native and do the same.
https://github.com/facebook/react-native/search?q=expanded
Extra
W3C Documentation about HTML's aria-expanded: https://www.w3.org/WAI/GL/wiki/Using_aria-expanded_to_indicate_the_state_of_a_collapsible_element
React Native documentation about accessibilityState: https://reactnative.dev/docs/accessibility#accessibilitystate
Example of accordion accessible in react material design: https://mui.com/pt/components/accordion/
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone (PR merged)
- StatusShow more project fieldsDone
Activity
[-]Add expanded state in Semantics widget[/-][+][Proposal] Add expanded state in Semantics widget[/+]goderbauer commentedon Oct 20, 2021
What does this map to in Android's and iOS's accessibility API?
GabrieleSuzart commentedon Oct 27, 2021
Searching, I found the map in Android: AccessibilityNodeInfoCompat.ACTION_EXPAND or AccessibilityNodeInfoCompat.ACTION_COLLAPSE on the AccessibilityNodeInfo
Luckily I found a property called isExpanded in
init. It's possible that this is it, but I'm not sure and I don't know how to test it, as I had never used native languages. @goderbauer could you test and confirm?GabrieleSuzart commentedon Oct 29, 2021
I got a response on Stack Overflow from an accessibility expert:
By: slugolicious
24 remaining items
[a11y] Add `expanded` flag support to Android. (#174981)
rekire commentedon Sep 28, 2025
I'm not sure if I run into a merge conflict or something similar, but in my current dev branch has
semantics.dartan unresolved reference toSemanticsAction.collapseandSemanticsAction.expand. Is this a known issue? Git blame references this ticket here, so I'm a bit confused.I just notices that the file is in
bin/cache/pkg/sky_engine/lib/ui/semantics.dartdoes that mean that I have a incompatible sky_engine version? How can I fix it?ksokolovskyi commentedon Sep 29, 2025
Hi @rekire, please make sure that you have merged the latest master into your dev branch. If yes, then try to remove
bin/cachefolder and runflutter doctorto download the freshsky_engine. I hope this helps.github-actions commentedon Oct 13, 2025
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.[a11y] Add `expanded` flag support to Android. (flutter#174981)
[a11y] Add `expanded` flag support to Android. (#174981)