Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alternative hands, role=img #501

Merged
merged 1 commit into from
Nov 14, 2024
Merged
Show file tree
Hide file tree
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
8 changes: 8 additions & 0 deletions lang/ui.en.json
Original file line number Diff line number Diff line change
Expand Up @@ -712,9 +712,17 @@
"description": "Link to home page"
},
"homepage-alt": {
"defaultMessage": "graph showing x, y, z graph lines representing micro:bit accelerometer data with clapping hands overlaid",
"description": "Alt text for image in homepage"
},
"homepage-alt-graph": {
"defaultMessage": "graph showing x, y, z graph lines representing micro:bit accelerometer data",
"description": "Alt text for image in homepage"
},
"homepage-alt-hands": {
"defaultMessage": "clapping hands",
"description": "Alt text for image in homepage"
},
"homepage-description": {
"defaultMessage": "Train a machine learning model on your own movement data and run it on your micro:bit.",
"description": "Home page description"
Expand Down
Binary file added src/images/clap-hands.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed src/images/clap-square.png
Binary file not shown.
12 changes: 12 additions & 0 deletions src/messages/ui.en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1188,11 +1188,23 @@
}
],
"homepage-alt": [
{
"type": 0,
"value": "graph showing x, y, z graph lines representing micro:bit accelerometer data with clapping hands overlaid"
}
],
"homepage-alt-graph": [
{
"type": 0,
"value": "graph showing x, y, z graph lines representing micro:bit accelerometer data"
}
],
"homepage-alt-hands": [
{
"type": 0,
"value": "clapping hands"
}
],
"homepage-description": [
{
"type": 0,
Expand Down
15 changes: 10 additions & 5 deletions src/pages/HomePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import ResourceCard from "../components/ResourceCard";
import YoutubeVideoEmbed from "../components/YoutubeVideoEmbed";
import { useDeployment } from "../deployment";
import { flags } from "../flags";
import clap from "../images/clap-square.png";
import clap from "../images/clap-hands.png";
import xyzGraph from "../images/xyz-graph.png";
import { createNewPageUrl } from "../urls";

Expand Down Expand Up @@ -80,23 +80,28 @@ const HomePage = () => {
<FormattedMessage id="get-started-action" />
</Button>
</VStack>
<Box flex="1" position="relative">
<Box
flex="1"
position="relative"
role="img"
aria-label={intl.formatMessage({ id: "homepage-alt" })}
>
<Image
src={xyzGraph}
borderRadius="lg"
bgColor="white"
pr={1}
alt={intl.formatMessage({ id: "homepage-alt" })}
alt={intl.formatMessage({ id: "homepage-alt-graph" })}
/>
<Image
height="55%"
height="100%"
position="absolute"
bottom={0}
left={0}
src={clap}
borderRadius="md"
pr={1}
alt={intl.formatMessage({ id: "homepage-alt" })}
alt={intl.formatMessage({ id: "homepage-alt-hands" })}
/>
</Box>
</HStack>
Expand Down
Loading