callstack / react-native-paper

Material Design for React Native (Android & iOS)
https://reactnativepaper.com
MIT License
12.81k stars 2.08k forks source link

Button's touchable area doesn't follow material design accessibility guide #2682

Closed ArthurMbraga closed 3 years ago

ArthurMbraga commented 3 years ago

I'm utilizing the react-native-paper's Button

import { Button } from 'react-native-paper';

...

return (
   ...
   <Button
      mode="contained"
      onPress={() => navigation.navigate('register')}>
      Enviar
   </Button>
   ...
);


And got this issue at google play console:

Recommendation Consider increasing this clickable item.

The height of this item is 37dp. Consider setting the height of this touch area to 48dp or greater. know more

image

After checking at google material design guide, I found: At Accessibility > Touch target spacing

image

Actually, the react-native-paper's button touchable area has the same height of the button's content

So I have two questions:


software version
react-native ^0.64.0
react-native-paper ^4.8.1
react-native-vector-icons ^8.1.0
github-actions[bot] commented 3 years ago

Couldn't find version numbers for the following packages in the issue:

Can you update the issue to include version numbers for those packages? The version numbers must match the format 1.2.3.

github-actions[bot] commented 3 years ago

The versions mentioned in the issue for the following packages differ from the latest versions on npm:

Can you verify that the issue still exists after upgrading to the latest versions of these packages?

likeSo commented 3 years ago

I think Paper should provide a way to remove all paddings on buttons. Everything needs a customize way because fixed padding not compatible with all our scenes

lukewalczak commented 3 years ago

If you need to customize the Button please try to use prop contentStyle.

github-actions[bot] commented 3 years ago

Hello 👋, this issue has been open for more than 2 months with no activity on it. If the issue is still present in the latest version, please leave a comment within 7 days to keep it open, otherwise it will be closed automatically. If you found a solution on workaround for the issue, please comment here for others to find. If this issue is critical for you, please consider sending a pull request to fix the issue.

simonbengtsson commented 1 year ago

Isn't this a major issue? To follow basic material design guidelines everyone would need to custumize the Button component. Still an issue in the latest m3 theme as far as I can tell.

The buttons with the m3 theme seems to be 40 dp in height but this is just the height of the container in the material design spec. The touch target recommendation is 48 as before.

athrvk commented 4 months ago

Any update on this issue ?