Skip to content

fix: elevate focused button group elements to prevent outline clipping#1303

Merged
SAPTARSHI-coder merged 2 commits into
SAPTARSHI-coder:mainfrom
KRUSHAL2956:bugfix/button-group-focus-zindex
Jun 4, 2026
Merged

fix: elevate focused button group elements to prevent outline clipping#1303
SAPTARSHI-coder merged 2 commits into
SAPTARSHI-coder:mainfrom
KRUSHAL2956:bugfix/button-group-focus-zindex

Conversation

@KRUSHAL2956
Copy link
Copy Markdown
Contributor

@KRUSHAL2956 KRUSHAL2956 commented Jun 4, 2026

Pull Request Description

Closes #1297. Resolves z-index clipping of focused button outlines in a button group.

When multiple buttons are grouped using the .ease-btn-group utility, they are aligned side-by-side with border overlap/touching. Without explicit z-index control, the border outline/focus ring of the active/focused button gets occluded/clipped by the adjacent buttons in the DOM layout stacking order.

This PR adds a z-index: 1 elevation specifically when a button in the group is focused via keyboard (:focus-visible), ensuring the focus indicator ring is fully visible and not clipped.


Type of Change

  • ✨ New animation / hover effect
  • 🧩 New component
  • 📝 Documentation improvement
  • 🐛 Bug fix in an existing submission (core button group component focus outline occlusion)
  • Other (Accessibility improvement for core button-group keyboard focus visibility)

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 (#1297) 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/buttons.css)
  • One feature per PR (no bundled unrelated changes)

Feature Description

What does this add?

Elevates focused button group elements to prevent outline clipping and ensure high accessibility.

How does a developer use it?

<div class="ease-btn-group">
  <button class="ease-btn ease-btn-primary">First</button>
  <button class="ease-btn ease-btn-primary">Second</button>
  <button class="ease-btn ease-btn-primary">Third</button>
</div>

Why does it fit EaseMotion CSS?

It improves the accessibility and user experience of interactive elements by ensuring keyboard focus indicators are clearly visible and unclipped.


Demo

  • Demo checked (Verified using existing button group demos in components directory)

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. Rebuilt minified asset easemotion.min.css has been verified to be conflict-free and successfully includes the z-index fix.


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

This PR changes the size of easemotion.min.css.

Metric Base Branch This PR Difference
Raw 47.50 KB 47.55 KB 📈 +0.05 KB
Gzip 8.33 KB 8.34 KB 📈 +0.01 KB
Brotli 7.14 KB 7.14 KB 📉 -0.00 KB

@KRUSHAL2956 KRUSHAL2956 force-pushed the bugfix/button-group-focus-zindex branch from a4d2e99 to 5351e01 Compare June 4, 2026 15:07
@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 f3aa040 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.

🎨 UI: Focused Button Group Z-Index Outline Occlusion

2 participants