Skip to content

Commit

Permalink
fix(sbb-toggle): avoid console error on checked option click (#3034)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeripeierSBB committed Aug 27, 2024
1 parent 6b95be6 commit 94fa2b6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ snapshots["sbb-toggle-option renders Shadow DOM"] =
`<input
aria-hidden="true"
id="sbb-toggle-option-id"
inert=""
tabindex="-1"
type="radio"
value="Option 1"
Expand Down Expand Up @@ -87,6 +88,7 @@ snapshots["sbb-toggle-option renders checked disabled Shadow DOM"] =
aria-hidden="true"
disabled=""
id="sbb-toggle-option-id"
inert=""
tabindex="-1"
type="radio"
value="Option 1"
Expand Down
1 change: 1 addition & 0 deletions src/elements/toggle/toggle-option/toggle-option.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ export class SbbToggleOptionElement extends SbbIconNameMixin(LitElement) {
id="sbb-toggle-option-id"
aria-hidden="true"
tabindex="-1"
.inert=${this.checked}
?disabled=${this.disabled}
.checked=${this.checked || nothing}
.value=${this.value || nothing}
Expand Down

0 comments on commit 94fa2b6

Please sign in to comment.