Skip to content

Commit

Permalink
add comment about radio btn tabindex
Browse files Browse the repository at this point in the history
  • Loading branch information
jamieomaguire committed Dec 16, 2024
1 parent d32333e commit af8fbbb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/components/pie-radio-group/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,8 @@ export class PieRadioGroup extends FormControlMixin(RtlMixin(LitElement)) implem

protected firstUpdated (): void {
// Make all radios impossible to tab to
// This is because by default, we are able to tab to each individual radio button.
// This is not the behaviour we want, so applying -1 tabindex prevents it.
this._slottedChildren.forEach((radio) => radio.setAttribute('tabindex', '-1'));
}

Expand Down

0 comments on commit af8fbbb

Please sign in to comment.