From dcc171bfcaeccb4aef0df5946f4b56a276926590 Mon Sep 17 00:00:00 2001 From: Sjur Seibt Date: Tue, 12 Nov 2024 13:19:18 +0100 Subject: [PATCH] feat: document accessible logo links (#329) * feat: document accessible logo links * fix: button type button --- lib/readme.md | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/lib/readme.md b/lib/readme.md index a1bb74a4..bcfe08c0 100644 --- a/lib/readme.md +++ b/lib/readme.md @@ -295,9 +295,9 @@ Modern versions of assistive technologies will announce SVG content, but there i
- - - +

Clickable icon

Add screen reader content to the clickable element (button or a) with aria-label="…", and hide the icon from screen readers with aria-hidden="true" @@ -312,4 +312,13 @@ Modern versions of assistive technologies will announce SVG content, but there i

Non-clickable icon

Hide the icon from screen readers with aria-hidden="true", and add screen reader content to a wrapper with role="img" aria-label="…".
+
+
+ + + +
+

Home link

+ Add title="Gå til forsiden" to the wrapper link, and add aria-label="Publikumsproduktets navn" role="img" to the svg. +