Improve accessibility across layouts, components, and forms (#2799)

This commit is contained in:
Paweł Kuna
2026-08-05 23:40:37 +02:00
committed by GitHub
parent 17d2363ef2
commit 1effe221cb
160 changed files with 1494 additions and 1092 deletions
+5 -2
View File
@@ -20,12 +20,15 @@ interface Props {
const { limit = 10, offset = 0, title = 'Top users', class: className } = Astro.props
const colors = 'green,red,yellow,x,x'.split(',')
const statusLabels: Record<string, string> = { green: 'Online', red: 'Busy', yellow: 'Away', x: 'Offline' }
const rows = (people as Person[]).slice(offset, offset + limit).map((person, idx) => {
const index = idx + 1 // forloop.index (1-based)
const status = colors[randomNumber(index + 5, 0, colors.length - 1)]
return {
person,
status: colors[randomNumber(index + 5, 0, colors.length - 1)],
status,
statusLabel: statusLabels[status],
timeago: timeagoLabel(index, 6),
}
})
@@ -42,7 +45,7 @@ const rows = (people as Person[]).slice(offset, offset + limit).map((person, idx
<div class="col-6">
<div class="row g-3 align-items-center">
<a href="#" class="col-auto">
<Avatar person={row.person} status={row.status} />
<Avatar person={row.person} status={row.status} statusLabel={row.statusLabel} />
</a>
<div class="col text-truncate">
<a href="#" class="text-reset d-block text-truncate">