Re-Land: Add focus nodes, hover, and shortcuts to switches, checkboxes, and radio buttons.#43384
Conversation
…eckboxes, and radio buttons. (flutter#43213)" (flutter#43367)" This reverts commit ed36fe5.
darrenaustin
left a comment
There was a problem hiding this comment.
There's a lot here, and I might have missed something, but this LGTM.
| return getSemantics( | ||
| find.descendant( | ||
| of: find.byValueKey(key), | ||
| matching: find.byType('_CheckboxRenderObjectWidget'), |
There was a problem hiding this comment.
Why does this need to be against _CheckboxRenderObjectWidget and not just the key?
There was a problem hiding this comment.
Because the key corresponds to a RenderMouseRegion now that I've added the MouseRegion, so we have to dig down to find the render object for the checkbox which adds the semantics.
| )); | ||
|
|
||
| expect(tester.getSemantics(find.byType(Checkbox)), matchesSemantics( | ||
| expect(tester.getSemantics(find.byType(Focus)), matchesSemantics( |
There was a problem hiding this comment.
Why the change from Checkbox to Focus here?
There was a problem hiding this comment.
Because that gets us down past the RenderMouseRegion so that it gets the _CheckboxRenderObjectWidget render object to query semantics from. Since Focus doesn't have a render object associated with it, it defers to the _CheckboxRenderObjectWidget.
|
This PR seems to have broken web tests on master. |
…heckboxes, and radio buttons. (flutter#43384)" This reverts commit 8017f63, since it breaks web tests.
…s, and radio buttons. (flutter#43384) This reverts commit 38f2d27 to fix web tests.
…s, and radio buttons. (flutter#43384) This re-lands the change that adds focus nodes, hover, and shortcuts to switches, checkboxes, and radio buttons. (flutter#43213) No changes from original, except for finding the right RenderBox in dev/integration_tests/android_semantics_testing/test_driver/main_test.dart.
…heckboxes, and radio buttons. (flutter#43384)" (flutter#43647) This reverts commit 8017f63, since it breaks web tests.
Description
This re-lands the change that adds focus nodes, hover, and shortcuts to switches, checkboxes, and radio buttons. (#43213)
No changes from original, except for finding the right
RenderBoxindev/integration_tests/android_semantics_testing/test_driver/main_test.dart.Breaking Change