Skip to content

Commit da55ef4

Browse files
author
Ilza Medeiros
authored
Merge pull request #5990 from liferay/LPD-52380
fix(@clayui/focus-trap): LPD-52380 Change tabindlex from not focusable elements on date picker
2 parents 8d3bdcc + 7c42c82 commit da55ef4

File tree

7 files changed

+15
-12
lines changed

7 files changed

+15
-12
lines changed

packages/clay-core/src/focus-trap/FocusTrap.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ export function FocusTrap({active = false, children, focusElementRef}: Props) {
7373
<span
7474
aria-hidden="true"
7575
data-focus-scope-start="true"
76-
tabIndex={0}
76+
tabIndex={-1}
7777
/>
7878
) : null}
7979

@@ -83,7 +83,7 @@ export function FocusTrap({active = false, children, focusElementRef}: Props) {
8383
<span
8484
aria-hidden="true"
8585
data-focus-scope-end="true"
86-
tabIndex={0}
86+
tabIndex={-1}
8787
/>
8888
) : null}
8989
</div>

packages/clay-core/src/focus-trap/__tests__/__snapshots__/BasicRendering.tsx.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ exports[`FocusTrap basic rendering render static content when focus trap is acti
99
<span
1010
aria-hidden="true"
1111
data-focus-scope-start="true"
12-
tabindex="0"
12+
tabindex="-1"
1313
/>
1414
<button
1515
class="btn btn-primary"
@@ -20,7 +20,7 @@ exports[`FocusTrap basic rendering render static content when focus trap is acti
2020
<span
2121
aria-hidden="true"
2222
data-focus-scope-end="true"
23-
tabindex="0"
23+
tabindex="-1"
2424
/>
2525
</div>
2626
</div>

packages/clay-core/src/tree-view/DragAndDrop.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -487,13 +487,13 @@ export function DragAndDropProvider<T>({
487487
<span
488488
aria-hidden="true"
489489
data-focus-scope-start="true"
490-
tabIndex={0}
490+
tabIndex={-1}
491491
/>
492492
{children}
493493
<span
494494
aria-hidden="true"
495495
data-focus-scope-end="true"
496-
tabIndex={0}
496+
tabIndex={-1}
497497
/>
498498
</>
499499
) : (

packages/clay-date-picker/src/__tests__/__snapshots__/BasicRendering.tsx.snap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2602,6 +2602,7 @@ exports[`BasicRendering renders date picker with time 1`] = `
26022602
<button
26032603
aria-label="Delete the entered time"
26042604
class="clay-time-clear-btn btn btn-unstyled"
2605+
tabindex="-1"
26052606
type="button"
26062607
>
26072608
<svg

packages/clay-date-picker/src/__tests__/__snapshots__/Internationalization.tsx.snap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7011,6 +7011,7 @@ exports[`Internationalization renders the date picker in russian 1`] = `
70117011
<button
70127012
aria-label="Delete the entered time"
70137013
class="clay-time-clear-btn btn btn-unstyled"
7014+
tabindex="-1"
70147015
type="button"
70157016
>
70167017
<svg

packages/clay-time-picker/src/__tests__/__snapshots__/index.tsx.snap

Lines changed: 6 additions & 6 deletions
Large diffs are not rendered by default.

packages/clay-time-picker/src/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -539,6 +539,7 @@ const TimePicker = ({
539539
}
540540
)
541541
}
542+
tabIndex={visibleActionReset ? 0 : -1}
542543
>
543544
<ClayIcon
544545
spritemap={spritemap}

0 commit comments

Comments
 (0)