File tree Expand file tree Collapse file tree 3 files changed +14
-3
lines changed
ui-drilldown/src/Drilldown/DrilldownGroup Expand file tree Collapse file tree 3 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ import { optionsThemeGenerator } from '@instructure/ui-options'
2929
3030import { propTypes , allowedProps } from './props'
3131import type { DrilldownGroupProps } from './props'
32+ import { isMac , isFirefox } from '@instructure/ui-utils'
3233
3334/**
3435---
@@ -48,7 +49,9 @@ class DrilldownGroup extends Component<DrilldownGroupProps> {
4849 static defaultProps = {
4950 disabled : false ,
5051 withoutSeparators : false ,
51- role : 'group'
52+ // Firefox with NVDA does not read Drilldown.Group with role="group" correctly
53+ // but setting role="menu" on all other platforms results in Drilldown.Group label not being read
54+ role : ! isMac ( ) && isFirefox ( ) ? 'menu' : 'group'
5255 }
5356
5457 render ( ) {
Original file line number Diff line number Diff line change @@ -74,12 +74,19 @@ const isAndroidOrIOS = (): boolean => {
7474 : false
7575}
7676
77+ const isMac = ( ) : boolean => {
78+ const parser = new UAParser ( )
79+ const result = parser . getResult ( )
80+ return result . os . name === 'Mac OS'
81+ }
82+
7783export {
7884 getBrowser ,
7985 isSafari ,
8086 isEdge ,
8187 isIE ,
8288 isFirefox ,
8389 isChromium ,
84- isAndroidOrIOS
90+ isAndroidOrIOS ,
91+ isMac
8592}
Original file line number Diff line number Diff line change @@ -44,5 +44,6 @@ export {
4444 isIE ,
4545 isFirefox ,
4646 isChromium ,
47- isAndroidOrIOS
47+ isAndroidOrIOS ,
48+ isMac
4849} from './getBrowser'
You can’t perform that action at this time.
0 commit comments