Change wording from avatar to profile picture (#7015)
* Change wording from avatar to profile picture Signed-off-by: Aaron Raimist <aaron@raim.ist> * lint Signed-off-by: Aaron Raimist <aaron@raim.ist> * Update EventListSummary Signed-off-by: Aaron Raimist <aaron@raim.ist> * Delete MembershipEventListSummary.tsx Signed-off-by: Aaron Raimist <aaron@raim.ist> * delint * Update tests --------- Signed-off-by: Aaron Raimist <aaron@raim.ist> Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
c153a4d388
commit
71fe08ea0f
13 changed files with 38 additions and 30 deletions
|
@ -46,6 +46,8 @@ interface IProps {
|
|||
inputRef?: React.RefObject<HTMLImageElement & HTMLSpanElement>;
|
||||
className?: string;
|
||||
tabIndex?: number;
|
||||
altText?: string;
|
||||
ariaLabel?: string;
|
||||
}
|
||||
|
||||
const calculateUrls = (url?: string | null, urls?: string[], lowBandwidth = false): string[] => {
|
||||
|
@ -113,6 +115,8 @@ const BaseAvatar: React.FC<IProps> = (props) => {
|
|||
onClick,
|
||||
inputRef,
|
||||
className,
|
||||
altText = _t("Avatar"),
|
||||
ariaLabel = _t("Avatar"),
|
||||
...otherProps
|
||||
} = props;
|
||||
|
||||
|
@ -153,7 +157,7 @@ const BaseAvatar: React.FC<IProps> = (props) => {
|
|||
if (onClick) {
|
||||
return (
|
||||
<AccessibleButton
|
||||
aria-label={_t("Avatar")}
|
||||
aria-label={ariaLabel}
|
||||
aria-live="off"
|
||||
{...otherProps}
|
||||
element="span"
|
||||
|
@ -193,7 +197,7 @@ const BaseAvatar: React.FC<IProps> = (props) => {
|
|||
height: toPx(height),
|
||||
}}
|
||||
title={title}
|
||||
alt={_t("Avatar")}
|
||||
alt={altText}
|
||||
inputRef={inputRef}
|
||||
data-testid="avatar-img"
|
||||
{...otherProps}
|
||||
|
|
|
@ -26,6 +26,7 @@ import { mediaFromMxc } from "../../../customisations/Media";
|
|||
import { CardContext } from "../right_panel/context";
|
||||
import UserIdentifierCustomisations from "../../../customisations/UserIdentifier";
|
||||
import { useRoomMemberProfile } from "../../../hooks/room/useRoomMemberProfile";
|
||||
import { _t } from "../../../languageHandler";
|
||||
|
||||
interface IProps extends Omit<React.ComponentProps<typeof BaseAvatar>, "name" | "idName" | "url"> {
|
||||
member: RoomMember | null;
|
||||
|
@ -103,6 +104,8 @@ export default function MemberAvatar({
|
|||
}
|
||||
: props.onClick
|
||||
}
|
||||
altText={_t("Profile picture")}
|
||||
ariaLabel={_t("Profile picture")}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue