Skip to content

Commit 39c63f2

Browse files
acmertzzakwarsame
authored andcommitted
Add :not([aria-disabled]) to selector
Co-authored-by: zak warsame <42528878+zakwarsame@users.noreply.github.com>
1 parent f1f6fea commit 39c63f2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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):not([aria-disabled]):not([tabindex="-1"]),*[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):not([aria-disabled]):not([tabindex="-1"]),*[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)