From 7bf8b07546611f28c0d814345338837d07a0445d Mon Sep 17 00:00:00 2001 From: Remko Date: Tue, 10 Oct 2023 14:39:12 +0200 Subject: [PATCH 1/4] added Clickables, Forms and Document improvements --- pwa/src/templates/jumbotronTemplate/JumbotronTemplate.tsx | 7 ++++++- .../templates/templateParts/filters/FiltersTemplate.tsx | 3 +++ pwa/src/templates/templateParts/footer/FooterTemplate.tsx | 1 + pwa/src/translations/en.ts | 3 +++ pwa/src/translations/nl.ts | 2 ++ 5 files changed, 15 insertions(+), 1 deletion(-) diff --git a/pwa/src/templates/jumbotronTemplate/JumbotronTemplate.tsx b/pwa/src/templates/jumbotronTemplate/JumbotronTemplate.tsx index 35aed429..e18490bb 100644 --- a/pwa/src/templates/jumbotronTemplate/JumbotronTemplate.tsx +++ b/pwa/src/templates/jumbotronTemplate/JumbotronTemplate.tsx @@ -8,7 +8,12 @@ export const JumbotronTemplate: React.FC = () => { const { t } = useTranslation(); return ( -
+
diff --git a/pwa/src/templates/templateParts/filters/FiltersTemplate.tsx b/pwa/src/templates/templateParts/filters/FiltersTemplate.tsx index e293e023..8537d6e5 100644 --- a/pwa/src/templates/templateParts/filters/FiltersTemplate.tsx +++ b/pwa/src/templates/templateParts/filters/FiltersTemplate.tsx @@ -55,6 +55,7 @@ export const FiltersTemplate: React.FC = ({ isLoading }) = name="title" placeholder={`${t("Search")}..`} defaultValue={filters._search} + aria-label={t("Search")} {...{ register, errors }} /> = ({ isLoading }) = placeholder={t("Year")} isClearable {...{ register, errors, control }} + aria-label={t("Select year")} /> = ({ isLoading }) = defaultValue={TEMP_PUBLICATION_TYPES.find((option) => option.value === filters.Categorie)} isClearable {...{ register, errors, control }} + aria-label={t("Select category")} /> diff --git a/pwa/src/templates/templateParts/footer/FooterTemplate.tsx b/pwa/src/templates/templateParts/footer/FooterTemplate.tsx index d8b95a45..3dd44467 100644 --- a/pwa/src/templates/templateParts/footer/FooterTemplate.tsx +++ b/pwa/src/templates/templateParts/footer/FooterTemplate.tsx @@ -88,6 +88,7 @@ const DynamicSection: React.FC<{ content: TDynamicContentItem }> = ({ content }) const Logo: React.FC = () => { if (process.env.GATSBY_FOOTER_LOGO_URL === "false") return <>; + const { t } = useTranslation(); return (
@@ -97,7 +98,9 @@ const Logo: React.FC = () => { process.env.GATSBY_FOOTER_LOGO_HREF ? open(process.env.GATSBY_FOOTER_LOGO_HREF) : navigate("/") } src={process.env.GATSBY_FOOTER_LOGO_URL} - alt={"Footer-logo"} + alt={t("Footer-logo")} + aria-label={`${t("Footer-logo")}, ${t("Can open a new window")}`} + tabIndex={0} />
); diff --git a/pwa/src/translations/en.ts b/pwa/src/translations/en.ts index 0fe54f02..9906df61 100644 --- a/pwa/src/translations/en.ts +++ b/pwa/src/translations/en.ts @@ -12,6 +12,7 @@ export const en = { Decision: "Decision", Subject: "Subject", Address: "Address", + Page: "Page", "N/A": "N/A", "Details page": "Details page", "Back to homepage": "Back to homepage", @@ -43,5 +44,8 @@ export const en = { "Email address": "Email address", "Select year": "Select year", "Select category": "Select category", - + "Previous page": "Previous page", + "Next page": "Next page", + "Can open a new window": "Can open a new window", + "No results found": "No results found", }; diff --git a/pwa/src/translations/nl.ts b/pwa/src/translations/nl.ts index de8539b8..b77bc432 100644 --- a/pwa/src/translations/nl.ts +++ b/pwa/src/translations/nl.ts @@ -12,6 +12,7 @@ export const nl = { Decision: "Besluit", Subject: "Onderwerp", Address: "Adres", + Page: "Pagina", "N/A": "N.v.t", "Details page": "Detailpagina", "Back to homepage": "Terug naar home", @@ -43,4 +44,8 @@ export const nl = { "Email address": "E-mailadres", "Select year": "Selecteer jaar", "Select category": "Selecteer categorie", + "Previous page": "Vorige pagina", + "Next page": "Volgende pagina", + "Can open a new window": "Kan een nieuw venster openen", + "No results found": "Geen resultaten gevonden", };