Accessibility sweep: colours, links, targets and names

An axe-core check of 37 pages in both themes found and fixed low-contrast text
in the status colours (light) and tabs, pills and the info alert (dark),
in-sentence links with no underline, link targets under 24 px, selects with no
name and map nodes whose name did not start with their text. docs/ACCESSIBILITY.md
says what was found and how to run the check again.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
bobbanandClaude Sonnet 5.5 committed 2026-11-10 21:52:00 +01:00
1 parent 461219844b
commit 12e9fee7af
9 files changed
+239 -5

No files matched your search

+2 -2
View File
@@ -464,7 +464,7 @@ function AlertsNow({ user, tabs }: { user: CurrentUser; tabs: React.ReactNode })
placeholder="Search alerts…"
filters={
<>
<select className="form-select form-select-sm w-auto" value={severity} onChange={(e) => setSeverity(e.target.value as "all" | AlertSeverity)}>
<select className="form-select form-select-sm w-auto" aria-label="Severity" value={severity} onChange={(e) => setSeverity(e.target.value as "all" | AlertSeverity)}>
<option value="all">All severities</option>
<option value="critical">Critical</option>
<option value="warning">Warning</option>
@@ -477,7 +477,7 @@ function AlertsNow({ user, tabs }: { user: CurrentUser; tabs: React.ReactNode })
</option>
))}
</select>
<select className="form-select form-select-sm w-auto" value={category} onChange={(e) => setCategory(e.target.value as "all" | AlertCategory)}>
<select className="form-select form-select-sm w-auto" aria-label="Kind of alert" value={category} onChange={(e) => setCategory(e.target.value as "all" | AlertCategory)}>
<option value="all">All kinds</option>
{presentCategories.map((c) => (
<option key={c} value={c}>
+1 -1
View File
@@ -88,7 +88,7 @@ function ElectricityCard({ e }: { e: Electricity }) {
{e.devices.map((d) => (
<tr key={d.id}>
<td>
<Link to={`/inventory?q=${encodeURIComponent(d.name)}`}>{d.name}</Link> <span className="text-secondary small">{d.kind}</span>
<Link to={`/inventory?q=${encodeURIComponent(d.name)}`} className="text-decoration-underline">{d.name}</Link> <span className="text-secondary small">{d.kind}</span>
</td>
<td className="text-end">{d.watts} W</td>
<td className="text-end">{d.monthly !== null ? moneyIn(d.monthly, e.currencyLabel, e.currency) : "—"}</td>
+7 -2
View File
@@ -201,7 +201,12 @@ function ConnectionsMap() {
</span>
<span className="map-label">
<span className="map-title">{n.label}</span>
{n.sub && <span className="map-sub">{n.sub}</span>}
{n.sub && (
<>
{" "}
<span className="map-sub">{n.sub}</span>
</>
)}
</span>
</>
);
@@ -212,7 +217,7 @@ function ConnectionsMap() {
onMouseLeave: () => setFocus((f) => (f === n.id ? null : f)),
onFocus: () => setFocus(n.id),
onBlur: () => setFocus((f) => (f === n.id ? null : f)),
"aria-label": `${KIND_WORD[n.kind]}: ${n.label}${n.sub ? `, ${n.sub}` : ""}, ${STATUS_WORD[n.status]}`,
"aria-label": `${n.label}${n.sub ? ` ${n.sub}` : ""}, ${KIND_WORD[n.kind]}, ${STATUS_WORD[n.status]}`,
};
return n.href ? (
<Link key={n.id} to={n.href} {...props}>
+1
View File
@@ -338,6 +338,7 @@ export default function Secrets({ user }: { user: CurrentUser }) {
filters={
<select
className="form-select form-select-sm w-auto"
aria-label="Status"
value={statusFilter}
onChange={(e) => setStatusFilter(e.target.value as typeof statusFilter)}
>
+1
View File
@@ -136,6 +136,7 @@ function People({ tabs }: { tabs: ReactNode }) {
<td style={{ maxWidth: 160 }}>
<select
className="form-select form-select-sm"
aria-label={`Role of ${u.name ?? u.email ?? "this user"}`}
value={u.role}
disabled={savingId === u.id || followGroups}
title={followGroups ? "Set from sign-in groups" : undefined}