Skip to content

Commit

Permalink
Project listing aria label
Browse files Browse the repository at this point in the history
  • Loading branch information
hojberg committed Nov 13, 2023
1 parent 79d01b4 commit 3b40089
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/Code/ProjectListing.elm
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand All @@ -184,6 +183,9 @@ view p =

_ ->
UI.nothing

ariaLabel_ =
ariaLabel (ProjectRef.toString p.project.ref)
in
case p.click of
NoClick ->
Expand All @@ -194,7 +196,7 @@ view p =
]

ProjectClick c ->
Click.view attrs
Click.view (ariaLabel_ :: attrs)
[ hashvatar
, ProjectRef.view p.project.ref
, privateIcon
Expand All @@ -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
]

0 comments on commit 3b40089

Please sign in to comment.