Skip to content

Commit

Permalink
fix: add alt text to tool images
Browse files Browse the repository at this point in the history
  • Loading branch information
paulschreiber committed Nov 29, 2023
1 parent 76fc58c commit ea65f1b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions src/localization/locales/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,8 @@
"img": {
"height": "140",
"width": "250",
"src": "tools/kobotoolbox-screenshot.png"
"src": "tools/kobotoolbox-screenshot.png",
"alt": "A phone, a laptop, and a tablet, each displaying a data collection form. The tool’s logo is in the foreground."
},
"description": [
"Design and build forms quickly",
Expand All @@ -181,7 +182,8 @@
"img": {
"height": "140",
"width": "250",
"src": "tools/landscale-screenshot.png"
"src": "tools/landscale-screenshot.png",
"alt": "A dashboard containing charts and graphs about a landscape. The tool’s logo is in the foreground."
},
"description": [
"Assess landscape sustainability performance",
Expand All @@ -198,6 +200,7 @@
"height": "188",
"width": "250",
"src": "tools/story-maps.png",
"alt": "A satellite map of a bend in a river, overlayed by a window containing a picture and a block of text.",
"caption": "Rocky Hill’s Story Map"
},
"description": ["Create beautiful map-based stories"],
Expand Down
2 changes: 1 addition & 1 deletion src/tool/components/ToolCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const ToolIconAndLink = ({ tool, title, external }) => {
<Box
component="img"
src={toolImage}
alt=""
alt={t(`tools.${tool}.img.alt`)}
width={t(`tools.${tool}.img.width`)}
height={t(`tools.${tool}.img.height`)}
sx={{
Expand Down

0 comments on commit ea65f1b

Please sign in to comment.