Profile redesign: Add alt to avatar and header (#38532)

This commit is contained in:
Echo authored and GitHub committed 2026-04-02 14:47:11 +00:00
1 parent f90f1e3b75
commit 59299c69ff
5 files changed
+12 -3

No files matched your search

@@ -13,6 +13,7 @@ interface Props {
account:
| Pick<Account, 'id' | 'acct' | 'avatar' | 'avatar_static'>
| undefined; // FIXME: remove `undefined` once we know for sure its always there
alt?: string;
size?: number;
style?: React.CSSProperties;
inline?: boolean;
@@ -25,6 +26,7 @@ interface Props {
export const Avatar: React.FC<Props> = ({
account,
alt = '',
animate = autoPlayGif,
size = 20,
inline = false,
@@ -65,7 +67,7 @@ export const Avatar: React.FC<Props> = ({
style={style}
>
{src && !error && (
<img src={src} alt='' onLoad={handleLoad} onError={handleError} />
<img src={src} alt={alt} onLoad={handleLoad} onError={handleError} />
)}
{counter && (