Repository navigation
Commit ccc8a81
authored
[Android][a11y] Set visibleToUser=false for hidden semantics nodes (flutter#194411)
Updates `AccessibilityBridge` to set `setVisibleToUser` to `false` when
a semantics node has `Flag.IS_HIDDEN`, instead of always hardcoding
`true`.
When scrolling a list with TalkBack (for example, a `CustomScrollView`
with a pinned header), items that scroll behind the header are marked
`IS_HIDDEN` by Flutter. Because `AccessibilityBridge` still reported
`isVisibleToUser` as `true` for those hidden nodes, TalkBack would get
confused after scrolling and trigger a second scroll on a single swipe,
skipping a full screen of items.
Fixes flutter#194260
| Before | After |
| --- | --- |
|
https://github.com/user-attachments/assets/9d1d04fd-41dd-4328-9fbe-670cd09ad95a|https://github.com/user-attachments/assets/87d6f2d4-1180-491f-838d-d1b59b04313d|
## Pre-launch Checklist
- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [AI contribution guidelines] and understand my
responsibilities, or I am not using AI tools.
- [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 in-code documentation (doc comments with
`///`).
- [x] If this PR introduces a new feature or capability, I created and
linked a website documentation issue or PR in [flutter/website] (or
verified none is needed).
- [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.1 parent aebd23e commit ccc8a81
2 files changed
Lines changed: 29 additions & 1 deletion
File tree
- engine/src/flutter/shell/platform/android
- io/flutter/view
- test/io/flutter/view
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
870 | 870 | | |
871 | 871 | | |
872 | 872 | | |
873 | | - | |
| 873 | + | |
874 | 874 | | |
875 | 875 | | |
876 | 876 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3447 | 3447 | | |
3448 | 3448 | | |
3449 | 3449 | | |
| 3450 | + | |
| 3451 | + | |
| 3452 | + | |
| 3453 | + | |
| 3454 | + | |
| 3455 | + | |
| 3456 | + | |
| 3457 | + | |
| 3458 | + | |
| 3459 | + | |
| 3460 | + | |
| 3461 | + | |
| 3462 | + | |
| 3463 | + | |
| 3464 | + | |
| 3465 | + | |
| 3466 | + | |
| 3467 | + | |
| 3468 | + | |
| 3469 | + | |
| 3470 | + | |
| 3471 | + | |
| 3472 | + | |
| 3473 | + | |
| 3474 | + | |
| 3475 | + | |
| 3476 | + | |
| 3477 | + | |
3450 | 3478 | | |
3451 | 3479 | | |
3452 | 3480 | | |
| |||
0 commit comments