Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix: Revert CompositeItem tabIndex fix (#821)
  • Loading branch information
diegohaz committed Jan 6, 2021
1 parent bf3fdfd commit 1390d31
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion packages/reakit/src/Composite/CompositeItem.ts
Expand Up @@ -151,7 +151,7 @@ export const useCompositeItem = createHook<
isCurrentItem) ||
// We don't want to set tabIndex="-1" when using CompositeItem as a
// standalone component, without state props.
!options.items;
!options.items?.length;

React.useEffect(() => {
if (!id) return undefined;
Expand Down
2 changes: 1 addition & 1 deletion packages/reakit/src/Grid/__tests__/GridCell-test.tsx
Expand Up @@ -26,7 +26,7 @@ test("render", () => {
<span
id="gridcell"
role="gridcell"
tabindex="-1"
tabindex="0"
/>
</div>
`);
Expand Down
2 changes: 1 addition & 1 deletion packages/reakit/src/Menu/__tests__/MenuItem-test.tsx
Expand Up @@ -26,7 +26,7 @@ test("render", () => {
<button
id="item"
role="menuitem"
tabindex="-1"
tabindex="0"
>
item
</button>
Expand Down
Expand Up @@ -31,7 +31,7 @@ test("render", () => {
id="item"
name="checkbox"
role="menuitemcheckbox"
tabindex="-1"
tabindex="0"
/>
</div>
</body>
Expand Down
2 changes: 1 addition & 1 deletion packages/reakit/src/Menu/__tests__/MenuItemRadio-test.tsx
Expand Up @@ -31,7 +31,7 @@ test("render", () => {
aria-checked="false"
id="item"
role="menuitemradio"
tabindex="-1"
tabindex="0"
/>
</div>
</body>
Expand Down
2 changes: 1 addition & 1 deletion packages/reakit/src/Radio/__tests__/Radio-test.tsx
Expand Up @@ -26,7 +26,7 @@ test("render", () => {
<input
aria-checked="false"
id="radio"
tabindex="-1"
tabindex="0"
type="radio"
value="radio"
/>
Expand Down
4 changes: 2 additions & 2 deletions packages/reakit/src/Tab/__tests__/Tab-test.tsx
Expand Up @@ -30,7 +30,7 @@ test("render", () => {
aria-selected="false"
id="tab"
role="tab"
tabindex="-1"
tabindex="0"
>
tab
</button>
Expand Down Expand Up @@ -93,7 +93,7 @@ test("render selected", () => {
aria-selected="true"
id="tab"
role="tab"
tabindex="-1"
tabindex="0"
>
tab
</button>
Expand Down
2 changes: 1 addition & 1 deletion packages/reakit/src/Toolbar/__tests__/ToolbarItem-test.tsx
Expand Up @@ -24,7 +24,7 @@ test("render", () => {
<div>
<button
id="item"
tabindex="-1"
tabindex="0"
>
button
</button>
Expand Down

0 comments on commit 1390d31

Please sign in to comment.