Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions dotcom-rendering/src/components/TagPageHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,13 @@ const imageStyle = css`
}
`;

const BylineImage = ({ image }: { image: string }) => {
const BylineImage = ({
image,
altText,
}: {
image: string;
altText: string;
}) => {
const sources = generateSources(image, [
{ breakpoint: breakpoints.mobile, width: 80 },
{ breakpoint: breakpoints.desktop, width: 100 },
Expand All @@ -281,7 +287,7 @@ const BylineImage = ({ image }: { image: string }) => {
return (
<>
<Sources sources={sources} />
<img alt="" src={fallback} css={imageStyle} />
<img alt={altText} src={fallback} css={imageStyle} />
</>
);
};
Expand Down Expand Up @@ -322,7 +328,10 @@ const HeaderImage = (props: { image: Props['image']; title: string }) => {
case 'byline':
return (
<HeaderPicture>
<BylineImage image={props.image.url} />
<BylineImage
image={props.image.url}
altText={`Headshot of ${props.title}`}
/>
</HeaderPicture>
);
case 'footballCrest':
Expand Down
Loading