components icon indicating copy to clipboard operation
components copied to clipboard

Click targets are too small for some controls

Open jelbourn opened this issue 7 years ago • 6 comments

Material Design spec says that all touch targets much be at least 48x48.

mat-checkbox, mat-radio-button, and mat-slide-toggle are only 20x20 (with no label). The slider thumb is also too small.

Adding a padding to the <label> element within the template would resolve this (while keeping the visuals unchanged), but would be a major breaking change for people's layouts. We need to explore a non-breaking migration path for this.

This issue is not open for PRs until we have a clear migration strategy. Other components may be too small as well and will need to be audited.

jelbourn avatar Oct 24 '17 17:10 jelbourn

Just to track other instances of this, the touch targets for mat-button are also too small.

Icon buttons and mini fab buttons are 40x40. Basic buttons and raised buttons sizes are determined by their content but are generally also undersized (for example on the reference page).

Demo

See: https://stackblitz.com/edit/angular-cf8thc (a slightly stripped down version of the existing button demo) Note that:

  • All buttons have touch target size less than 48px vertically
  • Icon buttons and mini fab buttons have touch target size less than 48px horizontally
  • No non-standard styling has been applied to the buttons.

dgfranklin avatar Jan 25 '18 00:01 dgfranklin

@jelbourn are there any updates on this?

dobrevad avatar Jul 24 '18 23:07 dobrevad

Probably not for 7.0, but possible for 8.0

jelbourn avatar Jul 25 '18 00:07 jelbourn

Will that be solved for Angular Material 12?

ilyakonrad avatar Apr 06 '21 07:04 ilyakonrad

This will be fixed by our MDC-based components refactors currently in @angular/material-experimental. We don't yet have an ETA for those moving into the stable npm package.

jelbourn avatar Apr 06 '21 19:04 jelbourn

Hello folks,

This will be fixed by our MDC-based components refactors currently in @angular/material-experimental. We don't yet have an ETA for those moving into the stable npm package.

MDC-based components refactors completed, and I believe this has been improved. There are a few, specific cases where touch targets are still not large enough.

Assigning to myself to organize exactly where touch targets are not large enough.

-Zach

zarend avatar Apr 22 '24 18:04 zarend