Skip to content

Commit

Permalink
fix: Fix tabbing between multiple RadioGroups (#703)
Browse files Browse the repository at this point in the history
Closes #702
  • Loading branch information
navin-moorthy committed Aug 13, 2020
1 parent eec7a44 commit 212adbd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/reakit/src/Radio/Radio.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ export const useRadio = createHook<RadioOptions, RadioHTMLProps>({
role: !isNativeRadio ? "radio" : undefined,
type: isNativeRadio ? "radio" : undefined,
value: isNativeRadio ? options.value : undefined,
name: isNativeRadio ? options.baseId : undefined,
"aria-checked": checked,
checked,
onChange,
Expand Down
3 changes: 3 additions & 0 deletions packages/reakit/src/Radio/__tests__/index-test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ test("group", () => {
<input
aria-checked="false"
id="base-1"
name="base"
tabindex="0"
type="radio"
value="a"
Expand All @@ -177,6 +178,7 @@ test("group", () => {
<input
aria-checked="false"
id="base-2"
name="base"
tabindex="-1"
type="radio"
value="b"
Expand All @@ -187,6 +189,7 @@ test("group", () => {
<input
aria-checked="false"
id="base-3"
name="base"
tabindex="-1"
type="radio"
value="c"
Expand Down

0 comments on commit 212adbd

Please sign in to comment.