add aria-expanded to whiteboard toolbar submenu btns

This commit is contained in:
KDSBrowne 2021-09-13 13:40:22 +00:00
parent b9f8592a80
commit a87a0c8867
2 changed files with 6 additions and 0 deletions

View File

@ -505,6 +505,7 @@ class WhiteboardToolbar extends Component {
/>
) : (
<ToolbarMenuItem
expanded={currentSubmenuOpen === 'annotationList'}
disabled={isDisabled}
label={intl.formatMessage(intlMessages.toolbarTools)}
icon={annotationSelected.icon}
@ -540,6 +541,7 @@ class WhiteboardToolbar extends Component {
return (
<ToolbarMenuItem
label={intl.formatMessage(intlMessages.toolbarFontSize)}
expanded={currentSubmenuOpen === 'fontSizeList'}
customIcon={this.renderFontItemIcon()}
onItemClick={this.displaySubMenu}
objectToReturn="fontSizeList"
@ -600,6 +602,7 @@ class WhiteboardToolbar extends Component {
return (
<ToolbarMenuItem
disabled={isDisabled}
expanded={currentSubmenuOpen === 'thicknessList'}
label={isDisabled
? intl.formatMessage(intlMessages.toolbarLineThicknessDisabled)
: intl.formatMessage(intlMessages.toolbarLineThickness)}
@ -690,6 +693,7 @@ class WhiteboardToolbar extends Component {
return (
<ToolbarMenuItem
disabled={isDisabled}
expanded={currentSubmenuOpen === 'colorList'}
label={isDisabled
? intl.formatMessage(intlMessages.toolbarLineColorDisabled)
: intl.formatMessage(intlMessages.toolbarLineColor)}

View File

@ -76,6 +76,7 @@ export default class ToolbarMenuItem extends Component {
className,
children,
showCornerTriangle,
expanded,
} = this.props;
return (
@ -84,6 +85,7 @@ export default class ToolbarMenuItem extends Component {
hidden={disabled}
>
<Button
aria-expanded={expanded}
hideLabel
role="button"
color="default"