Skip to content

Commit 52c96dc

Browse files
committed
fix(webapp): add screen-reader text for the Test column cells
The Test cell on the Sessions table and the Test property on the session detail page rendered an icon or dash with no text equivalent. Add an sr-only Yes/No value and mark the check icon and dash aria-hidden.
1 parent 1984b34 commit 52c96dc

2 files changed

Lines changed: 13 additions & 4 deletions

File tree

  • apps/webapp/app
    • components/sessions/v1
    • routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.sessions.$sessionParam

apps/webapp/app/components/sessions/v1/SessionsTable.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,10 +147,16 @@ export function SessionsTable({
147147
</div>
148148
</TableCell>
149149
<TableCell to={sessionPath}>
150+
<span className="sr-only">{session.isTest ? "Yes" : "No"}</span>
150151
{session.isTest ? (
151-
<CheckIcon className="size-4 text-charcoal-400 group-hover/table-row:text-text-bright" />
152+
<CheckIcon
153+
aria-hidden
154+
className="size-4 text-charcoal-400 group-hover/table-row:text-text-bright"
155+
/>
152156
) : (
153-
"–"
157+
<span aria-hidden className="text-text-dimmed">
158+
159+
</span>
154160
)}
155161
</TableCell>
156162
<TableCell to={sessionPath}>

apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.sessions.$sessionParam/route.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -821,10 +821,13 @@ function OverviewTab({ session, status }: { session: LoadedSession; status: Sess
821821
<Property.Item>
822822
<Property.Label>Test</Property.Label>
823823
<Property.Value>
824+
<span className="sr-only">{session.isTest ? "Yes" : "No"}</span>
824825
{session.isTest ? (
825-
<CheckIcon className="size-4 text-text-dimmed" />
826+
<CheckIcon aria-hidden className="size-4 text-text-dimmed" />
826827
) : (
827-
<span className="text-text-dimmed"></span>
828+
<span aria-hidden className="text-text-dimmed">
829+
830+
</span>
828831
)}
829832
</Property.Value>
830833
</Property.Item>

0 commit comments

Comments
 (0)