This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Add SemanticsFlag.isHidden#5052
Merged
goderbauer merged 5 commits intoflutter:masterfrom Apr 20, 2018
Merged
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: | ||
| /// |
Contributor
There was a problem hiding this comment.
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)) || |
Contributor
There was a problem hiding this comment.
Isn't .flags a bitfield? If so, shouldn't you be checking ![self node].HasFlag(blink::SemanticsFlags::kIsHidden) instead of checking for inequality?
Member
Author
There was a problem hiding this comment.
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.
gspencergoog
approved these changes
Apr 20, 2018
Contributor
Member
|
I believe this has broken Linux and Mac engine buildbots https://build.chromium.org/p/client.flutter/console: |
Member
|
see #5059 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

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.