From 40ac30a96da5b3147586c6929345161c75e19536 Mon Sep 17 00:00:00 2001 From: Tom Byers Date: Wed, 8 Jan 2020 17:03:04 +0000 Subject: [PATCH] Add hidden text to cookie banner buttons Visual users get the context from the proximity to the h2 but we need to provide this for others. I've tried using `aria-describedby` to link them to the h2 but this ends up making the h2 text the button's description in the accessibility tree. In Voiceover this means you only get that information as extra context, announced a while after the label if the VO cursor stays on the button. We want all the information in the accessible label so chose this approach instead. --- app/templates/components/cookie-banner.html | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/templates/components/cookie-banner.html b/app/templates/components/cookie-banner.html index 7505818cd..0570e81fa 100644 --- a/app/templates/components/cookie-banner.html +++ b/app/templates/components/cookie-banner.html @@ -6,10 +6,14 @@

Analytics cookies help us understand how our website is being used.