Skip to content

Commit ede6bf4

Browse files
heyoubclaude
authored andcommitted
fix(web): name per-row actions, mark up dates, cue new tabs
Three unrelated-looking defects with the same root cause: information that is obvious on screen but absent from the accessibility tree. Repeated button names. Tabbing a member list, a session table, the claim queue or a project's open roles produced "Remove, Remove, Remove" with no way to tell which row you were on — the row context lived only in visual adjacency. Each button now carries an aria-label naming its subject, with the visible text kept as a substring so speech input still reaches it (SC 2.5.3). The claim queue's labels stay fixed while a request is in flight and its buttons read "Working…"; the busy state is transient and the name should not move under a user mid-interaction. Dates. A relative string like "3 months ago" inside a title-only span is imprecise for everyone and the title is unreachable by touch and by most screen readers. These become <time dateTime> carrying the ISO instant, the idiom BlogIndex already uses, with title kept as a sighted-mouse bonus. ProjectCard's wrapper title duplicated what PersonAvatar already emits, so it is deleted rather than converted. New tabs. Every target="_blank" link now says so — an sr-only span where there is visible text, appended to the aria-label where there is not. Losing your place because a link silently opened elsewhere is a bigger problem for a screen-reader or magnifier user than for anyone else. Also: the "More ▾" menu trigger reads as an actual action list, and the stage-explainer button declares aria-haspopup="dialog" so it is not mistaken for navigation. HomeStub.tsx is skipped — nothing imports it. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 7750024 commit ede6bf4

12 files changed

Lines changed: 65 additions & 21 deletions

