fix(checkbox-group): fix the checkbox-group to get it working properly with tooltips#3322
fix(checkbox-group): fix the checkbox-group to get it working properly with tooltips#3322anna-lach wants to merge 8 commits into
Conversation
…y with tooltips, unit tests and WithTooltips story
🦋 Changeset detectedLatest commit: 7582f37 The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR 💥 An error occurred when fetching the changed packages and changesets in this PR |
There was a problem hiding this comment.
Pull request overview
Fixes sl-checkbox-group behavior when non-checkbox elements (e.g., sl-tooltip) are present in its default slot, ensuring the group only operates on actual checkboxes.
Changes:
- Restrict the group’s slotted-element query to
sl-checkboxelements only. - Add a Storybook scenario demonstrating a checkbox group with tooltips in the slot.
- Add regression tests verifying the group ignores
sl-tooltipelements when computingboxesandvalue.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| packages/components/checkbox/src/checkbox-group.ts | Filters @queryAssignedElements to only return sl-checkbox, preventing tooltip elements from being treated as checkboxes. |
| packages/components/checkbox/src/checkbox-group.stories.ts | Adds a WithTooltips story to reproduce/verify checkbox-group behavior with tooltips present. |
| packages/components/checkbox/src/checkbox-group.spec.ts | Adds regression coverage for tooltip-in-slot scenarios and registers the tooltip element for the test environment. |
🕸 Website previewYou can view a preview here (commit |
🕸 Storybook previewYou can view a preview here (commit |
a11ymiko
left a comment
There was a problem hiding this comment.
Checkbox labels are not announced by NVDA in browse mode (navigation with arrows) for Checkbox With Tooltip story. Checkboxes are announced as 'clicable chechk box required invalid entry' without name, that is provided by label.
This is announced properly in Checkbox group With Tooltips story.
Current behavior:
Screen.Recording.2026-05-14.at.17.42.26.mov
Expected behavior:
Screen.Recording.2026-05-14.at.17.43.06.mov
…ltip-breaks-sl-checkbox-group
…rying to get tooltips working properly with checkboxes

Fixes #3287