A11Y: Don't show title attr on post avatars (#10719)
This commit is contained in:
parent
ce3fe2f4c4
commit
614e0bab57
|
@ -35,7 +35,12 @@ export function avatarImg(wanted, attrs) {
|
||||||
if (!url || url.length === 0) {
|
if (!url || url.length === 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const title = attrs.name || formatUsername(attrs.username);
|
|
||||||
|
let title;
|
||||||
|
|
||||||
|
if (!attrs.hideTitle) {
|
||||||
|
title = attrs.name || formatUsername(attrs.username);
|
||||||
|
}
|
||||||
|
|
||||||
let className =
|
let className =
|
||||||
"avatar" + (attrs.extraClasses ? " " + attrs.extraClasses : "");
|
"avatar" + (attrs.extraClasses ? " " + attrs.extraClasses : "");
|
||||||
|
@ -168,6 +173,7 @@ createWidget("post-avatar", {
|
||||||
name: attrs.name,
|
name: attrs.name,
|
||||||
url: attrs.usernameUrl,
|
url: attrs.usernameUrl,
|
||||||
className: "main-avatar",
|
className: "main-avatar",
|
||||||
|
hideTitle: true,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue