mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 03:06:37 +00:00
Fix the missing accessibility description on the Settings button's avatar
The accessibility audit flagged the avatar node in AvatarSettingsButtonLabel as having no description, since it carried an accessibility identifier but never a label. The avatar is purely decorative, both screens that use it wrap it in a button that is already labelled with the Settings title, so it is now hidden from accessibility and the identifier has moved up onto the buttons themselves, where the UI and integration tests query it.
This commit is contained in:
@@ -18,9 +18,9 @@ struct AvatarSettingsButtonLabel: View {
|
||||
contentID: userProfile.id,
|
||||
avatarSize: .user(on: .chats),
|
||||
mediaProvider: mediaProvider)
|
||||
.accessibilityIdentifier(A11yIdentifiers.homeScreen.userAvatar)
|
||||
.modifier(StatusEmojiModifier(statusEmoji: userProfile.status.displayed?.emoji))
|
||||
.geometryGroup()
|
||||
.accessibilityHidden(true) // Decorative, the enclosing button provides the description.
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -89,6 +89,7 @@ struct HomeScreen: View {
|
||||
mediaProvider: context.mediaProvider)
|
||||
}
|
||||
.accessibilityLabel(L10n.commonSettings)
|
||||
.accessibilityIdentifier(A11yIdentifiers.homeScreen.userAvatar)
|
||||
}
|
||||
|
||||
@ViewBuilder
|
||||
|
||||
@@ -101,6 +101,7 @@ struct SpacesScreen: View {
|
||||
}
|
||||
.buttonStyle(.borderless)
|
||||
.accessibilityLabel(L10n.commonSettings)
|
||||
.accessibilityIdentifier(A11yIdentifiers.homeScreen.userAvatar)
|
||||
}
|
||||
|
||||
ToolbarItem(placement: .principal) {
|
||||
|
||||
Reference in New Issue
Block a user