Skip to content

Commit e07f709

Browse files
committed
✨(frontend) improve accessibility of global docs home link at top
moved aria-label and added aria-hidden for better accessibility Signed-off-by: Cyril <[email protected]>
1 parent afbacb0 commit e07f709

File tree

4 files changed

+12
-5
lines changed

4 files changed

+12
-5
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ and this project adheres to
1515
- #1235
1616
- #1255
1717
- #1262
18+
- #1270
1819

1920
## [3.5.0] - 2025-07-31
2021

src/frontend/apps/e2e/__tests__/app-impress/header.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ test.describe('Header', () => {
1212

1313
const header = page.locator('header').first();
1414

15-
await expect(header.getByLabel('Back to homepage')).toBeVisible();
15+
await expect(header.getByTestId('header-logo-link')).toBeVisible();
1616
await expect(header.locator('h1').getByText('Docs')).toHaveCSS(
1717
'font-family',
1818
/Roboto/i,

src/frontend/apps/impress/src/features/header/components/Header.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,11 @@ export const Header = () => {
3939
className="--docs--header"
4040
>
4141
{!isDesktop && <ButtonTogglePanel />}
42-
<StyledLink href="/" data-testid="header-logo-link">
42+
<StyledLink
43+
href="/"
44+
data-testid="header-logo-link"
45+
aria-label={t('Back to homepage')}
46+
>
4347
<Box
4448
$align="center"
4549
$gap={spacingsTokens['3xs']}
@@ -50,11 +54,11 @@ export const Header = () => {
5054
>
5155
<IconDocs
5256
data-testid="header-icon-docs"
53-
aria-label={t('Back to homepage')}
5457
width={32}
5558
color={colorsTokens['primary-text']}
59+
aria-hidden="true"
5660
/>
57-
<Title headingLevel="h1" />
61+
<Title headingLevel="h1" aria-hidden="true" />
5862
</Box>
5963
</StyledLink>
6064
{!isDesktop ? (

src/frontend/apps/impress/src/i18n/translations.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,7 @@
370370
},
371371
"en": {
372372
"translation": {
373+
"Back to homepage": "Back to Docs homepage",
373374
"Search docs": "Search docs",
374375
"More options": "More options",
375376
"Pinned documents": "Pinned documents",
@@ -623,7 +624,7 @@
623624
"Doc visibility card": "Carte de visibilité du doc",
624625
"Docs": "Docs",
625626
"Docs Logo": "Logo Docs",
626-
"Back to homepage": "Retour page d'accueil",
627+
"Back to homepage": "Retour à la page d'accueil de Docs",
627628
"Docs is already available, log in to use it now.": "Docs est déjà disponible, connectez-vous pour l’utiliser dès maintenant.",
628629
"Docs makes real-time collaboration simple. Invite collaborators - public officials or external partners - with one click to see their changes live, while maintaining precise access control for data security.": "Docs simplifie la collaboration en temps réel. Invitez des collaborateurs - agents publics ou partenaires externes - d'un clic pour voir leurs modifications en direct, tout en gardant un contrôle précis des accès pour la sécurité des données.",
629630
"Docs offers an intuitive writing experience. Its minimalist interface favors content over layout, while offering the essentials: media import, offline mode and keyboard shortcuts for greater efficiency.": "Docs propose une expérience d'écriture intuitive. Son interface minimaliste privilégie le contenu sur la mise en page, tout en offrant l'essentiel : import de médias, mode hors-ligne et raccourcis clavier pour plus d'efficacité.",
@@ -994,6 +995,7 @@
994995
"Doc visibility card": "Docs zichtbaarheid kaart",
995996
"Docs": "Docs",
996997
"Docs Logo": "Docs logo",
998+
"Back to homepage": "Terug naar Docs homepage",
997999
"Docs is already available, log in to use it now.": "Docs is beschikbaar, log in om het te gebruiken.",
9981000
"Docs makes real-time collaboration simple. Invite collaborators - public officials or external partners - with one click to see their changes live, while maintaining precise access control for data security.": "Docs maakt real-time samenwerking eenvoudig. Nodig medewerkers - ambtenaren of externe partners - uit met één klik om hun veranderingen live te zien, terwijl de toegangscontrole voor de gegevensbeveiliging wordt gehandhaafd.",
9991001
"Docs offers an intuitive writing experience. Its minimalist interface favors content over layout, while offering the essentials: media import, offline mode and keyboard shortcuts for greater efficiency.": "Docs biedt een intuïtieve schrijfervaring. De minimalistische interface geeft voorrang aan de inhoud boven de lay-out, terwijl essentiële zaken worden aangeboden: importeren van media, offline-modus en sneltoetsen voor grotere efficiëntie.",

0 commit comments

Comments
 (0)