[MM-55283] Add channel name to aria label for sidebar options (#26652)

* Add channel name to aria label for sidebar options

* Revert text message for menuButtonTooltip

* Update formatMessage

* Follow linting

* Add aria label definition for sidebar button

* cleanup

* Fix linting

* Update snapshot sidebar_channel_menu
This commit is contained in:
Karim Aljandali 2024-04-12 16:45:57 -04:00 committed by GitHub
parent df75277a0c
commit 96ab35ba34
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 15 additions and 11 deletions

View File

@ -11,7 +11,7 @@ exports[`components/sidebar/sidebar_channel/sidebar_channel_menu should match sn
}
menuButton={
Object {
"aria-label": "Channel options",
"aria-label": "Channel options for {channelName}",
"children": <DotsVerticalIcon
size={16}
/>,
@ -157,7 +157,7 @@ exports[`components/sidebar/sidebar_channel/sidebar_channel_menu should match sn
}
menuButton={
Object {
"aria-label": "Channel options",
"aria-label": "Channel options for {channelName}",
"children": <DotsVerticalIcon
size={16}
/>,
@ -303,7 +303,7 @@ exports[`components/sidebar/sidebar_channel/sidebar_channel_menu should match sn
}
menuButton={
Object {
"aria-label": "Channel options",
"aria-label": "Channel options for {channelName}",
"children": <DotsVerticalIcon
size={16}
/>,
@ -449,7 +449,7 @@ exports[`components/sidebar/sidebar_channel/sidebar_channel_menu should show cor
}
menuButton={
Object {
"aria-label": "Channel options",
"aria-label": "Channel options for {channelName}",
"children": <DotsVerticalIcon
size={16}
/>,
@ -563,7 +563,7 @@ exports[`components/sidebar/sidebar_channel/sidebar_channel_menu should show cor
}
menuButton={
Object {
"aria-label": "Channel options",
"aria-label": "Channel options for {channelName}",
"children": <DotsVerticalIcon
size={16}
/>,
@ -692,7 +692,7 @@ exports[`components/sidebar/sidebar_channel/sidebar_channel_menu should show cor
}
menuButton={
Object {
"aria-label": "Channel options",
"aria-label": "Channel options for {channelName}",
"children": <DotsVerticalIcon
size={16}
/>,
@ -838,7 +838,7 @@ exports[`components/sidebar/sidebar_channel/sidebar_channel_menu should show cor
}
menuButton={
Object {
"aria-label": "Channel options",
"aria-label": "Channel options for {channelName}",
"children": <DotsVerticalIcon
size={16}
/>,
@ -984,7 +984,7 @@ exports[`components/sidebar/sidebar_channel/sidebar_channel_menu should show cor
}
menuButton={
Object {
"aria-label": "Channel options",
"aria-label": "Channel options for {channelName}",
"children": <DotsVerticalIcon
size={16}
/>,
@ -1130,7 +1130,7 @@ exports[`components/sidebar/sidebar_channel/sidebar_channel_menu should show cor
}
menuButton={
Object {
"aria-label": "Channel options",
"aria-label": "Channel options for {channelName}",
"children": <DotsVerticalIcon
size={16}
/>,
@ -1276,7 +1276,7 @@ exports[`components/sidebar/sidebar_channel/sidebar_channel_menu should show cor
}
menuButton={
Object {
"aria-label": "Channel options",
"aria-label": "Channel options for {channelName}",
"children": <DotsVerticalIcon
size={16}
/>,

View File

@ -271,7 +271,10 @@ const SidebarChannelMenu = (props: Props) => {
menuButton={{
id: `SidebarChannelMenu-Button-${props.channel.id}`,
class: 'SidebarMenu_menuButton',
'aria-label': formatMessage({id: 'sidebar_left.sidebar_channel_menu.editChannel', defaultMessage: 'Channel options'}),
'aria-label': formatMessage({
id: 'sidebar_left.sidebar_channel_menu.editChannel.ariaLabel',
defaultMessage: 'Channel options for {channelName}',
}, {channelName: props.channel.name}),
children: <DotsVerticalIcon size={16}/>,
}}
menuButtonTooltip={{

View File

@ -5067,6 +5067,7 @@
"sidebar_left.sidebar_channel_menu.copyLink": "Copy Link",
"sidebar_left.sidebar_channel_menu.dropdownAriaLabel": "Edit channel menu",
"sidebar_left.sidebar_channel_menu.editChannel": "Channel options",
"sidebar_left.sidebar_channel_menu.editChannel.ariaLabel": "Channel options for {channelName}",
"sidebar_left.sidebar_channel_menu.favoriteChannel": "Favorite",
"sidebar_left.sidebar_channel_menu.favorites": "Favorites",
"sidebar_left.sidebar_channel_menu.leaveChannel": "Leave Channel",