Skip to content

🎨 Palette: Improve checkbox accessibility#1

Open
vizzyfreezy wants to merge 1 commit intomainfrom
palette-fix-checkbox-accessibility-16963116899284669631
Open

🎨 Palette: Improve checkbox accessibility#1
vizzyfreezy wants to merge 1 commit intomainfrom
palette-fix-checkbox-accessibility-16963116899284669631

Conversation

@vizzyfreezy
Copy link
Owner

Improved the accessibility of the Checkbox component.

Changes:

  • Replaced display: none on the hidden input element with standard "visually hidden" styles (opacity: 0, position: absolute, clip: rect(...)). This ensures the input remains in the accessibility tree and is focusable via keyboard.
  • Added :focus-visible styles to the adjacent .box element to provide a clear focus indicator (using box-shadow) when the checkbox is focused via keyboard.

Verification:

  • Verified visually using a mocked HTML page and Playwright script (verification/verify_checkbox.py), confirming that the focus ring appears correctly when the checkbox is focused.
  • Verified that the component structure in src/components/checkbox/index.js supports the CSS sibling selector (input + .box).
  • Ran pnpm check to ensure no linting errors.

PR created automatically by Jules for task 16963116899284669631 started by @vizzyfreezy

- Replace `display: none` with visually hidden pattern for checkbox inputs.
- Add focus styles (`:focus-visible`) to checkbox visuals.
- Ensure keyboard navigation and screen reader support for checkboxes.

This fixes the issue where checkboxes were not reachable via keyboard navigation and potentially ignored by screen readers.

Co-authored-by: vizzyfreezy <36118637+vizzyfreezy@users.noreply.github.com>
@google-labs-jules
Copy link

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

@gemini-code-assist
Copy link

Important

Installation incomplete: to start using Gemini Code Assist, please ask the organization owner(s) to visit the Gemini Code Assist Admin Console and sign the Terms of Services.

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