Add alt text to feature image on blog post
This commit is contained in:
parent
5d787c5054
commit
2efcc00d52
|
@ -27,7 +27,10 @@ export function Article(props: IPost) {
|
|||
<article>
|
||||
<div className="flex flex-col items-center mt-10 mb-16 space-y-4">
|
||||
<Contained>
|
||||
<ArticleSectionFeatureImage featureImage={featureImage} />
|
||||
<ArticleSectionFeatureImage
|
||||
featureImage={featureImage}
|
||||
title={title}
|
||||
/>
|
||||
</Contained>
|
||||
|
||||
<ArticleContained>
|
||||
|
|
|
@ -2,15 +2,16 @@ import { IFigureImage } from '../../../types/cms';
|
|||
|
||||
interface Props {
|
||||
featureImage: IFigureImage;
|
||||
title: string;
|
||||
}
|
||||
|
||||
export function ArticleSectionFeatureImage({ featureImage }: Props) {
|
||||
export function ArticleSectionFeatureImage({ featureImage, title }: Props) {
|
||||
return (
|
||||
<div className="w-full pb-4 desktop:pb-0">
|
||||
<div className="relative w-full mb-4 aspect-w-14 aspect-h-8">
|
||||
<img
|
||||
src={featureImage?.imageUrl}
|
||||
alt={featureImage?.description ?? ''}
|
||||
alt={featureImage?.description ?? title}
|
||||
className="object-cover rounded"
|
||||
/>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue