Skip to content

fix: add keyboard focus-visible indicator to chip component#1306

Merged
SAPTARSHI-coder merged 2 commits into
SAPTARSHI-coder:mainfrom
KRUSHAL2956:bugfix/chip-keyboard-focus-indicator
Jun 4, 2026
Merged

fix: add keyboard focus-visible indicator to chip component#1306
SAPTARSHI-coder merged 2 commits into
SAPTARSHI-coder:mainfrom
KRUSHAL2956:bugfix/chip-keyboard-focus-indicator

Conversation

@KRUSHAL2956
Copy link
Copy Markdown
Contributor

Pull Request Description

Closes #1289. Resolves keyboard focus styling of the .ease-chip checkbox labels.

Currently, the native checkbox inside .ease-chip-group is visually hidden (opacity 0, dimensions 0, position absolute, pointer-events none). Because the label acts as the visual representation of the interactive checkbox chip, keyboard users navigating with Tab do not receive any visual feedback indicating which chip has current focus.

This PR adds a :focus-visible outline indicator on the adjacent .ease-chip sibling when the hidden checkbox input receives keyboard focus, ensuring full WCAG 2.1 AA keyboard focus visibility requirements are met.


Type of Change

  • ✨ New animation / hover effect
  • 🧩 New component
  • 📝 Documentation improvement
  • 🐛 Bug fix in an existing submission (core chip component keyboard focus state accessibility)
  • Other (Accessibility improvement for keyboard navigation)

Submission Checklist

⚠️ PRs that fail this checklist will be closed without review.
Note: This checklist is geared towards new community example submissions. Since this is a core framework bug fix resolving an open issue (#1289) in the base components directory, changes to components/ are required.

  • All changes are inside submissions/examples/your-feature-name/
  • Includes demo.html — self-contained, opens in browser with no server
  • Includes style.css — raw CSS for the proposed feature
  • Includes README.md — what it does, how to use it, why it fits EaseMotion CSS
  • No changes to core/
  • No changes to components/ (N/A - Core bug fix in components/chip.css)
  • One feature per PR (no bundled unrelated changes)

Feature Description

What does this add?

Adds a visible outline focus ring around interactive chips when navigated via keyboard.

How does a developer use it?

<div class="ease-chip-group">
  <input type="checkbox" id="chip1">
  <label class="ease-chip" for="chip1">Design</label>
</div>

Why does it fit EaseMotion CSS?

It improves user accessibility and keyboard navigation UX on interactive components while preserving the clean, modern look of the custom chips.


Demo

  • Demo checked (Verified using the existing components/chip-demo.html locally)

Browser Testing

  • Chrome
  • Firefox
  • Edge
  • Safari (optional but appreciated)

Notes for Maintainer

Tested locally with all linters (npm run lint, npm run lint:duplicates) and tests passing successfully. Visual focus ring verified on Chromium during keyboard tab navigation.


Reminder: Only the repository maintainer may merge pull requests.
Do not self-merge, even if you have write access.
Maximum 2 active assigned issues per contributor — unassign extras before opening a PR.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 4, 2026

📊 CSS Bundle Size Benchmark

No change in CSS bundle size. ✨

@SAPTARSHI-coder SAPTARSHI-coder added accepted Contribution approved for integration into EaseMotion CSS animation Animation effects, hover interactions, motion ideas, transitions component New UI components (buttons, cards, modals, tooltips, badges) enhancement New feature or request good first issue Good for newcomers GSSoC-26 Official GSSoC 2026 issue gssoc:approved Approved for GSSoC contributions integrated Successfully merged and included in the framework level:intermediate Requires moderate project understanding type:feature New functionality or enhancement labels Jun 4, 2026
@SAPTARSHI-coder SAPTARSHI-coder merged commit 91a5e9b into SAPTARSHI-coder:main Jun 4, 2026
4 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

accepted Contribution approved for integration into EaseMotion CSS animation Animation effects, hover interactions, motion ideas, transitions component New UI components (buttons, cards, modals, tooltips, badges) enhancement New feature or request good first issue Good for newcomers gssoc:approved Approved for GSSoC contributions GSSoC-26 Official GSSoC 2026 issue integrated Successfully merged and included in the framework level:intermediate Requires moderate project understanding type:feature New functionality or enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

♿ Accessibility: Keyboard Focus Indicator Hidden on Chips Component

2 participants