Skip to content

Commit 78d6c14

Browse files
edwardlee-msftcarocao-msft
authored andcommitted
[bugfix][a11y] Label side pane tab header currently active tab as aria-label (#3345)
* Add selected state to side pane tabheader tabs
1 parent 564d87e commit 78d6c14

3 files changed

Lines changed: 16 additions & 0 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": "Add selected state aria label to active tab header",
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": "Add selected state aria label to active tab header",
4+
"packageName": "@azure/communication-react",
5+
"email": "edwardlee@microsoft.com",
6+
"dependentChangeType": "patch"
7+
}

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ export const PeopleAndChatHeader = (props: PeopleAndChatHeaderProps): JSX.Elemen
7979
onClick={onChatButtonClicked}
8080
styles={mobilePaneButtonStylesThemed}
8181
checked={activeTab === 'chat'}
82+
aria-selected={activeTab === 'chat'}
8283
role={'tab'}
8384
disabled={props.disableChatButton}
8485
>
@@ -92,6 +93,7 @@ export const PeopleAndChatHeader = (props: PeopleAndChatHeaderProps): JSX.Elemen
9293
onClick={onPeopleButtonClicked}
9394
styles={mobilePaneButtonStylesThemed}
9495
checked={activeTab === 'people'}
96+
aria-selected={activeTab === 'people'}
9597
role={'tab'}
9698
disabled={props.disablePeopleButton}
9799
>

0 commit comments

Comments
 (0)