@@ -77,6 +77,7 @@ export default function UserMenuTemplate(this: UserMenu) {
7777 selectionMode = "None"
7878 separators = "None"
7979 accessibleRole = "Menu"
80+ accessibleName = { this . _ariaLabelledByActions }
8081 onItemClick = { this . _handleMenuItemClick }
8182 onui5-close-menu = { this . _handleMenuItemClose }
8283 >
@@ -103,16 +104,18 @@ function headerContent(this: UserMenu) {
103104 return ( < >
104105 { this . _selectedAccount &&
105106 < div class = "ui5-user-menu-selected-account" aria-label = { this . _ariaLabelledByAccountInformationText } >
106- < Avatar size = "L" onClick = { this . _handleAvatarClick } initials = { this . _selectedAccount . _initials } colorScheme = { this . _selectedAccount . avatarColorScheme } fallbackIcon = { personPlaceholder } class = "ui5-user-menu-selected-account-avatar" interactive >
107- { this . _selectedAccount . avatarSrc &&
108- < img src = { this . _selectedAccount . avatarSrc } title = { this . showEditButton ? this . _editAvatarTooltip : undefined } />
109- }
110- { this . showEditButton &&
111- < Tag slot = "badge" wrappingType = "None" design = "Set1" colorScheme = "5" >
112- < Icon slot = "icon" name = { edit } > </ Icon >
113- </ Tag >
114- }
115- </ Avatar >
107+ < span title = { this . showEditButton ? this . _editAvatarTooltip : undefined } >
108+ < Avatar size = "L" onClick = { this . _handleAvatarClick } initials = { this . _selectedAccount . _initials } colorScheme = { this . _selectedAccount . avatarColorScheme } fallbackIcon = { personPlaceholder } class = "ui5-user-menu-selected-account-avatar" interactive >
109+ { this . _selectedAccount . avatarSrc &&
110+ < img src = { this . _selectedAccount . avatarSrc } />
111+ }
112+ { this . showEditButton &&
113+ < Tag slot = "badge" wrappingType = "None" design = "Set1" colorScheme = "5" >
114+ < Icon slot = "icon" name = { edit } > </ Icon >
115+ </ Tag >
116+ }
117+ </ Avatar >
118+ </ span >
116119 { this . _selectedAccount . titleText &&
117120 < Text id = "selected-account-title" class = "ui5-user-menu-selected-account-title" > { this . _selectedAccount . titleText } </ Text >
118121 }
@@ -137,7 +140,7 @@ function headerContent(this: UserMenu) {
137140
138141function otherAccountsContent ( this : UserMenu ) {
139142 return ( < >
140- < Panel collapsed = { true } class = "ui5-user-menu-other-accounts" aria-label = { this . _otherAccountsButtonText } >
143+ < Panel collapsed = { true } class = "ui5-user-menu-other-accounts" >
141144 < div slot = "header" class = "ui5-user-menu-account-header" >
142145 < Title slot = "header" level = "H4" wrapping-type = "None" > { this . _otherAccountsButtonText } ({ this . _otherAccounts . length } )</ Title >
143146 { this . showEditAccounts &&
@@ -155,7 +158,8 @@ function otherAccountsContent(this: UserMenu) {
155158
156159function otherAccountsList ( this : UserMenu ) {
157160 return ( < >
158- < List onItemClick = { this . _handleAccountSwitch } aria-label = { this . _ariaLabelledByActions } loadingDelay = { 0 }
161+ < List onItemClick = { this . _handleAccountSwitch } loadingDelay = { 0 }
162+ accessibleName = { `${ this . _otherAccountsButtonText } (${ this . _otherAccounts . length } )` }
159163 loading = { this . _otherAccounts . some ( account => account . loading === true ) } >
160164 { this . _otherAccounts . map ( ( account , index ) =>
161165 < ListItemCustom
@@ -164,7 +168,7 @@ function otherAccountsList(this: UserMenu) {
164168 "ariaPosinset" : index + 1 ,
165169 "ariaSetsize" : this . _otherAccounts . length
166170 } }
167- aria-label = { account . titleText }
171+ accessibleName = { this . getAccountDescriptionText ( account ) }
168172 >
169173 < div class = "ui5-user-menu-other-accounts-content" >
170174 < Avatar slot = "image" size = "S" initials = { account . _initials } fallbackIcon = { personPlaceholder } colorScheme = { account . avatarColorScheme } >
0 commit comments