diff --git a/src/components/PageGrid/index.tsx b/src/components/PageGrid/index.tsx index e546b6cd..7d9b0d98 100644 --- a/src/components/PageGrid/index.tsx +++ b/src/components/PageGrid/index.tsx @@ -47,6 +47,7 @@ export const PageGrid: React.FC = props => { layout={'fill'} objectFit={'cover'} src={item.cover.src} + alt={item.cover.alt} /> )} layout={layout} diff --git a/src/remote/factory.ts b/src/remote/factory.ts index 76b4b638..7c16aa4b 100644 --- a/src/remote/factory.ts +++ b/src/remote/factory.ts @@ -157,7 +157,7 @@ export function createCardGrid(card: StrapiPageCard): PageCardDto { src: card.page.cover.url, width: card.page.cover.width, height: card.page.cover.height, - // alt: '', + alt: card.page.title, } } } diff --git a/src/types.ts b/src/types.ts index a8bbf03d..a921ecc1 100644 --- a/src/types.ts +++ b/src/types.ts @@ -96,6 +96,7 @@ export type ImageDefinition = { width: number height: number src: string + alt?: string } export type TextToken = {