Improve aria labels around spaces avatar uploader

pull/21833/head
Michael Telatynski 2021-08-06 14:46:02 +01:00
parent 7a11279682
commit 3fd2c00516
2 changed files with 8 additions and 2 deletions

View File

@ -65,6 +65,7 @@ export const SpaceAvatar = ({
}} }}
kind="link" kind="link"
className="mx_SpaceBasicSettings_avatar_remove" className="mx_SpaceBasicSettings_avatar_remove"
aria-label={_t("Delete avatar")}
> >
{ _t("Delete") } { _t("Delete") }
</AccessibleButton> </AccessibleButton>
@ -72,7 +73,11 @@ export const SpaceAvatar = ({
} else { } else {
avatarSection = <React.Fragment> avatarSection = <React.Fragment>
<div className="mx_SpaceBasicSettings_avatar" onClick={() => avatarUploadRef.current?.click()} /> <div className="mx_SpaceBasicSettings_avatar" onClick={() => avatarUploadRef.current?.click()} />
<AccessibleButton onClick={() => avatarUploadRef.current?.click()} kind="link"> <AccessibleButton
onClick={() => avatarUploadRef.current?.click()}
kind="link"
aria-label={_t("Upload avatar")}
>
{ _t("Upload") } { _t("Upload") }
</AccessibleButton> </AccessibleButton>
</React.Fragment>; </React.Fragment>;

View File

@ -1014,7 +1014,9 @@
"Your server isn't responding to some <a>requests</a>.": "Your server isn't responding to some <a>requests</a>.", "Your server isn't responding to some <a>requests</a>.": "Your server isn't responding to some <a>requests</a>.",
"Decline (%(counter)s)": "Decline (%(counter)s)", "Decline (%(counter)s)": "Decline (%(counter)s)",
"Accept <policyLink /> to continue:": "Accept <policyLink /> to continue:", "Accept <policyLink /> to continue:": "Accept <policyLink /> to continue:",
"Delete avatar": "Delete avatar",
"Delete": "Delete", "Delete": "Delete",
"Upload avatar": "Upload avatar",
"Upload": "Upload", "Upload": "Upload",
"Name": "Name", "Name": "Name",
"Description": "Description", "Description": "Description",
@ -2718,7 +2720,6 @@
"Everyone": "Everyone", "Everyone": "Everyone",
"Your community hasn't got a Long Description, a HTML page to show to community members.<br />Click here to open settings and give it one!": "Your community hasn't got a Long Description, a HTML page to show to community members.<br />Click here to open settings and give it one!", "Your community hasn't got a Long Description, a HTML page to show to community members.<br />Click here to open settings and give it one!": "Your community hasn't got a Long Description, a HTML page to show to community members.<br />Click here to open settings and give it one!",
"Long Description (HTML)": "Long Description (HTML)", "Long Description (HTML)": "Long Description (HTML)",
"Upload avatar": "Upload avatar",
"Community %(groupId)s not found": "Community %(groupId)s not found", "Community %(groupId)s not found": "Community %(groupId)s not found",
"This homeserver does not support communities": "This homeserver does not support communities", "This homeserver does not support communities": "This homeserver does not support communities",
"Failed to load %(groupId)s": "Failed to load %(groupId)s", "Failed to load %(groupId)s": "Failed to load %(groupId)s",