‎apps/web/src/components/ActivityCard.tsx‎

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,13 @@ function UpdateCard({ update }: { update: ProjectUpdateResponse }) {
3333
Update #{update.number}
3434
</Link>
3535
</div>
36-
<span title={formatAbsoluteDate(update.createdAt)} className="text-xs text-muted-foreground">
36+
<time
37+
dateTime={update.createdAt}
38+
title={formatAbsoluteDate(update.createdAt)}
39+
className="text-xs text-muted-foreground"
40+
>
3741
{formatRelativeTime(update.createdAt)}
38-
</span>
42+
</time>
3943
</div>
4044

4145
{update.author && (
@@ -69,9 +73,9 @@ function BuzzCard({ buzz }: { buzz: ProjectBuzzResponse }) {
6973
{buzz.project.title}
7074
</Link>
7175
<span> · Buzz · </span>
72-
<span title={formatAbsoluteDate(buzz.publishedAt)}>
76+
<time dateTime={buzz.publishedAt} title={formatAbsoluteDate(buzz.publishedAt)}>
7377
{formatAbsoluteDate(buzz.publishedAt, { month: 'short', day: 'numeric', year: 'numeric' })}
74-
</span>
78+
</time>
7579
</span>
7680
</div>
7781

@@ -89,6 +93,7 @@ function BuzzCard({ buzz }: { buzz: ProjectBuzzResponse }) {
8993
<h3 className="text-base font-semibold mb-0.5">
9094
<a href={buzz.url} target="_blank" rel="noopener noreferrer" className="hover:text-primary">
9195
{buzz.headline}
96+
<span className="sr-only"> (opens in new tab)</span>
9297
</a>
9398
</h3>
9499
<p className="text-xs text-muted-foreground mb-2">{hostname}</p>

‎apps/web/src/components/AppFooter.tsx‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ export function AppFooter() {
182182
<a
183183
key={href}
184184
href={href}
185-
aria-label={label}
185+
aria-label={`${label} (opens in new tab)`}
186186
target="_blank"
187187
rel="noopener noreferrer"
188188
className="text-muted-foreground hover:text-foreground transition-colors"
@@ -206,6 +206,7 @@ export function AppFooter() {
206206
className="hover:text-foreground transition-colors"
207207
>
208208
Open source &mdash; view this site on GitHub
209+
<span className="sr-only"> (opens in new tab)</span>
209210
</a>
210211
</div>
211212
</div>

‎apps/web/src/components/ProjectCard.tsx‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ export function ProjectCard({ project }: ProjectCardProps) {
3434
{project.members.slice(0, 8).map((m) => {
3535
const isMaintainer = m.slug === project.maintainer?.slug;
3636
return (
37-
<div key={m.slug} className="ring-2 ring-card rounded-full" title={m.fullName}>
37+
// No title here: PersonAvatar already emits the member's name,
38+
// so this produced two identical tooltips stacked.
39+
<div key={m.slug} className="ring-2 ring-card rounded-full">
3840
<PersonAvatar person={m} size={isMaintainer ? 36 : 28} />
3941
</div>
4042
);
@@ -61,13 +63,15 @@ export function ProjectCard({ project }: ProjectCardProps) {
6163
<Button asChild size="sm" variant="outline">
6264
<a href={project.links.usersUrl} target="_blank" rel="noopener noreferrer">
6365
Public Site
66+
<span className="sr-only"> (opens in new tab)</span>
6467
</a>
6568
</Button>
6669
)}
6770
{project.links.developersUrl && (
6871
<Button asChild size="sm" variant="outline">
6972
<a href={project.links.developersUrl} target="_blank" rel="noopener noreferrer">
7073
Developers
74+
<span className="sr-only"> (opens in new tab)</span>
7175
</a>
7276
</Button>
7377
)}

‎apps/web/src/components/modals/ManageMembersModal.tsx‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,10 +158,14 @@ export function ManageMembersModal({ open, onOpenChange, project }: ManageMember
158158
</>
159159
) : (
160160
<>
161+
{/* Every row's buttons read identically out of
162+
context, so each name carries its member. The
163+
visible text stays a substring (SC 2.5.3). */}
161164
<Button
162165
type="button"
163166
size="sm"
164167
variant="outline"
168+
aria-label={`Edit role for ${m.person.fullName}`}
165169
onClick={() =>
166170
setEditingRole((r) => ({ ...r, [rowKey]: m.role ?? '' }))
167171
}
@@ -173,6 +177,7 @@ export function ManageMembersModal({ open, onOpenChange, project }: ManageMember
173177
type="button"
174178
size="sm"
175179
variant="outline"
180+
aria-label={`Make maintainer: ${m.person.fullName}`}
176181
onClick={() => personSlug && handleChangeMaintainer(personSlug, rowKey)}
177182
disabled={busySlug === rowKey}
178183
>
@@ -184,6 +189,7 @@ export function ManageMembersModal({ open, onOpenChange, project }: ManageMember
184189
type="button"
185190
size="sm"
186191
variant="ghost"
192+
aria-label={`Remove ${m.person.fullName}`}
187193
onClick={() => personSlug && handleRemove(personSlug, rowKey)}
188194
disabled={busySlug === rowKey}
189195
className="text-destructive hover:text-destructive"

‎apps/web/src/pages/AccountClaim.tsx‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -176,11 +176,11 @@ export function AccountClaim() {
176176
</CardDescription>
177177
</CardHeader>
178178
<CardContent className="space-y-3 text-sm">
179-
<div
180-
className="text-xs text-muted-foreground"
181-
title={formatAbsoluteDate(c.lastActiveAt)}
182-
>
183-
Last updated {formatRelativeTime(c.lastActiveAt)}
179+
<div className="text-xs text-muted-foreground">
180+
Last updated{' '}
181+
<time dateTime={c.lastActiveAt} title={formatAbsoluteDate(c.lastActiveAt)}>
182+
{formatRelativeTime(c.lastActiveAt)}
183+
</time>
184184
</div>
185185
{c.matchedEmail ? (
186186
<div className="rounded-md bg-green-100 dark:bg-green-900/30 text-green-900 dark:text-green-100 px-3 py-2 text-xs">

‎apps/web/src/pages/LoginPlaceholder.tsx‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ const ERROR_MESSAGES: Record<ErrorCode, React.ReactNode> = {
4141
className="underline hover:no-underline"
4242
>
4343
verify a primary email on GitHub
44+
<span className="sr-only"> (opens in new tab)</span>
4445
</a>{' '}
4546
and ensure email visibility is enabled for our app.
4647
</>
@@ -78,6 +79,7 @@ function WhyGitHub() {
7879
className="underline hover:no-underline"
7980
>
8081
create a GitHub account
82+
<span className="sr-only"> (opens in new tab)</span>
8183
</a>{' '}
8284
in under a minute.
8385
</div>

‎apps/web/src/pages/StaffAccountClaimQueue.tsx‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,12 +119,13 @@ export function StaffAccountClaimQueue() {
119119
</>
120120
)}
121121
{' · '}
122-
<span
122+
<time
123+
dateTime={item.submittedAt}
123124
title={formatAbsoluteDate(item.submittedAt)}
124125
className="text-muted-foreground"
125126
>
126127
{formatRelativeTime(item.submittedAt)}
127-
</span>
128+
</time>
128129
</CardDescription>
129130
</CardHeader>
130131
<CardContent className="space-y-3">
@@ -148,14 +149,18 @@ export function StaffAccountClaimQueue() {
148149
/>
149150
</div>
150151
<div className="flex gap-2">
152+
{/* The queue renders one card per request, so a bare
153+
"Approve"/"Deny" repeats verbatim down the page. */}
151154
<Button
155+
aria-label={`Approve claim from ${item.requesterGithubLogin}`}
152156
onClick={() => void onApprove(item.requestId)}
153157
disabled={pendingId !== null || !item.claimedPersonId}
154158
>
155159
{pendingId === item.requestId ? 'Working…' : 'Approve'}
156160
</Button>
157161
<Button
158162
variant="outline"
163+
aria-label={`Deny claim from ${item.requesterGithubLogin}`}
159164
onClick={() => void onDeny(item.requestId)}
160165
disabled={pendingId !== null}
161166
>

‎apps/web/src/screens/Account.tsx‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@ export function Account() {
187187
rel="noopener noreferrer"
188188
>
189189
Manage on GitHub →
190+
<span className="sr-only"> (opens in new tab)</span>
190191
</a>
191192
</Button>
192193
) : (
@@ -270,8 +271,10 @@ export function Account() {
270271
<tr key={s.jti}>
271272
<td className="py-2">{parseUA(s.userAgent)}</td>
272273
<td className="py-2 font-mono text-xs">{s.ipAddress}</td>
273-
<td className="py-2" title={formatAbsoluteDate(s.issuedAt)}>
274-
{formatRelativeTime(s.issuedAt)}
274+
<td className="py-2">
275+
<time dateTime={s.issuedAt} title={formatAbsoluteDate(s.issuedAt)}>
276+
{formatRelativeTime(s.issuedAt)}
277+
</time>
275278
</td>
276279
<td className="py-2 text-right">
277280
{s.current ? (
@@ -283,6 +286,7 @@ export function Account() {
283286
type="button"
284287
size="sm"
285288
variant="outline"
289+
aria-label={`Revoke session on ${parseUA(s.userAgent)}`}
286290
onClick={() => revokeSession(s.jti)}
287291
>
288292
Revoke

‎apps/web/src/screens/BlogDetail.tsx‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@ export function BlogDetail() {
5757
{showEdited && post.editedAt && (
5858
<>
5959
<span>·</span>
60-
<span title={post.editedAt}>Edited</span>
60+
<time dateTime={post.editedAt} title={post.editedAt}>
61+
Edited
62+
</time>
6163
</>
6264
)}
6365
</div>

‎apps/web/src/screens/PersonDetail.tsx‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,7 @@ export function PersonDetail() {
232232
className="text-primary underline hover:no-underline"
233233
>
234234
DM on Slack
235+
<span className="sr-only"> (opens in new tab)</span>
235236
</a>
236237
</li>
237238
)}

0 commit comments

Comments
 (0)