fix: added aria label and stopPropagation on closable badge#107
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the Badge component’s close button behavior to address accessibility/event-bubbling issues and aligns the demo documentation with the new closable behavior, along with a patch version bump for the UI package.
Changes:
- Update
Badgeso the close button only renders when bothcloseableandhandleClosableare provided, and stop click event bubbling from the close button. - Update Badge/ResourceBadge documentation to reflect the new closable behavior.
- Bump
@eqtylab/equalityversion from2.2.2to2.2.3.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| packages/ui/src/components/badge/badge.tsx | Updates closable rendering conditions and click event propagation handling for the close button. |
| packages/ui/package.json | Patch version bump to publish the change. |
| packages/demo/src/content/components/resource-badge.mdx | Docs updated to reflect that the close button renders only when handleClosable is provided. |
| packages/demo/src/content/components/badge.mdx | Same docs clarification for Badge props. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
tmccoy14
approved these changes
Jul 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixed issues on Badge
Addressed codex found issues on https://github.com/eqtylab/governance-studio/pull/777#discussion_r3510450912
aria-labelstopPropagationonClick andonPointerDown