diff --git a/pwa/src/templates/templateParts/header/HeaderTemplate.module.css b/pwa/src/templates/templateParts/header/HeaderTemplate.module.css index d525bcbc..bf51b9f3 100644 --- a/pwa/src/templates/templateParts/header/HeaderTemplate.module.css +++ b/pwa/src/templates/templateParts/header/HeaderTemplate.module.css @@ -5,6 +5,14 @@ padding-inline-start: var(--utrecht-page-margin-inline-start); padding-inline-end: var(--utrecht-page-margin-inline-end); display: flex; +} +.skipLinkContainer:focus-within { + margin-inline-end: 10%; +} + +.navContainer { + flex: 1; + display: flex; justify-content: space-between; } @@ -40,12 +48,3 @@ .languageSelectDisabled { opacity: 50%; } - -.visuallyHidden { - position: absolute !important; - height: 1px; - width: 1px; - overflow: hidden; - clip: rect(1px, 1px, 1px, 1px); - color: red; -} diff --git a/pwa/src/templates/templateParts/header/HeaderTemplate.tsx b/pwa/src/templates/templateParts/header/HeaderTemplate.tsx index b905e09a..2491f62f 100644 --- a/pwa/src/templates/templateParts/header/HeaderTemplate.tsx +++ b/pwa/src/templates/templateParts/header/HeaderTemplate.tsx @@ -1,7 +1,7 @@ import * as React from "react"; import * as styles from "./HeaderTemplate.module.css"; import clsx from "clsx"; -import { PageHeader } from "@utrecht/component-library-react/dist/css-module"; +import { PageHeader, SkipLink } from "@utrecht/component-library-react/dist/css-module"; import { navigate } from "gatsby"; import { useTranslation } from "react-i18next"; import { useGatsbyContext } from "../../../context/gatsby"; @@ -17,44 +17,43 @@ export const HeaderTemplate: React.FC = ({ layoutClassName return (
- - {t("Skip to filters")} - - - {t("Skip to main content")} - - -
- navigate("/")} - src={process.env.GATSBY_HEADER_LOGO_URL} - alt={t("Navbar-Logo")} - tabIndex={0} - /> +
+ + {t("Skip to filters")} + + + {t("Skip to main content")} +
-
- i18n.changeLanguage("nl")} - tabIndex={0} - aria-label={t("Translate page to Dutch")} - > - NL - {" "} - /{" "} - i18n.changeLanguage("en")} - tabIndex={0} - aria-label={t("Translate page to English")} - > - EN - +
+
+ navigate("/")} + src={process.env.GATSBY_HEADER_LOGO_URL} + alt={t("Navbar-Logo")} + tabIndex={0} + /> +
+
+ i18n.changeLanguage("nl")} + tabIndex={0} + aria-label={t("Translate page to Dutch")} + > + NL + {" "} + /{" "} + i18n.changeLanguage("en")} + tabIndex={0} + aria-label={t("Translate page to English")} + > + EN + +