Add focus nodes, hover, and shortcuts to switches, checkboxes, and radio buttons.#43213
Add focus nodes, hover, and shortcuts to switches, checkboxes, and radio buttons.#43213gspencergoog merged 7 commits intoflutter:masterfrom
Conversation
c5ef3d7 to
efde5ba
Compare
darrenaustin
left a comment
There was a problem hiding this comment.
Other than a few minor comments and the tristate issue with checkbox, this LGTM.
There was a problem hiding this comment.
Are we currently using kIsWeb as a marker for desktop?
Also, is a single line if clause the preferred style for this in these conditional data structures? I kinda like it, but it does seem different than the if statement counterpart.
There was a problem hiding this comment.
No, I'm using it for a marker for web :-)
Web only interacts with these kinds of controls using the space bar, not the enter key, so we only do "select", not "activate". Other platforms use either.
Yes, single line is preferred:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#prefer-single-line-for-short-collection-if-and-collection-for
There was a problem hiding this comment.
As we discussed in person, this implementation doesn't appear to match the documentation for tristate on the Checkbox. Also need to look into firing a semantic event here.
There was a problem hiding this comment.
Fixed the documentation to match the implementation, now firing a semantics event.
1ad86ec to
afae86d
Compare
afae86d to
0e1f7f3
Compare
0e1f7f3 to
7e2d463
Compare
…eckboxes, and radio buttons. (flutter#43213)" (flutter#43367)" This reverts commit ed36fe5.
…dio buttons. (flutter#43213) In order to enable keyboard navigation to more controls, I've added focus nodes to switches, checkboxes, and radio buttons. In addition, this change enables mouse hover over these controls. - Added tests for focus, hover, and shortcut activation for Checkbox, Radio, and Switch.
…, and radio buttons. (flutter#43213)" (flutter#43367) This reverts commit 9000672.
…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.
…s, and radio buttons. (flutter#43657) This re-lands the change that adds focus nodes, hover, and shortcuts to switches, checkboxes, and radio buttons. (flutter#43213), with fixes for the web tests that weren't enabled in the master that it was synced to when I first landed it.
Description
In order to enable keyboard navigation to more controls, I've added focus nodes to switches, checkboxes, and radio buttons. In addition, this change enables mouse hover over these controls.
Tests
Breaking Change