File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
packages/ui-buttons/src/BaseButton Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ import { isActiveElement } from '@instructure/ui-dom-utils'
3636import { hasVisibleChildren } from '@instructure/ui-a11y-utils'
3737import { View } from '@instructure/ui-view'
3838import type { ViewProps } from '@instructure/ui-view'
39+ import { isSafari } from '@instructure/ui-utils'
3940
4041import { withStyle } from '@instructure/emotion'
4142
@@ -279,7 +280,8 @@ class BaseButton extends Component<BaseButtonProps> {
279280 }
280281 }
281282 let tabIndexValue = tabIndex
282- if ( onClick && as && needsZeroTabIndex ) {
283+ // In Safari, a button cannot get focus unless it has an explicit 0 tabindex
284+ if ( ( onClick && as && needsZeroTabIndex ) || ( isSafari ( ) && as ) ) {
283285 tabIndexValue = tabIndex || 0
284286 }
285287 return (
You can’t perform that action at this time.
0 commit comments