Qun Cheng
e89075c112
Announce text and button together when DropdownMenu is treated as a button ( #176428 )
...
Fixes https://github.com/flutter/flutter/issues/175950 .
This PR is to make screen reader announce the text field content and the
trailing button together on `DropdownMenu`. When the `DropdownMenu`
cannot be focused (`canRequestFocus()` is set to false), the "text
field" should be treated as if it is a button, and the trailing button
should **not** be announced separately. When the text field is
focusable, it's reasonable to separate text field and the trailing
button, so I leave it as is.
The native app doesn't announce "expanded"/"collapsed", so I use
`Semantics.hint` to achieve the goal.
This demo is to show the screen reader announcement.
https://github.com/user-attachments/assets/e7a9da8f-acf8-4018-a778-1ded1b07103c
## Pre-launch Checklist
- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.
2025-10-09 21:35:21 +00:00
..
2025-08-05 06:52:55 +00:00
2025-09-11 14:40:28 +00:00
2025-07-07 17:58:32 +00:00
2025-08-29 05:17:06 +00:00
2025-09-24 19:56:08 +00:00
2025-09-24 19:56:08 +00:00
2025-07-07 17:58:32 +00:00
2025-05-07 16:52:38 +00:00
2025-09-24 19:51:52 +00:00
2025-08-20 20:58:35 +00:00
2025-09-18 20:13:55 +00:00
2025-08-20 19:40:40 +00:00
2025-07-07 17:58:32 +00:00
2025-07-24 21:01:06 +00:00
2025-07-07 17:58:32 +00:00
2025-08-15 22:40:14 +00:00
2025-07-07 17:58:32 +00:00
2025-07-24 21:01:07 +00:00
2025-09-26 17:20:55 +00:00
2025-09-24 19:56:08 +00:00
2025-07-07 17:58:32 +00:00
2025-07-07 17:58:32 +00:00
2025-09-11 14:40:28 +00:00
2025-08-29 01:08:44 +00:00
2025-07-24 20:41:03 +00:00
2025-07-07 17:58:32 +00:00
2025-10-08 03:29:35 +00:00
2025-09-26 03:07:13 +00:00
2025-09-26 17:20:55 +00:00
2025-09-30 09:54:35 +00:00
2025-09-30 09:54:35 +00:00
2025-10-01 18:54:58 +00:00
2025-10-01 18:54:58 +00:00
2025-09-11 14:40:28 +00:00
2025-08-20 18:42:39 +00:00
2025-09-17 18:38:24 +00:00
2025-09-26 17:20:55 +00:00
2025-09-16 00:54:53 +00:00
2025-08-29 21:31:06 +00:00
2025-09-16 00:54:53 +00:00
2025-10-01 19:01:57 +00:00
2025-02-06 18:40:25 +00:00
2025-10-08 19:17:21 +00:00
2025-09-26 23:02:11 +00:00
2025-08-29 21:27:09 +00:00
2025-07-07 17:58:32 +00:00
2025-10-08 19:20:10 +00:00
2025-07-07 17:58:32 +00:00
2025-10-01 19:01:57 +00:00
2025-09-24 02:04:25 +00:00
2025-07-07 17:58:32 +00:00
2025-07-07 17:58:32 +00:00
2025-09-08 12:09:10 +00:00
2025-10-09 21:35:21 +00:00
2025-07-07 17:58:32 +00:00
2025-10-09 04:38:46 +00:00
2025-09-16 00:54:53 +00:00
2025-09-16 00:54:53 +00:00
2025-07-07 17:58:32 +00:00
2025-07-07 17:58:32 +00:00
2025-10-09 04:48:39 +00:00
2025-07-07 17:58:32 +00:00
2025-09-16 00:54:53 +00:00
2025-09-16 00:54:53 +00:00
2025-09-16 00:54:53 +00:00
2025-09-24 19:54:09 +00:00
2025-07-07 17:58:32 +00:00
2025-10-09 00:16:54 +00:00
2025-09-26 17:20:55 +00:00
2025-09-16 00:54:53 +00:00
2025-09-16 00:54:53 +00:00
2025-07-07 17:58:32 +00:00
2025-07-07 17:58:32 +00:00
2025-03-14 17:50:20 +00:00
2025-07-07 17:58:32 +00:00
2025-09-16 00:54:53 +00:00
2025-09-16 00:54:53 +00:00
2025-08-08 18:47:17 +00:00
2025-10-09 00:05:58 +00:00
2025-09-26 17:20:55 +00:00
2025-09-26 17:20:55 +00:00
2025-09-03 18:49:07 +00:00
2025-07-07 17:58:32 +00:00
2025-09-16 00:54:53 +00:00
2025-07-07 17:58:32 +00:00
2025-10-09 03:34:14 +00:00
2025-10-09 19:14:55 +00:00
2025-09-16 00:54:53 +00:00
2025-08-20 07:20:22 +00:00
2025-09-16 00:54:53 +00:00
2025-07-07 17:58:32 +00:00
2025-10-09 03:38:11 +00:00
2025-10-06 16:39:19 +00:00
2025-10-06 16:39:19 +00:00
2025-10-06 16:39:19 +00:00
2025-10-06 16:39:19 +00:00
2025-10-06 16:39:19 +00:00
2025-10-03 18:02:35 +00:00
2025-09-16 00:54:53 +00:00
2025-07-07 17:58:32 +00:00
2025-08-15 22:40:14 +00:00
2025-08-15 22:40:14 +00:00
2025-09-16 00:54:53 +00:00
2025-07-07 17:58:32 +00:00
2025-10-08 00:27:22 +00:00
2025-09-26 17:20:55 +00:00
2025-08-15 22:40:14 +00:00
2025-09-16 19:15:23 +00:00
2025-09-16 19:15:23 +00:00
2025-09-24 19:56:08 +00:00
2025-10-09 00:12:33 +00:00
2025-09-16 00:54:53 +00:00
2025-09-26 17:20:55 +00:00
2025-07-07 17:58:32 +00:00
2025-07-07 17:58:32 +00:00
2025-07-07 17:58:32 +00:00
2025-10-09 00:04:12 +00:00
2025-10-08 19:18:58 +00:00
2025-10-08 19:18:58 +00:00
2025-09-18 03:16:22 +00:00
2025-09-18 03:16:22 +00:00
2025-08-08 18:47:17 +00:00
2025-07-07 17:58:32 +00:00
2025-09-18 03:16:22 +00:00
2025-09-18 03:16:22 +00:00
2025-09-21 03:52:34 +00:00
2025-09-26 17:20:55 +00:00
2025-09-26 17:20:55 +00:00
2025-09-24 19:56:08 +00:00
2025-09-24 19:56:08 +00:00
2025-09-18 03:16:22 +00:00
2025-09-24 19:56:08 +00:00
2025-09-24 19:56:08 +00:00
2025-09-18 03:16:22 +00:00
2025-09-26 17:20:55 +00:00
2025-07-07 17:58:32 +00:00
2025-09-24 19:56:08 +00:00
2025-07-07 17:58:32 +00:00
2025-09-18 03:16:22 +00:00
2025-09-18 03:16:22 +00:00
2025-07-07 17:58:32 +00:00
2025-07-07 17:58:32 +00:00
2025-07-07 17:58:32 +00:00
2025-10-09 04:47:04 +00:00
2025-04-10 07:11:24 +00:00
2025-10-04 06:55:27 +00:00
2025-07-07 17:58:32 +00:00
2025-07-07 17:58:32 +00:00
2025-07-07 17:58:32 +00:00
2025-09-18 03:16:22 +00:00
2025-02-21 18:40:05 +00:00
2025-09-18 03:16:22 +00:00
2025-03-14 17:50:20 +00:00
2025-07-07 17:58:32 +00:00
2025-10-02 15:32:09 +00:00
2025-09-24 19:56:08 +00:00
2025-09-24 19:56:08 +00:00
2025-09-24 19:56:08 +00:00
2025-08-08 20:56:40 +00:00
2025-07-07 17:58:32 +00:00
2025-07-07 17:58:32 +00:00