Skip to content

Commit f2e8814

Browse files
committed
Add descriptive aria-label / alt text to linked images
1 parent 48a1ee1 commit f2e8814

File tree

6 files changed

+19
-10
lines changed

6 files changed

+19
-10
lines changed

public/locales/en/translation.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,7 @@
342342
"addGroupingQuestion": "Add grouping question"
343343
},
344344
"navBar": {
345+
"norppa": "To Norppa homepage",
345346
"myFeedbacks": "My feedback",
346347
"browseCourses": "Browse courses",
347348
"myCourses": "My surveys",
@@ -531,7 +532,8 @@
531532
"accessibilityDocument": "Accessibility document",
532533
"lastUpdate": "Latest release {{duration}} ago",
533534
"server": "Server version {{version}}",
534-
"client": "Client version {{version}}"
535+
"client": "Client version {{version}}",
536+
"toska": "Read about the developers of Norppa."
535537
},
536538
"courseRealisationFeedback": {
537539
"noFeedbackTarget": "This course does not have a feedback available to you"

public/locales/fi/translation.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,7 @@
341341
"addGroupingQuestion": "Lisää ryhmittelykysymys"
342342
},
343343
"navBar": {
344+
"norppa": "Norpan kotisivulle",
344345
"myFeedbacks": "Kurssipalautteeni",
345346
"browseCourses": "Selaa kursseja",
346347
"myCourses": "Kyselyni",
@@ -531,7 +532,8 @@
531532
"accessibilityDocument": "Saavutettavuusseloste",
532533
"lastUpdate": "Viimeisin julkaisu {{duration}} sitten",
533534
"server": "Palvelinversio {{version}}",
534-
"client": "Selainversio {{version}}"
535+
"client": "Selainversio {{version}}",
536+
"toska": "Lue Norpan kehittäjistä."
535537
},
536538
"courseRealisationFeedback": {
537539
"noFeedbackTarget": "Tällä kurssilla ei ole sinulle saatavilla olevaa palautetta"

public/locales/sv/translation.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,7 @@
324324
"addGroupingQuestion": "Lägg till grupperingsfråga"
325325
},
326326
"navBar": {
327+
"norppa": "Till Norppas hemsida",
327328
"myFeedbacks": "Mina responser",
328329
"browseCourses": "Bläddra kurser",
329330
"myCourses": "Mina enkäter",
@@ -507,7 +508,8 @@
507508
"accessibilityDocument": "Tillgänglighetsutlåtande",
508509
"lastUpdate": "Senaste versionen {{duration}} sedan",
509510
"server": "Serverversion {{version}}",
510-
"client": "Klientversion {{version}}"
511+
"client": "Klientversion {{version}}",
512+
"toska": "Läs om Norppas utvecklare."
511513
},
512514
"courseRealisationFeedback": {
513515
"noFeedbackTarget": "Det finns ingen respons tillgänglig för dig på denna kurs"

src/client/components/Footer-default.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ const Footer = ({ user }) => {
6969
</div>
7070
<Box display="flex" flexDirection="column" alignItems="center" rowGap="1rem">
7171
<Link href={t('links:toska')} target="_blank" rel="noopener" underline="always">
72-
<img src={images.toska_color} loading="lazy" style={styles.logo} alt="Toska" />
72+
<img src={images.toska_color} loading="lazy" style={styles.logo} alt={t('footer:toska')} />
7373
</Link>
7474
<Typography component="p" variant="subtitle1" fontSize={10}>
7575
{t('footer:lastUpdate', { duration: uptime })}

src/client/components/NavBar/Logo.jsx

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
import React from 'react'
22
/** @jsxImportSource @emotion/react */
33

4-
import merge from 'lodash/merge'
5-
import { Box } from '@mui/material'
4+
import { useTranslation } from 'react-i18next'
65

6+
import merge from 'lodash/merge'
77
import { Link } from 'react-router-dom'
88

9+
import Box from '@mui/material/Box'
10+
911
import hyLogo from '../../assets/hy_logo.svg'
1012

1113
import { useUiConfig } from '../CustomUiConfigProvider'
@@ -43,16 +45,17 @@ const styles = {
4345
}
4446

4547
const Logo = ({ guest = false }) => {
48+
const { t } = useTranslation()
4649
const customUiConfig = useUiConfig()
4750
const customStyles = customUiConfig?.styles?.logo ?? {}
4851
const logoStyles = merge(styles, customStyles)
4952
const customLogo = customUiConfig?.images?.logo
5053

5154
return (
52-
<Link to={guest ? '/noad' : '/'} style={{ textDecoration: 'none' }}>
55+
<Link to={guest ? '/noad' : '/'} style={{ textDecoration: 'none' }} aria-label={t('navBar:norppa')}>
5356
<Box sx={logoStyles.link}>
54-
<img src={customLogo || hyLogo} alt="HY" style={logoStyles.image} />
55-
<Box css={logoStyles.text}>Norppa</Box>
57+
<img src={customLogo || hyLogo} alt="" aria-hidden="true" style={logoStyles.image} />
58+
<span style={logoStyles.text}>Norppa</span>
5659
</Box>
5760
</Link>
5861
)

src/client/pages/GuestUser/GuestFooter.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ const GuestFooter = () => {
3939
</div>
4040

4141
<Link href={t('links:toska')} target="_blank" rel="noopener" underline="hover">
42-
<img src={images.toska_color} style={styles.logo} alt="Toska" />
42+
<img src={images.toska_color} style={styles.logo} alt={t('footer:toska')} />
4343
</Link>
4444
</Box>
4545
</Container>

0 commit comments

Comments
 (0)