Skip to content

Conversation

@meet-vaghasiya
Copy link
Contributor

@meet-vaghasiya meet-vaghasiya commented Oct 12, 2025

Summary
Brings the remove icon of removable Chips using keyboard so users can remove chips without a mouse.

What changed

Add tabindex and role="button" to the chip remove icon.

Implement keyboard interaction on the remove icon: Enter, Space, and Backspace trigger removal.

Defect Fixes
Fixes #8186 — “Chip component: remove icon not keyboard accessible / lacks proper a11y labeling”.
#8186

- Add tabindex and role attributes to removable chip remove icon
- Implement keyboard interaction for remove icon (Enter, Space, Backspace keys)
- Prevent default event behavior on key interactions
- Add dynamic aria-label for remove icon using locale configuration
- Enhance keyboard navigation and screen reader support for chip removal
- Add dynamic aria-label for remove button with label context
- Fallback to generic 'close' label if no specific label is provided
- Enhance screen reader experience for chip removal interaction
<component
:is="removeIcon ? 'span' : 'TimesCircleIcon'"
:class="[cx('removeIcon'), removeIcon]"
:tabindex="disabled ? -1 : 0"

Choose a reason for hiding this comment

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

I noticed a referencethis.disabled in the key/click handlers, but I don’t see disabled defined as a prop or coming from a mixin/composable in Chip.vue.
In my local test , this.disabled is undefined

Copy link
Contributor Author

@meet-vaghasiya meet-vaghasiya Oct 13, 2025

Choose a reason for hiding this comment

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

Thank you @aligoknl for bringing this up! Earlier, I had added the disabled flag in same PR, but it seems it was outside the current scope. Since the disabled prop isn't there yet, and while raising the PR, I realized that its need to separate PR as maybe its feature , so I removed that prop. I might have forgotten to clean it up here, but I’ve now removed it. You can test this now.

If someone requires this feature, I'll create a new PR to address it with document change as well.

Copy link

@aligoknl aligoknl left a comment

Choose a reason for hiding this comment

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

Great, makes senses to handle disabled separately.

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.

Chip: Removable chip lost the tabindex making it unfocusable with tab

2 participants