From 3b40089c1657506a36a378f8e6d24a50f42e1458 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20H=C3=B8jberg?= Date: Mon, 13 Nov 2023 17:41:39 -0500 Subject: [PATCH] Project listing aria label --- src/Code/ProjectListing.elm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Code/ProjectListing.elm b/src/Code/ProjectListing.elm index 07cb9cc8..b959ae34 100644 --- a/src/Code/ProjectListing.elm +++ b/src/Code/ProjectListing.elm @@ -167,7 +167,6 @@ view p = [ class "project-listing" , class (sizeClass p.size) , classList [ ( "project-listing_subdued", p.subdued ) ] - , ariaLabel (ProjectRef.toString p.project.ref) ] hashvatar = @@ -184,6 +183,9 @@ view p = _ -> UI.nothing + + ariaLabel_ = + ariaLabel (ProjectRef.toString p.project.ref) in case p.click of NoClick -> @@ -194,7 +196,7 @@ view p = ] ProjectClick c -> - Click.view attrs + Click.view (ariaLabel_ :: attrs) [ hashvatar , ProjectRef.view p.project.ref , privateIcon @@ -203,7 +205,7 @@ view p = ProjectAndHandleClick c -> div attrs - [ Click.view [] [ hashvatar ] (c.ref p.project.ref) + [ Click.view [ ariaLabel_ ] [ hashvatar ] (c.ref p.project.ref) , ProjectRef.viewClickable c.handle c.ref p.project.ref , privateIcon ]