From accea71399f912b3aa2b2d08f4dcc0b3b196b1fc Mon Sep 17 00:00:00 2001 From: Ryan Brown Date: Thu, 30 Nov 2023 13:26:00 +0000 Subject: [PATCH 1/2] Further accessibility improvements to secondary navigation usage A recent accessibility audit of Whitehall returned a level A WCAG failure because navigation menus were labelled as "tabs" on some Whitehall pages. Elements labelled "tabs" should have tab-like behaviour, instead of menu link behaviour. We are therefore removing all mentions of "tabs" from secondary navigation aria labels. --- app/views/admin/get_involved/index.html.erb | 2 +- app/views/admin/take_part_pages/index.html.erb | 2 +- app/views/admin/topical_event_about_pages/show.html.erb | 2 +- app/views/admin/topical_event_featurings/index.html.erb | 2 +- app/views/admin/topical_event_organisations/index.html.erb | 2 +- app/views/admin/topical_events/show.html.erb | 2 +- app/views/components/docs/secondary_navigation.yml | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/views/admin/get_involved/index.html.erb b/app/views/admin/get_involved/index.html.erb index 9320ff7600b..744817ded5b 100644 --- a/app/views/admin/get_involved/index.html.erb +++ b/app/views/admin/get_involved/index.html.erb @@ -9,7 +9,7 @@

<%= render "components/secondary_navigation", { - aria_label: "Get involved tabs", + aria_label: "Get involved navigation", items: [ { label: "Get involved", diff --git a/app/views/admin/take_part_pages/index.html.erb b/app/views/admin/take_part_pages/index.html.erb index 36f973e47d1..97794990846 100644 --- a/app/views/admin/take_part_pages/index.html.erb +++ b/app/views/admin/take_part_pages/index.html.erb @@ -13,7 +13,7 @@
<%= render "components/secondary_navigation", { - aria_label: "Get involved tabs", + aria_label: "Get involved navigation", items: [ { label: "Get involved", diff --git a/app/views/admin/topical_event_about_pages/show.html.erb b/app/views/admin/topical_event_about_pages/show.html.erb index 7b51bdbc0fb..b7ed431db19 100644 --- a/app/views/admin/topical_event_about_pages/show.html.erb +++ b/app/views/admin/topical_event_about_pages/show.html.erb @@ -12,7 +12,7 @@
<%= render "components/secondary_navigation", { - aria_label: "Topical Events tabs", + aria_label: "Topical Events navigation", items: topical_event_nav_items(@topical_event, request.path), } %>
diff --git a/app/views/admin/topical_event_featurings/index.html.erb b/app/views/admin/topical_event_featurings/index.html.erb index c92e7a47aa1..1a0797cba93 100644 --- a/app/views/admin/topical_event_featurings/index.html.erb +++ b/app/views/admin/topical_event_featurings/index.html.erb @@ -14,7 +14,7 @@
<%= render "components/secondary_navigation", { - aria_label: "Document tabs", + aria_label: "Document navigation", items: secondary_navigation_tabs_items(@topical_event, request.path), } %>
diff --git a/app/views/admin/topical_event_organisations/index.html.erb b/app/views/admin/topical_event_organisations/index.html.erb index 6d8ee9a6d53..174ea84d57d 100644 --- a/app/views/admin/topical_event_organisations/index.html.erb +++ b/app/views/admin/topical_event_organisations/index.html.erb @@ -12,7 +12,7 @@
<%= render "components/secondary_navigation", { - aria_label: "Document tabs", + aria_label: "Document navigation", items: secondary_navigation_tabs_items(@topical_event, request.path), } %>
diff --git a/app/views/admin/topical_events/show.html.erb b/app/views/admin/topical_events/show.html.erb index e8fa83cf101..77c9b9456a8 100644 --- a/app/views/admin/topical_events/show.html.erb +++ b/app/views/admin/topical_events/show.html.erb @@ -12,7 +12,7 @@
<%= render "components/secondary_navigation", { - aria_label: "Topical Events tabs", + aria_label: "Topical Events navigation", items: topical_event_nav_items(@topical_event, request.path), } %>
diff --git a/app/views/components/docs/secondary_navigation.yml b/app/views/components/docs/secondary_navigation.yml index 376dfe2db66..7bedddce55b 100644 --- a/app/views/components/docs/secondary_navigation.yml +++ b/app/views/components/docs/secondary_navigation.yml @@ -9,7 +9,7 @@ shared_accessibility_criteria: examples: default: data: - aria_label: Document tabs + aria_label: Document navigation items: - label: Document href: government/admin/editions/:id" From 6d678d0e6529cf235b890fca37ec6e267daeec49 Mon Sep 17 00:00:00 2001 From: Ryan Brown Date: Mon, 4 Dec 2023 09:16:36 +0000 Subject: [PATCH 2/2] Correction to topical event navigation aria label --- app/views/admin/topical_event_organisations/index.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/admin/topical_event_organisations/index.html.erb b/app/views/admin/topical_event_organisations/index.html.erb index 174ea84d57d..5fce52dce0c 100644 --- a/app/views/admin/topical_event_organisations/index.html.erb +++ b/app/views/admin/topical_event_organisations/index.html.erb @@ -12,7 +12,7 @@
<%= render "components/secondary_navigation", { - aria_label: "Document navigation", + aria_label: "Topical Event navigation", items: secondary_navigation_tabs_items(@topical_event, request.path), } %>