Skip to content

🎨 Polish: Improve accessibility touch targets#697

Open
yuga-hashimoto wants to merge 2 commits into
mainfrom
fix-a11y-touch-targets-14226495084689334365
Open

🎨 Polish: Improve accessibility touch targets#697
yuga-hashimoto wants to merge 2 commits into
mainfrom
fix-a11y-touch-targets-14226495084689334365

Conversation

@yuga-hashimoto
Copy link
Copy Markdown
Owner

💡 What
Moved the Modifier.size() from the IconButton directly to the Icon child for the "Settings", "Refresh", and "Stop" buttons in MainActivity and ChatActivity.

🎯 Why
Android accessibility guidelines require interactive elements to have a minimum touch target size of 48x48dp. When Modifier.size(24.dp) is applied directly to an IconButton, it forces the button's total interactive area to shrink to 24x24dp, making it difficult for users to tap. By moving the modifier to the inner Icon, the visual graphic remains 24x24dp, but Compose automatically pads the outer IconButton to meet the 48x48dp minimum accessible touch bounds.

📸 Before/After

  • Before: IconButton touch bounds were constrained to 24x24dp.
  • After: IconButton touch bounds expand to the standard 48x48dp accessible minimum, while the icon visually remains 24dp.

♿ Accessibility
Improves tap target sizing for users with motor impairments, complying with WCAG and Android's minimum touch target guidelines.


PR created automatically by Jules for task 14226495084689334365 started by @yuga-hashimoto

Moved explicit `Modifier.size(24.dp)` from `IconButton` containers to their inner `Icon` children in `MainActivity.kt` and `ChatActivity.kt`. This prevents explicitly overriding the default 48x48dp minimum touch target required by Android accessibility guidelines while maintaining the correct visual icon size.

Co-authored-by: yuga-hashimoto <74749461+yuga-hashimoto@users.noreply.github.com>
@google-labs-jules
Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

Moved explicit `Modifier.size(24.dp)` from `IconButton` containers to their inner `Icon` children in `MainActivity.kt` and `ChatActivity.kt`. This prevents explicitly overriding the default 48x48dp minimum touch target required by Android accessibility guidelines while maintaining the correct visual icon size.
Also replaced explicit `https://repo1.maven.org/maven2/` with `mavenCentral()` to prevent 403 Forbidden errors in CI.

Co-authored-by: yuga-hashimoto <74749461+yuga-hashimoto@users.noreply.github.com>
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

Successfully merging this pull request may close these issues.

1 participant