-
Notifications
You must be signed in to change notification settings - Fork 6k
Missing default focus when navigating to a page with no SemanticsNode that sets namesRoute:true #20516
Conversation
| if (routeName == null) { | ||
| // The routeName will be null when there is no semantics node that represnets namesRoute in | ||
| // the scopeRoute. The TYPE_WINDOW_STATE_CHANGED only works the route name is not null and not | ||
| // empty. Gives it a while space will make it focus the first semantics node without |
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.
s/while/white
| // The other way to trigger a focus change is to send a TYPE_VIEW_FOCUSED to the | ||
| // rootAccessibilityView. However, it is less predictable which semantics node it will focus | ||
| // next. | ||
| routeName = " "; |
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.
What does this do on iOS?
Is this something that we should be fixing in the a11y bridge for Android instead of here?
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.
also: what does/will it do on Fuchsia? I'm not sure if this implemented yet there though, /cc @neelsa
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.
Oh. Wow. haha this is the Android bridge. Please disregard. May still be of interest to @neelsa though.
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.
Another question: is this an error on the developer's part? @goderbauer may know about that
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.
you meant not providing a names route? I don't think that is developers responsibility to add that, we added scope route automatically in modal route class, developers shouldn't need to know that to add the names route by themselves.
|
@dnfield I fixed the typo. |
dnfield
left a comment
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.
LGTM
|
This pull request is not suitable for automatic merging in its current state.
|
|
Cirrus flaked on you. I kicked it. |
…ticsNode that sets namesRoute:true (flutter/engine#20516)
…ticsNode that sets namesRoute:true (flutter/engine#20516)
…ticsNode that sets namesRoute:true (flutter/engine#20516)
… that sets namesRoute:true (flutter#20516)
Description
Add whitespace string when there is no namesRoute
Related Issues
Fixes flutter/flutter#63685
Tests
I added the following tests:
see files
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]). This will ensure a smooth and quick review process.Breaking Change
Did any tests fail when you ran them? Please read handling breaking changes.