Skip to content

Commit 839a26d

Browse files
committed
Revert "Properly handle buttons with aria-disabled and tabindex="-1" in focus helpers Fixes #7728"
This reverts commit 2827687.
1 parent 92ed5df commit 839a26d

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

.changeset/gentle-cobras-punch.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

polaris-react/src/utilities/focus.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ export type MouseUpBlurHandler = (
66
) => void;
77

88
const FOCUSABLE_SELECTOR =
9-
'a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled):not([tabindex="-1"]),*[tabindex]';
9+
'a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]';
1010
const KEYBOARD_FOCUSABLE_SELECTORS =
11-
'a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled):not([tabindex="-1"]),*[tabindex]:not([tabindex="-1"])';
11+
'a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]:not([tabindex="-1"])';
1212
const MENUITEM_FOCUSABLE_SELECTORS =
1313
'a[role="menuitem"],frame[role="menuitem"],iframe[role="menuitem"],input[role="menuitem"]:not([type=hidden]):not(:disabled),select[role="menuitem"]:not(:disabled),textarea[role="menuitem"]:not(:disabled),button[role="menuitem"]:not(:disabled),*[tabindex]:not([tabindex="-1"])';
1414
export const handleMouseUpByBlurring: MouseUpBlurHandler = ({currentTarget}) =>

0 commit comments

Comments
 (0)