Skip to content

Increase size of checkbox, switch, and radio button to 48 by 48#18337

Closed
jonahwilliams wants to merge 1 commit into
flutter:masterfrom
jonahwilliams:tap_size
Closed

Increase size of checkbox, switch, and radio button to 48 by 48#18337
jonahwilliams wants to merge 1 commit into
flutter:masterfrom
jonahwilliams:tap_size

Conversation

@jonahwilliams

Copy link
Copy Markdown
Contributor

Conform to android a11y scanner and 48 by 48 tap target recommendation.

@jonahwilliams

Copy link
Copy Markdown
Contributor Author

This is a breaking change, so i will go through the normal process before submitting

@goderbauer

Copy link
Copy Markdown
Member

This will only increase the hit box, right? Not the visual appearance of the checkbox/switch/radio button? Might be worth to be specific in the title for future archeologists.

@goderbauer goderbauer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

inactiveColor: inactiveColor,
onChanged: onChanged,
size: const Size(2 * kRadialReactionRadius, 2 * kRadialReactionRadius),
size: const Size(2 * kRadialReactionRadius + 8.0, 2 * kRadialReactionRadius + 8.0),

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there value in maybe adding a comment to explain where the 8.0 is coming from here and in other places?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The + 8.0 serves to increase the radius from 20 to 24. We should not increase the radius from 20 to 24.

@HansMuller

Copy link
Copy Markdown
Contributor

This will change the layout size of checkbox et al, which we should really not change. Aside from being a backwards incompatible change, it undoes #17620 which was landed to make the sizes of the selection controls, and the widgets that contain them, match the spec.

We need to find a way to just increase the size of the hit test area.

@jonahwilliams

Copy link
Copy Markdown
Contributor Author

Closing in favor of #18369

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Aug 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants