Profile redesign: Add alt to avatar and header (#38532)
This commit is contained in:
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 && (
|
||||
|
||||
Reference in new issue
Block a user