Skip to content

Commit

Permalink
[MA-25]: Provide proper name, role, and state information in move to …
Browse files Browse the repository at this point in the history
…option
  • Loading branch information
SaurabhSharma-884 committed Dec 16, 2024
1 parent d316df6 commit 9ce89e4
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,8 @@ export class SubMenuItem extends React.PureComponent<Props, State> {
<ul
className={classNames(['a11y__popup Menu dropdown-menu SubMenu', {styleSelectableItem}])}
style={subMenuStyle}
id={id + '_submenu'}

>
{hasSubmenu ? subMenu!.map((s) => {
const hasDivider = s.id === 'ChannelMenu-moveToDivider';
Expand Down Expand Up @@ -233,12 +235,14 @@ export class SubMenuItem extends React.PureComponent<Props, State> {
id={id + '_menuitem'}
ref={this.node}
onClick={this.onClick}
{...(Boolean(hasSubmenu) && {'aria-haspopup': 'menu', 'aria-controls': id + '_submenu', 'aria-expanded': this.state.show})}
>
<div
className={classNames([{styleSelectableItemDiv: styleSelectableItem}])}
id={id}
aria-label={ariaLabel}
onMouseEnter={this.show}
role='button'
onMouseLeave={this.hide}
tabIndex={tabIndex ?? 0}
onKeyDown={this.handleKeyDown}
Expand Down

0 comments on commit 9ce89e4

Please sign in to comment.