Skip to content

Commit

Permalink
Alternative hands, role=img
Browse files Browse the repository at this point in the history
  • Loading branch information
microbit-matt-hillsdon committed Nov 14, 2024
1 parent 6dfeb6a commit c432910
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 5 deletions.
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

0 comments on commit c432910

Please sign in to comment.