File tree Expand file tree Collapse file tree
packages/ui-buttons/src/BaseButton Expand file tree Collapse file tree 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
@@ -278,7 +279,8 @@ class BaseButton extends Component<BaseButtonProps> {
278279 }
279280 }
280281 let tabIndexValue = tabIndex
281- if ( onClick && as && needsZeroTabIndex ) {
282+ // In Safari, a button cannot get focus unless it has an explicit 0 tabindex
283+ if ( ( onClick && as && needsZeroTabIndex ) || ( isSafari ( ) && as ) ) {
282284 tabIndexValue = tabIndex || 0
283285 }
284286 return (
You can’t perform that action at this time.
0 commit comments