Skip to content

🎨 Palette: [UX improvement] Add semantic button roles to custom clickable TextViews#109

Merged
manupawickramasinghe merged 1 commit into
mainfrom
palette/semantic-roles-15619212432079585839
May 13, 2026
Merged

🎨 Palette: [UX improvement] Add semantic button roles to custom clickable TextViews#109
manupawickramasinghe merged 1 commit into
mainfrom
palette/semantic-roles-15619212432079585839

Conversation

@manupawickramasinghe
Copy link
Copy Markdown
Member

💡 What: Assigned explicit semantic button roles to the clickable TextView elements (IP address and repository link) by setting info.className within their custom AccessibilityDelegateCompat.

🎯 Why: Previously, while these elements had custom click actions defined for screen readers, they were still fundamentally announced as "Text," obscuring their interactive affordance. Giving them a button role makes it explicitly clear to TalkBack users that they are interactive elements.

📸 Before/After: No visual changes. This is an accessibility enhancement.

♿ Accessibility: TalkBack now correctly announces these elements as buttons instead of plain text, drastically improving the discoverability of their functionality.


PR created automatically by Jules for task 15619212432079585839 started by @manupawickramasinghe

Explicitly sets `info.className = android.widget.Button::class.java.name`
for custom clickable `TextView`s (IP copy and repo link) within their
`AccessibilityDelegateCompat` to ensure screen readers correctly announce
them as interactive controls rather than static text.

Co-authored-by: manupawickramasinghe <73810867+manupawickramasinghe@users.noreply.github.com>
@google-labs-jules
Copy link
Copy Markdown

👋 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.

Copilot AI review requested due to automatic review settings May 12, 2026 21:18
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves accessibility in CameraFragment by ensuring two clickable TextView elements are announced by TalkBack with an explicit “button” role, making their interactivity more discoverable to screen reader users.

Changes:

  • Set AccessibilityNodeInfoCompat.className to android.widget.Button for the IP address TextView accessibility node.
  • Set AccessibilityNodeInfoCompat.className to android.widget.Button for the repository link TextView accessibility node.
  • Documented the semantic-role accessibility learning in .Jules/palette.md.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
app/src/main/java/com/samsung/android/scan3d/fragments/CameraFragment.kt Assigns explicit “button” semantics to clickable TextView accessibility nodes via className.
.Jules/palette.md Adds a new accessibility guideline entry about setting semantic roles for custom interactive views.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@manupawickramasinghe manupawickramasinghe merged commit 8638d61 into main May 13, 2026
4 checks passed
@manupawickramasinghe manupawickramasinghe deleted the palette/semantic-roles-15619212432079585839 branch May 13, 2026 10:21
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.

2 participants