ChannelThumbnail: remove alt text to prevent from being used as search result (#1687)

1684

While Lighthouse suggests adding `alt`, I think it's just a recommendation that does not affect the Core Vitals score directly -- the large css plays a bigger role at the moment.

Also, these are more "decorative" than "functional", because one could click the channel name navigate.
This commit is contained in:
infinite-persistence 2022-06-14 12:17:46 +08:00 committed by GitHub
parent 56de3fdd13
commit 94d5c11a71
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -121,7 +121,6 @@ function ChannelThumbnail(props: Props) {
> >
{/* width: use the same size for all 'small' variants so that caching works better */} {/* width: use the same size for all 'small' variants so that caching works better */}
<OptimizedImage <OptimizedImage
alt={__('Channel profile picture')}
className={!channelThumbnail ? 'channel-thumbnail__default' : 'channel-thumbnail__custom'} className={!channelThumbnail ? 'channel-thumbnail__default' : 'channel-thumbnail__custom'}
src={(!thumbLoadError && channelThumbnail) || defaultAvatar} src={(!thumbLoadError && channelThumbnail) || defaultAvatar}
width={xxsmall || xsmall || small ? 64 : 160} width={xxsmall || xsmall || small ? 64 : 160}