Skip to content

🎨 Palette: Improve M3Switch accessibility#120

Merged
dlukt merged 1 commit into
masterfrom
palette/m3switch-a11y-10491050005678842653
May 2, 2026
Merged

🎨 Palette: Improve M3Switch accessibility#120
dlukt merged 1 commit into
masterfrom
palette/m3switch-a11y-10491050005678842653

Conversation

@dlukt
Copy link
Copy Markdown
Owner

@dlukt dlukt commented Apr 30, 2026

💡 What: Added android:importantForAccessibility="no" to M3Switch views that are wrapped in clickable parent layouts.
🎯 Why: The M3Switch custom view lacks native contentDescription handling. When placed inside a parent layout (like a LinearLayout or RelativeLayout) that already processes clicks and provides context via child TextViews, the switch itself should not be independently focusable by screen readers. This avoids redundant and confusing audio feedback.
♿ Accessibility: Improves screen reader experience in timeline edit, list editor, and report comment screens by grouping the interaction target correctly onto the parent container.


PR created automatically by Jules for task 10491050005678842653 started by @dlukt

Added `android:importantForAccessibility="no"` to custom `M3Switch` views where the parent layout is already handling click interactions and accessibility semantics (e.g. `edit_timeline.xml`, `list_timeline_editor.xml`, `fragment_report_comment.xml`). This prevents screen readers from redundantly announcing the state of the switch or complaining about missing content descriptions.

Co-authored-by: dlukt <201112286+dlukt@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.

@dlukt dlukt merged commit 307195e into master May 2, 2026
2 checks passed
@dlukt dlukt deleted the palette/m3switch-a11y-10491050005678842653 branch May 13, 2026 20:40
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