Skip to content

Commit 5323c89

Browse files
[bugfix][a11y][update] Associate in this call with username for React 16 (#3239)
* Expose aria-labelledby prop for participantItems
1 parent 5dd1c66 commit 5323c89

4 files changed

Lines changed: 18 additions & 2 deletions

File tree

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "patch",
3+
"comment": "Replace useId with a communication react specific id generator for React 16",
4+
"packageName": "@azure/communication-react",
5+
"email": "edwardlee@microsoft.com",
6+
"dependentChangeType": "patch"
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "patch",
3+
"comment": "Replace useId with a communication react specific id generator for React 16",
4+
"packageName": "@azure/communication-react",
5+
"email": "edwardlee@microsoft.com",
6+
"dependentChangeType": "patch"
7+
}

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import {
1414
Stack,
1515
Text
1616
} from '@fluentui/react';
17-
import React, { useId, useMemo, useRef, useState } from 'react';
17+
import React, { useMemo, useRef, useState } from 'react';
1818
import { useIdentifiers } from '../identifiers';
1919
import { useLocale } from '../localization';
2020
import { useTheme } from '../theming';
@@ -32,6 +32,7 @@ import { _preventDismissOnEvent as preventDismissOnEvent } from '@internal/acs-u
3232
/* @conditional-compile-remove(one-to-n-calling) */
3333
/* @conditional-compile-remove(PSTN-calls) */
3434
import { ParticipantState } from '../types';
35+
import { useId } from '@fluentui/react-hooks';
3536

3637
/**
3738
* Fluent styles for {@link ParticipantItem}.

packages/react-composites/src/composites/common/ParticipantContainer.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Copyright (c) Microsoft Corporation.
22
// Licensed under the MIT license.
3-
import React, { useId, useMemo } from 'react';
3+
import React, { useMemo } from 'react';
44
import {
55
participantListContainerStyle,
66
participantListMobileStyle,
@@ -17,6 +17,7 @@ import {
1717
} from '@internal/react-components';
1818
import { FocusZone, Stack, Text, useTheme } from '@fluentui/react';
1919
import { AvatarPersona, AvatarPersonaDataCallback } from './AvatarPersona';
20+
import { useId } from '@fluentui/react-hooks';
2021

2122
type ParticipantContainerProps = {
2223
onRenderAvatar?: OnRenderAvatarCallback;

0 commit comments

Comments
 (0)