Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Add option to specify minimum touch target sizes #24

Open
ta-mbrizic opened this issue May 20, 2020 · 2 comments
Open

Comments

@ta-mbrizic
Copy link

Description

Currently, minimum touch target sizes are hardcoded to 48dp and there is no way to change them.

We need a way to override them, like it's possible to do so in the Accessibility Scanner app.

@caseyburkhardt
Copy link
Member

If you're using the accessibility test framework APIs directly, you can accomplish this with Parameters#putCustomTouchTargetSize(int). That Parameters instance would be passed to TouchTargetSizeCheck's #runCheckOnHierarchy.

if you're using our library via Espresso's integration, we don't currently have a convenience API for this in AccessibilityValidator, but it would be possible to add one. Is that what you're looking for here?

@hemor
Copy link

hemor commented Apr 14, 2021

@caseyburkhardt I'm not the original author but I have a similar issue. Yes, it would be great if the espresso integration provides a convenience API for overriding this, and other available options. In the meantime, is there any workaround for achieving this?

Also, regarding the first part of your comment about using the accessibility test framework API directly, can you please provide more info on how to integrate this? The readme for the repo doesn't provide a ton of info and when I checked on how to use this, the only resource I found is this Google codelabs, and that uses the espresso integration, not the direct API. If you can provide/point me to where to find docs, articles, blogpost or sample codes on how to integrate the direct API in tests, that'd be really helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants