Skip to content

Commit 8112431

Browse files
authored
Ensure elements with an ARIA role that require child roles contain them (#6011)
Signed-off-by: carocao-msft <96077406+carocao-msft@users.noreply.github.com>
1 parent 6a582ce commit 8112431

2 files changed

Lines changed: 13 additions & 1 deletion

File tree

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"type": "patch",
3+
"area": "fix",
4+
"workstream": "Accessibility",
5+
"comment": " Ensure elements with an ARIA role that require child roles contain them ",
6+
"packageName": "@azure/communication-react",
7+
"email": "96077406+carocao-msft@users.noreply.github.com",
8+
"dependentChangeType": "patch"
9+
}

packages/react-components/src/components/MicrophoneButton.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,9 +262,11 @@ export const MicrophoneButton = (props: MicrophoneButtonProps): JSX.Element => {
262262
if (props.showNoiseSuppressionButton) {
263263
splitButtonMenuItems.push({
264264
key: 'microphoneDNSToggle',
265+
role: 'menuitem',
265266
onRender: () => {
266267
return (
267268
<Stack
269+
role="menuitem"
268270
onClick={async () => {
269271
await props.onClickNoiseSuppression?.();
270272
setAnnouncerString(
@@ -295,7 +297,8 @@ export const MicrophoneButton = (props: MicrophoneButtonProps): JSX.Element => {
295297
iconProps: {
296298
iconName: props.checked ? 'SplitButtonPrimaryActionMicUnmuted' : 'SplitButtonPrimaryActionMicMuted',
297299
styles: { root: { lineHeight: 0 } }
298-
}
300+
},
301+
role: 'menuitem'
299302
});
300303

301304
/**

0 commit comments

Comments
 (0)