@@ -173,6 +173,26 @@ function onMouseLeave() {
173173 }
174174 }, 120 )
175175}
176+
177+ // --- Add this helper function ---
178+ function getAriaLabel(c : GitHubContributor ): string {
179+ const separator = $t (' about.contributors.separator' )
180+ const role = roleLabels .value [c .role ]
181+ ? $t (' about.contributors.role' , { separator , role: roleLabels .value [c .role ] })
182+ : ' '
183+ const works_at = c .company
184+ ? $t (' about.contributors.works_at' , { separator , company: c .company })
185+ : ' '
186+ const location = c .location
187+ ? $t (' about.contributors.location' , { separator , location: c .location })
188+ : ' '
189+ return $t (' about.contributors.view_profile_detailed' , {
190+ name: c .name || c .login ,
191+ role ,
192+ works_at ,
193+ location ,
194+ })
195+ }
176196 </script >
177197
178198<template >
@@ -330,7 +350,11 @@ function onMouseLeave() {
330350 <LinkBase
331351 :id =" `anchor-${contributor.id}`"
332352 :to =" contributor.html_url"
333- :aria-label =" $t('about.contributors.view_profile', { name: contributor.login })"
353+ :aria-label ="
354+ isExpandable(contributor)
355+ ? getAriaLabel(contributor)
356+ : $t('about.contributors.view_profile', { name: contributor.login })
357+ "
334358 no-underline
335359 no-external-icon
336360 class =" group relative block h-12 w-12 rounded-lg transition-all outline-none focus-visible:(ring-2 ring-accent z-20)"
0 commit comments