Added more accessibility info to the name field

This commit is contained in:
Morgan Pretty 2023-03-16 11:57:13 +11:00
parent 4012f91777
commit 15a0eccaf2
2 changed files with 11 additions and 0 deletions

View file

@ -254,6 +254,9 @@ class SettingsViewModel: SessionTableViewModel<SettingsViewModel.NavButton, Sett
customPadding: SessionCell.Padding(bottom: Values.smallSpacing),
backgroundStyle: .noBackground
),
accessibility: SessionCell.Accessibility(
label: "Profile picture"
),
onTap: {
self?.updateProfilePicture(
hasCustomImage: ProfileManager.hasProfileImageData(
@ -275,6 +278,10 @@ class SettingsViewModel: SessionTableViewModel<SettingsViewModel.NavButton, Sett
customPadding: SessionCell.Padding(top: Values.smallSpacing),
backgroundStyle: .noBackground
),
accessibility: SessionCell.Accessibility(
identifier: "Username",
label: profile.displayName()
),
onTap: { self?.setIsEditing(true) }
)
]
@ -293,6 +300,9 @@ class SettingsViewModel: SessionTableViewModel<SettingsViewModel.NavButton, Sett
styling: SessionCell.StyleInfo(
customPadding: SessionCell.Padding(bottom: Values.smallSpacing),
backgroundStyle: .noBackground
),
accessibility: SessionCell.Accessibility(
label: "Session ID"
)
),
SessionCell.Info(

View file

@ -471,6 +471,7 @@ extension SessionCell {
profilePictureView.accessibilityIdentifier = accessibility?.identifier
profilePictureView.accessibilityLabel = accessibility?.label
profilePictureView.isAccessibilityElement = (accessibility != nil)
profilePictureView.update(
publicKey: profileId,
threadVariant: threadVariant,