tailwindui-issues
tailwindui-issues copied to clipboard
Size of icon button
What component
- Component name: Navbars, Slide-overs, ...
Describe the bug It's not a bug, but I'm wondering if the size of some icon button are ok for accessibility and touch target?
- notification button in navbar: 32px
- close button in slide-overs: 24px
Expected behavior I was thinking that this kind of button must be bigger: iOS recommends 44px and Android 48px.
@florianbouvot Great feedback. Similarly, WCAG recommends 44x44 px. We can look into ways to improve tap target size, particularly for mobile-focused UI.
@davidluhr I use h-11 w-11 instead of padding in some icon button to solve this issue.
EDIT: I work update some icon button like that https://play.tailwindcss.com/SdEqgIMvIU
@florianbouvot Hey thanks again for sharing this feedback. We're still hoping to still get to this update 👍
Relevant WCAG documentation: https://www.w3.org/WAI/WCAG21/Understanding/target-size.html
Hey, thanks again for reporting this!
We've corrected a bunch of the hit areas during a big component redesign that we did at the start of this year, plus we've also updated the two categories you mentioned (navbars and slide-overs), so that should take care of most of these!
If you see any other areas that are an issue feel free to report them and we'll handle those on a case-by-case basis 👍