-
Notifications
You must be signed in to change notification settings - Fork 6k
Add SemanticsFlag.isHidden #5052
Conversation
| /// non-empty label. The [namesRoute] and [scopesRoute] flags may be on the | ||
| /// same node. The label of the found node will be announced as an edge | ||
| /// transition. If no non-empty, non-null label is found then: | ||
| /// |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for removing all of the EOL whitespace!
| return false; | ||
| return [self node].flags != 0 || ![self node].label.empty() || ![self node].value.empty() || | ||
| ![self node].hint.empty() || | ||
| return ([self node].flags != 0 && [self node].flags != static_cast<int32_t>(blink::SemanticsFlags::kIsHidden)) || |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't .flags a bitfield? If so, shouldn't you be checking ![self node].HasFlag(blink::SemanticsFlags::kIsHidden) instead of checking for inequality?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I want to check if it only has the hidden flag. If it has no flags or if it only has the hidden flag the SemanticsObject is not a (a11y focusable) accessibilityElement.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK.
|
I believe this has broken Linux and Mac engine buildbots https://build.chromium.org/p/client.flutter/console: |
|
see #5059 |

This is in preparation for implicit a11y scrolling on iOS (flutter/flutter#11983).
On Android, hidden elements are dropped on the floor. The OS never learns about them.
On iOS, hidden elements are exposed to the OS, but they don't have an accessibilityFrame and therefore cannot be focused with touch. The only way to focus them is via linear navigation. If they gain focus, the framework is asked to bring the hidden element on screen.
Framework wiring in flutter/flutter#16772.