You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[a11y] Add semantics to the Expansible widget. #175907
Hi @srivats22, of course you can contribute to this issue.
I read the other PR comments, and my understanding isto update the Expansible widget to support the new onExpand and onCollapse functions?
Mainly yes, but additionally, you will have to verify that the semantics of the CupertinoExpansionTile and ExpansionTile still work as expected on all platforms, and there are no duplicates in the labels and announcements.
I should wrap it with a Semantic widget and pass the onExpand and onCollapse callback?
2. Looking at the ExpansionTile, both Material and Cupertino, there is already a Semantic widget. Should I be removing that since it uses the Expansible widget?
In general, yes, you need to wrap the AnimatedBuilder with the Semantic widget and set expanded, onExpand, and onCollapse properties according to the expansion state. The expanded/collapsed state is announced only on Android. On iOS, you need to specify the expansion state explicitly in hint.
I am not sure how you need to proceed after the changes to the Expansible widget. What I can suggest is to try removing the semantic properties that define the expansible state in ExpansionTile and then verify how VoiceOver and TalkBack behave when you focus on or use ExpansionTile.
Please take a look at this PR #176428, which added pretty much the same semantics to the DropdownMenu.
P.S. I am not an a11y expert. In case you still have questions, you can write them in the #hackers-accessibility chat on Flutter Discord.
So based on that, having the new states on Expansible might not make sense.
I'm not entirely sure.
@ksokolovskyi@chunhtai is onCollapse and onExpand callbacks in a Semantics widget required for Android announcements? I saw this PR that suggests setting liveRegion also allows for Android announcements.
Either way, the end goal is Expansible should be able to trigger a semantics announcement on expansion state changes. The API to do this is SemanticsService.sendAnnouncement on non-Android platforms or liveRegion/onCollapse/onExpand on Android. This work might also involve adding a new string property containing the message to announce etc. But overall these should live in Expansible.
This issue is assigned to @srivats22 but has had no recent status updates. Please consider unassigning this issue if it is not going to be addressed in the near future. This allows people to have a clearer picture of what work is actually planned. Thanks!
This issue was assigned to @srivats22 but has had no status updates in a long time. To remove any ambiguity about whether the issue is being worked on, the assignee was removed.
I am currently busy with other work items in my day to day job and not sure when I will be able to get back to working on this. If someone else wants to pick this up they can.
Activity
srivats22 commentedon Sep 24, 2025
Once it lands, can I contribute the changes?
I read the other PR comments, and my understanding isto update the
Expansiblewidget to support the new onExpand and onCollapse functions?ksokolovskyi commentedon Sep 24, 2025
Hi @srivats22, of course you can contribute to this issue.
Mainly yes, but additionally, you will have to verify that the semantics of the
CupertinoExpansionTileandExpansionTilestill work as expected on all platforms, and there are no duplicates in the labels and announcements.srivats22 commentedon Oct 8, 2025
Hi,
I am getting started on this issue and wanted to know if what I am doing is correct:
I should wrap it with a Semantic widget and pass the onExpand and onCollapse callback?
2. Looking at the ExpansionTile, both Material and Cupertino, there is already a Semantic widget. Should I be removing that since it uses the Expansible widget?
ksokolovskyi commentedon Nov 5, 2025
Hi @srivats22, sorry for the late reply.
AnimatedBuilderwith theSemanticwidget and setexpanded,onExpand, andonCollapseproperties according to the expansion state. The expanded/collapsed state is announced only on Android. On iOS, you need to specify the expansion state explicitly inhint.Expansiblewidget. What I can suggest is to try removing the semantic properties that define the expansible state inExpansionTileand then verify how VoiceOver and TalkBack behave when you focus on or useExpansionTile.Please take a look at this PR #176428, which added pretty much the same semantics to the
DropdownMenu.P.S. I am not an a11y expert. In case you still have questions, you can write them in the
#hackers-accessibilitychat on Flutter Discord.srivats22 commentedon Nov 5, 2025
Thank you for the response @ksokolovskyi I will get started with the AnimatedBuilder and any question will ask on discord.
srivats22 commentedon Nov 11, 2025
I someone assign this to me please? I have started working on it 😀
srivats22 commentedon Nov 17, 2025
Screen.Recording.2025-11-17.at.5.17.34.PM.mov
Hi Can someone confirm if this is how it should be working post the change?
Changes at a high level:
srivats22 commentedon Nov 19, 2025
I was able to fix it... will try and have the PR out by this week
srivats22 commentedon Nov 21, 2025
Raised following pr: #178922 as a first attempt... seems right to me but looking forward to PR comment feedbacks 😀
srivats22 commentedon Jan 22, 2026
Hi @ksokolovskyi
I have opened the PR for this and got a review comment, see below:
So based on that, having the new states on Expansible might not make sense.
Can you also please weigh in if this is required or not?
cc: @victorsanni and @chunhtai
victorsanni commentedon Feb 4, 2026
I'm not entirely sure.
@ksokolovskyi @chunhtai is
onCollapseandonExpandcallbacks in aSemanticswidget required for Android announcements? I saw this PR that suggests settingliveRegionalso allows for Android announcements.Either way, the end goal is
Expansibleshould be able to trigger a semantics announcement on expansion state changes. The API to do this isSemanticsService.sendAnnouncementon non-Android platforms orliveRegion/onCollapse/onExpandon Android. This work might also involve adding a new string property containing the message to announce etc. But overall these should live inExpansible.chunhtai commentedon Feb 4, 2026
I am not sure if i understand the question, can you explain a bit more?
this is the only way to trigger android announcement now, we are deprecating send announcement support for android.
Otherwise, agree with victor, these accessibility property should live in Expansible.
flutter-triage-bot commentedon Jun 10, 2026
This issue is assigned to @srivats22 but has had no recent status updates. Please consider unassigning this issue if it is not going to be addressed in the near future. This allows people to have a clearer picture of what work is actually planned. Thanks!
flutter-triage-bot commentedon Aug 26, 2026
This issue was assigned to @srivats22 but has had no status updates in a long time. To remove any ambiguity about whether the issue is being worked on, the assignee was removed.
srivats22 commentedon Aug 27, 2026
Hi,
I am currently busy with other work items in my day to day job and not sure when I will be able to get back to working on this. If someone else wants to pick this up they can.
Thanks