Skip to content

fix: added aria label and stopPropagation on closable badge#107

Merged
tmccoy14 merged 4 commits into
mainfrom
fix/badges
Jul 6, 2026
Merged

fix: added aria label and stopPropagation on closable badge#107
tmccoy14 merged 4 commits into
mainfrom
fix/badges

Conversation

@giuliana-gladeye

Copy link
Copy Markdown
Collaborator

Fixed issues on Badge

Addressed codex found issues on https://github.com/eqtylab/governance-studio/pull/777#discussion_r3510450912

  • Added aria-label
  • Added stopPropagation onClick and onPointerDown

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 Badge so the close button only renders when both closeable and handleClosable are provided, and stop click event bubbling from the close button.
  • Update Badge/ResourceBadge documentation to reflect the new closable behavior.
  • Bump @eqtylab/equality version from 2.2.2 to 2.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.

Comment thread packages/ui/src/components/badge/badge.tsx

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

Comment thread packages/demo/src/content/components/badge.mdx Outdated
Comment thread packages/demo/src/content/components/resource-badge.mdx Outdated
@tmccoy14 tmccoy14 merged commit e06f306 into main Jul 6, 2026
1 check passed
@tmccoy14 tmccoy14 deleted the fix/badges branch July 6, 2026 15:31
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.

3 participants