Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

fix: name 68 more form controls and teach the a11y guard about children-labeled wrappers (#4156)

[._.]/ Adam Eivyc3ce85759d7f
diff --git a/client/src/a11yConventions.test.js b/client/src/a11yConventions.test.js
index d0a61efe29..a4d9da393e 100644
--- a/client/src/a11yConventions.test.js
+++ b/client/src/a11yConventions.test.js
@@ -500,6 +500,16 @@ function hasMatchingForwardedLabel(src, id) {
if (!tag) continue;
re.lastIndex = match.index + tag.length;
if (normalizedAttributeValue(attributeValue(tag, idProp)) !== id) continue;
+ // A forwarder can take its text as JSX children rather than a prop
+ // (`<FieldLabel htmlFor="world-logline">Logline</FieldLabel>`), in which
+ // case there is no same-named attribute to read — the name is the
+ // element's own body, judged by the same text check the aria-labelledby
+ // path uses. Without this branch every children-shaped forwarder looked
+ // unnamed and its controls stayed on the allowlist.
+ if (labelProp === 'children') {
+ if (hasUsableElementText(src, match.index, tag)) return true;
+ continue;
+ }
if (isUsableLabelAttributeValue(normalizedAttributeValue(attributeValue(tag, labelProp)))) return true;
}
}
@@ -844,78 +854,21 @@ function inputSourceAnchor(file, src, index) {
return `${file}|${semantic}|occurrence=${occurrence}`;
}
+// What is left is no longer a backlog of unnamed controls — all three are
+// shapes the scan cannot resolve, not gaps in the UI:
+// * EntityCombobox / TagPicker take the control's `id` as a prop and every
+// caller pairs its own `<label htmlFor>`, which lives in the caller's file.
+// A same-file scan cannot see it, and an `aria-label` here would OVERRIDE
+// the caller's visible label — a regression, not a fix. Tracked in #4321.
+// * AIProviders' fallback-model input sits in a labeled `<FormField>` whose
+// conditional child holds an apostrophe in JSX text; `matchingBraceEnd`
+// reads it as a string opener and loses the expression bounds (#4318).
+// So: do not "fix" these by bolting an aria-label onto the control. Fix the
+// recognizer, then delete the row.
const PREEXISTING_INPUT_NAME_ALLOWLIST = new Set([
- "src/components/CronInput.jsx|type=text|placeholder=0 7 * * *|value=expr",
"src/components/EntityCombobox.jsx|id=inputId|type=text|placeholder=placeholder || `Search ${noun}s or type a new name…`|value=value|role=combobox",
"src/components/TagPicker.jsx|id=id|type=text|placeholder=value.length >= maxTags ? `Max ${maxTags} tags` : placeholder|value=input",
- "src/components/apps/ReferenceReposPanel.jsx|placeholder=Display name (e.g. phosphene)|value=form.name",
- "src/components/apps/ReferenceReposPanel.jsx|placeholder=Branch (default: main)|value=form.branch",
- "src/components/apps/ReferenceReposPanel.jsx|placeholder=Repo URL (https://github.com/owner/repo.git) or local path|value=form.repoUrl",
- "src/components/apps/tabs/CustomTasksSection.jsx|type=text|placeholder=Task name *|value=form.name",
- "src/components/apps/tabs/CustomTasksSection.jsx|type=text|placeholder=Description|value=form.description",
- "src/components/apps/tabs/CustomTasksSection.jsx|type=text|placeholder=0 7 * * *|value=form.cronExpression || ''|title=Cron expression: minute hour dayOfMonth month dayOfWeek",
- "src/components/apps/tabs/CustomTasksSection.jsx|type=time|value=form.scheduledTime || ''|title=Run at a specific time (leave empty for any time)",
- "src/components/apps/tabs/GitTab.jsx|type=text|placeholder=Commit message...|value=commitMessage",
- "src/components/calendar/AgendaTab.jsx|type=text|placeholder=Search events...|value=search",
- "src/components/calendar/ConfigTab.jsx|type=text|placeholder=Client ID (e.g. 123456789-abc.apps.googleusercontent.com)|value=oauthForm.clientId",
- "src/components/calendar/ConfigTab.jsx|type=password|placeholder=Client Secret (e.g. GOCSPX-...)|value=oauthForm.clientSecret",
- "src/components/calendar/ReviewTab.jsx|type=date|value=date",
- "src/components/calendar/ReviewTab.jsx|type=number|placeholder=min|value=editForm.durationMinutes|min=1|max=1440",
- "src/components/calendar/ReviewTab.jsx|type=text|placeholder=Note (optional)|value=editForm.note",
- "src/components/dashboard/LayoutEditor.jsx|id=layout-editor-window-end|type=time|value=activateWindow.end",
- "src/components/dashboard/LayoutEditor.jsx|type=text|placeholder=Name for new layout|value=dupName",
- "src/components/digital-twin/tabs/DocumentsTab.jsx|type=range|value=selectedDoc.weight || 5|min=1|max=10|occurrence=1",
- "src/components/digital-twin/tabs/DocumentsTab.jsx|type=range|value=selectedDoc.weight || 5|min=1|max=10|occurrence=2",
- "src/components/digital-twin/tabs/GoalsTab.jsx|type=date|value=birthDateInput",
- "src/components/digital-twin/tabs/GoalsTab.jsx|type=text|placeholder=Goal title...|value=newGoal.title",
- "src/components/digital-twin/tabs/GoalsTab.jsx|type=text|placeholder=Add milestone...|value=newMilestone.title",
- "src/components/digital-twin/tabs/GoalsTab.jsx|type=date|value=newMilestone.targetDate",
- "src/components/digital-twin/tabs/TimeCapsuleTab.jsx|type=text|placeholder=Snapshot label (e.g., Spring 2026, Pre-career-change)|value=label",
- "src/components/digital-twin/tabs/TimeCapsuleTab.jsx|type=checkbox",
- "src/components/imageGen/HfTokenBanner.jsx|type=password|placeholder=hf_…|value=token",
- "src/components/imageGen/LoraPicker.jsx|type=number|value=sel.scale|min=0|max=2|step=0.1",
- "src/components/insights/GoalScorecardTab.jsx|type=text|placeholder=extra keywords, comma-separated|value=drafts[rule.id] ?? ''",
- "src/components/loraTraining/ImportGalleryDialog.jsx|type=text|placeholder=Search prompt, model, seed, LoRA…|value=query",
- "src/components/media/CollectionPickerShell.jsx|type=text|placeholder=searchPlaceholder|value=query",
- "src/components/media/CollectionPickerShell.jsx|type=text|placeholder=newCollectionPlaceholder|value=newName",
- "src/components/messages/InboxTab.jsx|type=text|placeholder=Search messages...|value=search",
- "src/components/music/MusicGenPanel.jsx|placeholder=org/model-repo|value=installRepo",
- "src/components/pipeline/CanonCard.jsx|type=text|placeholder=Outfit name (e.g. Wedding)|value=draftFor('name')",
- "src/components/pipeline/arcCanvas/AddSeasonRow.jsx|placeholder=Volume / Season title…|value=title",
- "src/components/pipeline/arcCanvas/DeriveFromManuscriptPreview.jsx|placeholder=Volume title|value=volume.title",
- "src/components/pipeline/arcCanvas/SeasonActions.jsx|placeholder=Issue / Episode title…|value=newTitle",
- "src/components/pipeline/arcCanvas/SeasonEditor.jsx|placeholder=Title|value=draft.title || ''",
- "src/components/pipeline/arcCanvas/SeasonEditor.jsx|type=number|placeholder=#|value=draft.number || 0|min=0|max=99",
- "src/components/pipeline/arcCanvas/SeasonEditor.jsx|placeholder=One-sentence logline|value=draft.logline || ''",
- "src/components/pipeline/arcCanvas/SeasonEditor.jsx|placeholder=Ending hook|value=draft.endingHook || ''",
- "src/components/pipeline/arcCanvas/SeasonEditor.jsx|type=number|placeholder=Issue / episode target|value=draft.episodeCountTarget || 0|title=Issue / episode count target for this volume / season|min=0",
- "src/components/pipeline/arcCanvas/TickingClockEditor.jsx|id=ticking-clock-label|type=text|placeholder=What the reader counts down to (e.g. “The storm makes landfall”)|value=c.label || ''",
- "src/components/pipeline/stages/IdeaStage.jsx|type=text|placeholder=Your answer (optional — leave blank for LLM's choice)|value=answers[i] || ''",
- "src/components/pipeline/stages/StoryboardsStage.jsx|placeholder=INT. FOUNDRY — NIGHT|value=scene.slugline || ''",
- "src/components/pipeline/stages/StoryboardsStage.jsx|type=number|value=shot.durationSeconds ?? 4|title=Duration in seconds|min=1|max=30",
- "src/components/sharing/DuplicateGroup.jsx|value=name",
- "src/components/shell/TerminalHotKeys.jsx|type=text|placeholder=Tap & paste here|ref=pasteInputRef",
- "src/components/universe/CharacterDetailEditor.jsx|type=text",
- "src/components/universeBuilder/CompositeSheetsEditor.jsx|placeholder=newKind === 'world_pitch_poster' ? 'World summary concept pitch poster' : 'Gas-Giant Drifters costume sheet'|value=newLabel",
- "src/components/universeBuilder/CompositeSheetsEditor.jsx|value=editLabel",
- "src/components/universeBuilder/InfluenceChipsInput.jsx|type=text|placeholder=placeholder|value=input",
- "src/components/universeBuilder/UniverseBibleTab.jsx|id=world-logline|type=text|placeholder=One-sentence hook — A foundry city goes silent, and the only survivor is a child.|value=draft.logline || ''",
- "src/components/universeBuilder/UniverseBuilderPage.jsx|type=text|placeholder=colonies, factions, species|value=newCategoryName",
- "src/components/universeBuilder/UniverseCategoryEditor.jsx|type=number|placeholder=Custom|value=genCustom|min=GENERATE_CUSTOM_MIN|max=GENERATE_CUSTOM_MAX",
- "src/components/universeBuilder/UniverseCategoryEditor.jsx|placeholder=Label (e.g. Crystalline canyon basin)|value=newLabel",
- "src/components/universeBuilder/UniverseCategoryEditor.jsx|value=editLabel",
- "src/components/universeBuilder/UniverseTrunkPanels.jsx|type=text|placeholder=trunk.kind === 'characters' ? 'heroes, villains, factions' : trunk.kind === 'places' ? 'colonies, ruins' : 'weapons, vehicles'|value=newBucketName",
- "src/components/voice/VoiceWidget.jsx|type=text|placeholder=Type a message…|value=draft",
- "src/components/wiki/tabs/SearchTab.jsx|placeholder=Search wiki pages and raw sources...|value=query|ref=inputRef",
- "src/components/writers-room/LibraryPane.jsx|placeholder=Folder name|value=folderName",
- "src/components/writers-room/LibraryPane.jsx|placeholder=Title|value=workTitle",
- "src/pages/AIProviders.jsx|type=isSecret ? 'password' : 'text'|value=value",
- "src/pages/AIProviders.jsx|type=text|placeholder=KEY|value=newEnvKey",
- "src/pages/AIProviders.jsx|type=newEnvSecret ? 'password' : 'text'|placeholder=value|value=newEnvValue",
- "src/pages/MediaCollectionDetail.jsx|type=text|value=nameDraft",
"src/pages/AIProviders.jsx|type=text|placeholder=Use fallback provider's default|value=formData.fallbackModel",
- "src/pages/VideoTimeline.jsx|type=text|placeholder=New project name…|value=name",
- "src/pages/DataDog.jsx|name=site|type=text|placeholder=e.g., api.custom-datadog.com|value=formData.site",
]);
describe('a11y conventions', () => {
@@ -1198,6 +1151,22 @@ describe('a11y conventions', () => {
// `htmlFor=` on the call site is not the forwarded prop here, so it must
// not stand in for the `id` this wrapper reads.
expect(hasMatchingExplicitLabel(`${idPropForwarder}\n${idPropCall.replace('id="sleep-hours" label', 'htmlFor="sleep-hours" label')}`, 'sleep-hours')).toBe(false);
+
+ // A forwarder can take its text as JSX children instead of a prop
+ // (UniverseBibleTab's `<FieldLabel htmlFor="world-logline">Logline`). There
+ // is no `children=` attribute to read at the call site, so the name has to
+ // come from the element's own body — and an empty body still names nothing.
+ const childrenForwarder = `function FieldLabel({ htmlFor, children }) {
+ return (
+ <div>
+ <label htmlFor={htmlFor} className="text-xs">{children}</label>
+ </div>
+ );
+}`;
+ const childrenCall = '<FieldLabel htmlFor="sleep-hours">Sleep</FieldLabel>\n<input id="sleep-hours" type="range" />';
+ expect(hasMatchingExplicitLabel(`${childrenForwarder}\n${childrenCall}`, 'sleep-hours')).toBe(true);
+ expect(hasMatchingExplicitLabel(`${childrenForwarder}\n${childrenCall.replace('>Sleep<', '><')}`, 'sleep-hours')).toBe(false);
+ expect(hasMatchingExplicitLabel(`${childrenForwarder}\n${childrenCall}`, 'other-id')).toBe(false);
});
it('credits a FormField whose only child is a conditional, but not a list', () => {
diff --git a/client/src/components/CronInput.jsx b/client/src/components/CronInput.jsx
index b01410d8ad..c3ce8ce366 100644
--- a/client/src/components/CronInput.jsx
+++ b/client/src/components/CronInput.jsx
@@ -72,6 +72,7 @@ export default function CronInput({ value, onSave, onCancel, className = '' }) {
}}
className="w-28 sm:w-32 px-2 py-1 bg-port-bg border border-port-border rounded text-xs text-white font-mono focus:border-port-accent focus:outline-hidden"
placeholder="0 7 * * *"
+ aria-label="Cron expression"
/>
<select
value=""
diff --git a/client/src/components/apps/ReferenceReposPanel.jsx b/client/src/components/apps/ReferenceReposPanel.jsx
index ed509c6025..61ad0c3faa 100644
--- a/client/src/components/apps/ReferenceReposPanel.jsx
+++ b/client/src/components/apps/ReferenceReposPanel.jsx
@@ -1,9 +1,14 @@
import { useEffect, useState, useCallback, useRef } from 'react';
import { GitBranch, Plus, RefreshCw, Trash2, CheckCircle, AlertCircle, Edit3, X } from 'lucide-react';
import toast from '../ui/Toast';
+import FormField from '../ui/FormField';
import * as api from '../../services/api';
import { formatDateTime } from '../../utils/formatters';
+// The add-reference form is dense, so its labels sit a step below FormField's
+// default size rather than the config-page default.
+const FIELD_LABEL_CLASS = 'block text-xs text-gray-500 mb-1';
+
/**
* Where reference-watch records its proposals, keyed by the app's RESOLVED work
* tracker. Mirrors the server-side {trackerInstructions} block so the UID note
@@ -396,26 +401,32 @@ function AddRefForm({ onSubmit, onCancel }) {
return (
<form onSubmit={submit} className="bg-port-card border border-port-accent/40 rounded-lg p-3 space-y-2">
<div className="grid grid-cols-1 sm:grid-cols-2 gap-2">
+ <FormField label="Display name" labelClassName={FIELD_LABEL_CLASS}>
+ <input
+ autoFocus
+ value={form.name}
+ onChange={(e) => setForm((f) => ({ ...f, name: e.target.value }))}
+ placeholder="Display name (e.g. phosphene)"
+ className="w-full px-2 py-1 bg-port-bg border border-port-border rounded text-sm text-white focus:border-port-accent focus:outline-hidden"
+ />
+ </FormField>
+ <FormField label="Branch" labelClassName={FIELD_LABEL_CLASS}>
+ <input
+ value={form.branch}
+ onChange={(e) => setForm((f) => ({ ...f, branch: e.target.value }))}
+ placeholder="Branch (default: main)"
+ className="w-full px-2 py-1 bg-port-bg border border-port-border rounded text-sm text-white focus:border-port-accent focus:outline-hidden"
+ />
+ </FormField>
+ </div>
+ <FormField label="Repo URL or local path" labelClassName={FIELD_LABEL_CLASS}>
<input
- autoFocus
- value={form.name}
- onChange={(e) => setForm((f) => ({ ...f, name: e.target.value }))}
- placeholder="Display name (e.g. phosphene)"
- className="px-2 py-1 bg-port-bg border border-port-border rounded text-sm text-white focus:border-port-accent focus:outline-hidden"
- />
- <input
- value={form.branch}
- onChange={(e) => setForm((f) => ({ ...f, branch: e.target.value }))}
- placeholder="Branch (default: main)"
- className="px-2 py-1 bg-port-bg border border-port-border rounded text-sm text-white focus:border-port-accent focus:outline-hidden"
+ value={form.repoUrl}
+ onChange={(e) => setForm((f) => ({ ...f, repoUrl: e.target.value }))}
+ placeholder="Repo URL (https://github.com/owner/repo.git) or local path"
+ className="w-full px-2 py-1 bg-port-bg border border-port-border rounded text-sm text-white focus:border-port-accent focus:outline-hidden"
/>
- </div>
- <input
- value={form.repoUrl}
- onChange={(e) => setForm((f) => ({ ...f, repoUrl: e.target.value }))}
- placeholder="Repo URL (https://github.com/owner/repo.git) or local path"
- className="w-full px-2 py-1 bg-port-bg border border-port-border rounded text-sm text-white focus:border-port-accent focus:outline-hidden"
- />
+ </FormField>
<textarea
value={form.notes}
onChange={(e) => setForm((f) => ({ ...f, notes: e.target.value }))}
diff --git a/client/src/components/apps/tabs/CustomTasksSection.jsx b/client/src/components/apps/tabs/CustomTasksSection.jsx
index 4a40f6c7d2..472f0aae28 100644
--- a/client/src/components/apps/tabs/CustomTasksSection.jsx
+++ b/client/src/components/apps/tabs/CustomTasksSection.jsx
@@ -3,6 +3,7 @@ import { Plus, Play, Trash2, Edit3, Save, X, Clock } from 'lucide-react';
import toast from '../../ui/Toast';
import ToggleSwitch from '../../ToggleSwitch';
import ConfirmButtonPair from '../../ui/ConfirmButtonPair';
+import FormField from '../../ui/FormField';
import { useConfirmDelete } from '../../../hooks/useConfirmDelete';
import * as api from '../../../services/api';
import { timeAgo } from '../../../utils/formatters';
@@ -112,26 +113,32 @@ function TaskForm({ form, setForm, onSave, onCancel, saveLabel }) {
return (
<div className="space-y-3 bg-port-card border border-port-accent/50 rounded-lg p-4">
- <input
- type="text"
- placeholder="Task name *"
- value={form.name}
- onChange={e => update('name', e.target.value)}
- className="w-full px-3 py-2 bg-port-bg border border-port-border rounded-lg text-white text-sm"
- />
- <input
- type="text"
- placeholder="Description"
- value={form.description}
- onChange={e => update('description', e.target.value)}
- className="w-full px-3 py-2 bg-port-bg border border-port-border rounded-lg text-white text-sm"
- />
- <textarea
- placeholder="Prompt for the agent *"
- value={form.promptTemplate}
- onChange={e => update('promptTemplate', e.target.value)}
- className="w-full px-3 py-2 bg-port-bg border border-port-border rounded-lg text-white text-sm font-mono h-32"
- />
+ <FormField label="Task name *">
+ <input
+ type="text"
+ placeholder="Task name *"
+ value={form.name}
+ onChange={e => update('name', e.target.value)}
+ className="w-full px-3 py-2 bg-port-bg border border-port-border rounded-lg text-white text-sm"
+ />
+ </FormField>
+ <FormField label="Description">
+ <input
+ type="text"
+ placeholder="Description"
+ value={form.description}
+ onChange={e => update('description', e.target.value)}
+ className="w-full px-3 py-2 bg-port-bg border border-port-border rounded-lg text-white text-sm"
+ />
+ </FormField>
+ <FormField label="Prompt for the agent *">
+ <textarea
+ placeholder="Prompt for the agent *"
+ value={form.promptTemplate}
+ onChange={e => update('promptTemplate', e.target.value)}
+ className="w-full px-3 py-2 bg-port-bg border border-port-border rounded-lg text-white text-sm font-mono h-32"
+ />
+ </FormField>
{/* Schedule */}
<div className="space-y-2">
@@ -160,6 +167,7 @@ function TaskForm({ form, setForm, onSave, onCancel, saveLabel }) {
onChange={e => update('cronExpression', e.target.value)}
className="flex-1 min-w-[10rem] px-3 py-2 bg-port-bg border border-port-border rounded-lg text-white text-sm font-mono"
placeholder="0 7 * * *"
+ aria-label="Cron expression"
title="Cron expression: minute hour dayOfMonth month dayOfWeek"
/>
<select
@@ -189,6 +197,7 @@ function TaskForm({ form, setForm, onSave, onCancel, saveLabel }) {
onChange={e => update('scheduledTime', e.target.value || '')}
className="px-3 py-2 bg-port-bg border border-port-border rounded-lg text-white text-sm"
title="Run at a specific time (leave empty for any time)"
+ aria-label="Run at time"
/>
</div>
)}
diff --git a/client/src/components/apps/tabs/GitTab.jsx b/client/src/components/apps/tabs/GitTab.jsx
index 854090c905..17ba310153 100644
--- a/client/src/components/apps/tabs/GitTab.jsx
+++ b/client/src/components/apps/tabs/GitTab.jsx
@@ -519,6 +519,7 @@ export default function GitTab({ appId: _appId, appName, repoPath }) {
value={commitMessage}
onChange={(e) => setCommitMessage(e.target.value)}
placeholder="Commit message..."
+ aria-label="Commit message"
className="flex-1 px-3 py-2 bg-port-bg border border-port-border rounded-lg text-white text-sm"
/>
<button
diff --git a/client/src/components/calendar/AgendaTab.jsx b/client/src/components/calendar/AgendaTab.jsx
index 6237342749..38b1b72004 100644
--- a/client/src/components/calendar/AgendaTab.jsx
+++ b/client/src/components/calendar/AgendaTab.jsx
@@ -92,6 +92,7 @@ export default function AgendaTab({ accounts }) {
value={search}
onChange={(e) => setSearch(e.target.value)}
placeholder="Search events..."
+ aria-label="Search events"
className="w-full pl-9 pr-3 py-2 bg-port-card border border-port-border rounded-lg text-sm text-white placeholder-gray-500 focus:outline-none focus:border-port-accent"
/>
</div>
diff --git a/client/src/components/calendar/ConfigTab.jsx b/client/src/components/calendar/ConfigTab.jsx
index 08dc28473b..ff5d91f6f6 100644
--- a/client/src/components/calendar/ConfigTab.jsx
+++ b/client/src/components/calendar/ConfigTab.jsx
@@ -474,6 +474,7 @@ export default function ConfigTab({ accounts, setAccounts }) {
value={oauthForm.clientId}
onChange={e => setOauthForm(f => ({ ...f, clientId: e.target.value }))}
placeholder="Client ID (e.g. 123456789-abc.apps.googleusercontent.com)"
+ aria-label="Google OAuth client ID"
className="w-full bg-port-bg border border-port-border rounded px-2 py-1 text-xs text-white placeholder-gray-600"
/>
<input
@@ -481,6 +482,7 @@ export default function ConfigTab({ accounts, setAccounts }) {
value={oauthForm.clientSecret}
onChange={e => setOauthForm(f => ({ ...f, clientSecret: e.target.value }))}
placeholder="Client Secret (e.g. GOCSPX-...)"
+ aria-label="Google OAuth client secret"
className="w-full bg-port-bg border border-port-border rounded px-2 py-1 text-xs text-white placeholder-gray-600"
/>
<button
diff --git a/client/src/components/calendar/ReviewTab.jsx b/client/src/components/calendar/ReviewTab.jsx
index 22f0556200..f7ea3dd7a7 100644
--- a/client/src/components/calendar/ReviewTab.jsx
+++ b/client/src/components/calendar/ReviewTab.jsx
@@ -117,6 +117,7 @@ export default function ReviewTab() {
type="date"
value={date}
onChange={e => setDate(e.target.value)}
+ aria-label="Review date"
className="bg-port-bg border border-port-border rounded px-3 py-1.5 text-sm text-white focus:outline-none focus:border-port-accent"
/>
<button aria-label="Next" onClick={() => changeDate(1)} className="p-1.5 rounded hover:bg-port-card text-gray-400 hover:text-white">
@@ -291,6 +292,7 @@ export default function ReviewTab() {
value={editForm.durationMinutes}
onChange={e => setEditForm(f => ({ ...f, durationMinutes: e.target.value }))}
placeholder="min"
+ aria-label="Duration in minutes"
min="1"
max="1440"
className="w-16 bg-port-bg border border-port-border rounded px-2 py-1 text-xs text-white"
@@ -302,6 +304,7 @@ export default function ReviewTab() {
value={editForm.note}
onChange={e => setEditForm(f => ({ ...f, note: e.target.value }))}
placeholder="Note (optional)"
+ aria-label="Note"
className="w-full bg-port-bg border border-port-border rounded px-2 py-1 text-xs text-white"
/>
<div className="flex gap-1.5">
diff --git a/client/src/components/dashboard/LayoutEditor.jsx b/client/src/components/dashboard/LayoutEditor.jsx
index 6385ba630f..0adb2ba0db 100644
--- a/client/src/components/dashboard/LayoutEditor.jsx
+++ b/client/src/components/dashboard/LayoutEditor.jsx
@@ -304,6 +304,7 @@ export default function LayoutEditor({ layouts, activeLayoutId, limits, onClose,
<input
id="layout-editor-window-end"
type="time"
+ aria-label="Auto-activate window end time"
value={activateWindow.end}
onChange={(e) => updateWindowField('end', e.target.value)}
className="bg-port-bg border border-port-border rounded-lg px-2 py-1.5 text-white focus:border-port-accent outline-hidden"
@@ -372,6 +373,7 @@ export default function LayoutEditor({ layouts, activeLayoutId, limits, onClose,
}}
maxLength={nameMax}
placeholder="Name for new layout"
+ aria-label="Name for new layout"
className="flex-1 bg-port-bg border border-port-border rounded-lg px-3 py-2 text-sm text-white focus:border-port-accent outline-hidden"
/>
<button onClick={commitDuplicate} className="px-3 py-1.5 text-sm rounded-lg bg-port-accent text-white hover:bg-port-accent/80">Create</button>
diff --git a/client/src/components/digital-twin/tabs/DocumentsTab.jsx b/client/src/components/digital-twin/tabs/DocumentsTab.jsx
index 939c8e67dc..526d631636 100644
--- a/client/src/components/digital-twin/tabs/DocumentsTab.jsx
+++ b/client/src/components/digital-twin/tabs/DocumentsTab.jsx
@@ -211,6 +211,7 @@ export default function DocumentsTab({ onRefresh }) {
max="10"
value={selectedDoc.weight || 5}
onChange={(e) => handleWeightChange(selectedDoc, parseInt(e.target.value, 10))}
+ aria-label="Document weight"
className="w-16 h-1 accent-port-accent"
/>
<span className="text-xs text-gray-400 w-4">{selectedDoc.weight || 5}</span>
@@ -268,8 +269,9 @@ export default function DocumentsTab({ onRefresh }) {
{/* Mobile weight control row */}
<div className="flex md:hidden items-center gap-2 mt-2 pt-2 border-t border-port-border">
<Scale size={14} className="text-gray-500" />
- <span className="text-xs text-gray-400">Weight:</span>
+ <label htmlFor="document-weight-mobile" className="text-xs text-gray-400">Weight:</label>
<input
+ id="document-weight-mobile"
type="range"
min="1"
max="10"
diff --git a/client/src/components/digital-twin/tabs/GoalsTab.jsx b/client/src/components/digital-twin/tabs/GoalsTab.jsx
index e32d4a901e..fb6dc1fe60 100644
--- a/client/src/components/digital-twin/tabs/GoalsTab.jsx
+++ b/client/src/components/digital-twin/tabs/GoalsTab.jsx
@@ -166,6 +166,7 @@ export default function GoalsTab({ onRefresh }) {
type="date"
value={birthDateInput}
onChange={e => setBirthDateInput(e.target.value)}
+ aria-label="Birth date"
className="bg-port-bg border border-port-border rounded px-3 py-1.5 text-sm text-white"
/>
<button
@@ -270,20 +271,24 @@ export default function GoalsTab({ onRefresh }) {
{/* New Goal Form */}
{showNewGoal && (
<div className="bg-port-bg border border-port-border rounded-lg p-4 mb-4 space-y-3">
- <input
- type="text"
- value={newGoal.title}
- onChange={e => setNewGoal({ ...newGoal, title: e.target.value })}
- placeholder="Goal title..."
- className="w-full bg-port-card border border-port-border rounded px-3 py-2 text-sm text-white placeholder-gray-500"
- />
- <textarea
- value={newGoal.description}
- onChange={e => setNewGoal({ ...newGoal, description: e.target.value })}
- placeholder="Description (optional)..."
- rows={2}
- className="w-full bg-port-card border border-port-border rounded px-3 py-2 text-sm text-white placeholder-gray-500 resize-none"
- />
+ <FormField label="Goal title" labelClassName="block text-xs text-gray-500 mb-1">
+ <input
+ type="text"
+ value={newGoal.title}
+ onChange={e => setNewGoal({ ...newGoal, title: e.target.value })}
+ placeholder="Goal title..."
+ className="w-full bg-port-card border border-port-border rounded px-3 py-2 text-sm text-white placeholder-gray-500"
+ />
+ </FormField>
+ <FormField label="Description" labelClassName="block text-xs text-gray-500 mb-1">
+ <textarea
+ value={newGoal.description}
+ onChange={e => setNewGoal({ ...newGoal, description: e.target.value })}
+ placeholder="Description (optional)..."
+ rows={2}
+ className="w-full bg-port-card border border-port-border rounded px-3 py-2 text-sm text-white placeholder-gray-500 resize-none"
+ />
+ </FormField>
<div className="flex gap-3">
<FormField className="flex-1" label="Horizon" labelClassName="block text-xs text-gray-500 mb-1">
<select
@@ -440,6 +445,7 @@ export default function GoalsTab({ onRefresh }) {
value={newMilestone.title}
onChange={e => setNewMilestone({ ...newMilestone, title: e.target.value })}
placeholder="Add milestone..."
+ aria-label={`New milestone title for ${goal.title}`}
className="flex-1 bg-port-card border border-port-border rounded px-2 py-1 text-xs text-white placeholder-gray-600"
onKeyDown={e => e.key === 'Enter' && handleAddMilestone(goal.id)}
/>
@@ -447,6 +453,7 @@ export default function GoalsTab({ onRefresh }) {
type="date"
value={newMilestone.targetDate}
onChange={e => setNewMilestone({ ...newMilestone, targetDate: e.target.value })}
+ aria-label={`New milestone target date for ${goal.title}`}
className="bg-port-card border border-port-border rounded px-2 py-1 text-xs text-white w-32"
/>
<button
diff --git a/client/src/components/digital-twin/tabs/TimeCapsuleTab.jsx b/client/src/components/digital-twin/tabs/TimeCapsuleTab.jsx
index 0f9fd3a918..7664480f4b 100644
--- a/client/src/components/digital-twin/tabs/TimeCapsuleTab.jsx
+++ b/client/src/components/digital-twin/tabs/TimeCapsuleTab.jsx
@@ -16,6 +16,7 @@ import BrailleSpinner from '../../BrailleSpinner';
import * as api from '../../../services/api';
import toast from '../../ui/Toast';
import ConfirmButtonPair from '../../ui/ConfirmButtonPair';
+import FormField from '../../ui/FormField';
import { formatBytes, formatDateTime, timeAgo } from '../../../utils/formatters';
export default function TimeCapsuleTab({ onRefresh: _onRefresh }) {
@@ -155,22 +156,26 @@ export default function TimeCapsuleTab({ onRefresh: _onRefresh }) {
<div className="bg-port-card rounded-lg border border-port-accent/30 p-4">
<h3 className="font-medium text-white mb-3">Create Snapshot</h3>
<div className="space-y-3">
- <input
- type="text"
- value={label}
- onChange={e => setLabel(e.target.value)}
- placeholder="Snapshot label (e.g., Spring 2026, Pre-career-change)"
- className="w-full px-3 py-2 min-h-[40px] bg-port-bg border border-port-border rounded-lg text-white placeholder-gray-500 focus:outline-none focus:border-port-accent"
- autoFocus
- onKeyDown={e => e.key === 'Enter' && label.trim() && handleCreate()}
- />
- <textarea
- value={description}
- onChange={e => setDescription(e.target.value)}
- placeholder="Optional notes about this moment in time..."
- rows={2}
- className="w-full px-3 py-2 bg-port-bg border border-port-border rounded-lg text-white placeholder-gray-500 focus:outline-none focus:border-port-accent resize-none"
- />
+ <FormField label="Snapshot label">
+ <input
+ type="text"
+ value={label}
+ onChange={e => setLabel(e.target.value)}
+ placeholder="Snapshot label (e.g., Spring 2026, Pre-career-change)"
+ className="w-full px-3 py-2 min-h-[40px] bg-port-bg border border-port-border rounded-lg text-white placeholder-gray-500 focus:outline-none focus:border-port-accent"
+ autoFocus
+ onKeyDown={e => e.key === 'Enter' && label.trim() && handleCreate()}
+ />
+ </FormField>
+ <FormField label="Notes">
+ <textarea
+ value={description}
+ onChange={e => setDescription(e.target.value)}
+ placeholder="Optional notes about this moment in time..."
+ rows={2}
+ className="w-full px-3 py-2 bg-port-bg border border-port-border rounded-lg text-white placeholder-gray-500 focus:outline-none focus:border-port-accent resize-none"
+ />
+ </FormField>
<div className="flex justify-end gap-2">
<button
onClick={() => { setShowForm(false); setLabel(''); setDescription(''); }}
@@ -294,6 +299,7 @@ export default function TimeCapsuleTab({ onRefresh: _onRefresh }) {
type="checkbox"
checked={isCompareSelected}
onChange={() => toggleCompareId(snap.id)}
+ aria-label={`Compare ${snap.label}`}
className="w-5 h-5 shrink-0 rounded border-port-border bg-port-bg text-port-accent focus:ring-port-accent"
/>
)}
diff --git a/client/src/components/imageGen/HfTokenBanner.jsx b/client/src/components/imageGen/HfTokenBanner.jsx
index cb1ac3fd59..277e3356f8 100644
--- a/client/src/components/imageGen/HfTokenBanner.jsx
+++ b/client/src/components/imageGen/HfTokenBanner.jsx
@@ -106,6 +106,7 @@ export default function HfTokenBanner({ modelLabel, licenseUrl, models, onSaved
onKeyDown={(e) => { if (e.key === 'Enter') handleSave(); }}
disabled={saving}
placeholder="hf_…"
+ aria-label="Hugging Face read token"
autoComplete="off"
spellCheck={false}
className="flex-1 bg-transparent text-white text-xs focus:outline-none disabled:opacity-50"
diff --git a/client/src/components/imageGen/LoraPicker.jsx b/client/src/components/imageGen/LoraPicker.jsx
index 631984a373..f0af16d76b 100644
--- a/client/src/components/imageGen/LoraPicker.jsx
+++ b/client/src/components/imageGen/LoraPicker.jsx
@@ -126,6 +126,7 @@ export default function LoraPicker({
<span className="text-xs text-gray-500" title={`Recommended: ${recommended.toFixed(2)}`}>Scale</span>
<input
type="number" min={0} max={2} step={0.1}
+ aria-label={`Scale for ${lora.filename}`}
value={sel.scale}
disabled={disabled}
onChange={(e) => setScale(lora.filename, parseFloat(e.target.value) || 0)}
diff --git a/client/src/components/insights/GoalScorecardTab.jsx b/client/src/components/insights/GoalScorecardTab.jsx
index 1fbdce0b9a..6f56667ccf 100644
--- a/client/src/components/insights/GoalScorecardTab.jsx
+++ b/client/src/components/insights/GoalScorecardTab.jsx
@@ -100,6 +100,7 @@ function RulesEditor({ onClose }) {
value={drafts[rule.id] ?? ''}
onChange={(e) => setDrafts((prev) => ({ ...prev, [rule.id]: e.target.value }))}
placeholder="extra keywords, comma-separated"
+ aria-label={`Extra keywords for ${rule.title}`}
className="w-full bg-port-bg border border-port-border rounded px-2 py-1 text-xs text-gray-200 focus:border-port-accent/60 focus:outline-none"
/>
</div>
diff --git a/client/src/components/loraTraining/ImportGalleryDialog.jsx b/client/src/components/loraTraining/ImportGalleryDialog.jsx
index 7080960e71..7451342f19 100644
--- a/client/src/components/loraTraining/ImportGalleryDialog.jsx
+++ b/client/src/components/loraTraining/ImportGalleryDialog.jsx
@@ -92,6 +92,7 @@ export default function ImportGalleryDialog({ dataset, onClose, onImported }) {
value={query}
onChange={(e) => setQuery(e.target.value)}
placeholder="Search prompt, model, seed, LoRA…"
+ aria-label="Search gallery images"
className="w-full pl-7 pr-7 py-1.5 text-xs bg-port-bg border border-port-border rounded-lg text-white placeholder-gray-500 focus:outline-none focus:border-port-accent"
autoFocus
/>
diff --git a/client/src/components/media/CollectionPickerShell.jsx b/client/src/components/media/CollectionPickerShell.jsx
index e0aa0aa40a..3e2e9caeda 100644
--- a/client/src/components/media/CollectionPickerShell.jsx
+++ b/client/src/components/media/CollectionPickerShell.jsx
@@ -218,6 +218,7 @@ export default function CollectionPickerShell({
value={query}
onChange={(e) => setQuery(e.target.value)}
placeholder={searchPlaceholder}
+ aria-label={searchPlaceholder}
className="w-full bg-port-bg border border-port-border rounded pl-7 pr-2 py-1 text-[11px] text-white focus:outline-none focus:border-port-accent"
autoFocus
/>
@@ -241,6 +242,7 @@ export default function CollectionPickerShell({
value={newName}
onChange={(e) => setNewName(e.target.value)}
placeholder={newCollectionPlaceholder}
+ aria-label={newCollectionPlaceholder}
maxLength={80}
disabled={busy}
className="flex-1 bg-port-bg border border-port-border rounded px-2 py-1 text-[11px] text-white focus:outline-none focus:border-port-accent disabled:opacity-50"
diff --git a/client/src/components/messages/InboxTab.jsx b/client/src/components/messages/InboxTab.jsx
index 5424734257..842578b94c 100644
--- a/client/src/components/messages/InboxTab.jsx
+++ b/client/src/components/messages/InboxTab.jsx
@@ -383,6 +383,7 @@ export default function InboxTab({ accounts }) {
value={search}
onChange={(e) => setSearch(e.target.value)}
placeholder="Search messages..."
+ aria-label="Search messages"
className="w-full pl-9 pr-3 py-2 bg-port-bg border border-port-border rounded-lg text-sm text-white placeholder-gray-500 focus:outline-none focus:border-port-accent"
/>
</div>
diff --git a/client/src/components/music/MusicGenPanel.jsx b/client/src/components/music/MusicGenPanel.jsx
index 487b90177f..1818dbcb53 100644
--- a/client/src/components/music/MusicGenPanel.jsx
+++ b/client/src/components/music/MusicGenPanel.jsx
@@ -319,9 +319,10 @@ export default function MusicGenPanel({ track, title = '', artistId = '', artist
a fixed foundation checkpoint, so the install affordance is hidden. */}
{engine?.customModels ? (
<div className="pt-2 border-t border-port-border/60">
- <span className="block text-[11px] uppercase tracking-wider text-gray-500 mb-1">Install a model from HuggingFace</span>
+ <label htmlFor="musicgen-install-repo" className="block text-[11px] uppercase tracking-wider text-gray-500 mb-1">Install a model from HuggingFace</label>
<div className="flex items-center gap-2">
<input
+ id="musicgen-install-repo"
value={installRepo}
onChange={(e) => setInstallRepo(e.target.value)}
placeholder="org/model-repo"
diff --git a/client/src/components/pipeline/CanonCard.jsx b/client/src/components/pipeline/CanonCard.jsx
index 389e96118c..5b69e17456 100644
--- a/client/src/components/pipeline/CanonCard.jsx
+++ b/client/src/components/pipeline/CanonCard.jsx
@@ -260,6 +260,7 @@ function WardrobeRow({ wardrobe, editable, onCommit, onRemove }) {
onChange={(e) => setDraft('name', e.target.value)}
onBlur={() => commit('name')}
placeholder="Outfit name (e.g. Wedding)"
+ aria-label="Outfit name"
className="flex-1 min-w-0 px-1.5 py-0.5 text-xs bg-port-bg border border-port-border rounded text-white"
maxLength={BIBLE_LIMITS.WARDROBE_NAME_MAX}
/>
diff --git a/client/src/components/pipeline/arcCanvas/AddSeasonRow.jsx b/client/src/components/pipeline/arcCanvas/AddSeasonRow.jsx
index ccc44e0f0a..ad6a43bf3f 100644
--- a/client/src/components/pipeline/arcCanvas/AddSeasonRow.jsx
+++ b/client/src/components/pipeline/arcCanvas/AddSeasonRow.jsx
@@ -45,6 +45,7 @@ export default function AddSeasonRow({ series, onSeriesUpdate }) {
value={title}
onChange={(e) => setTitle(e.target.value)}
placeholder="Volume / Season title…"
+ aria-label="Volume / season title"
className="w-72 px-3 py-2 bg-port-bg border border-port-border rounded text-white text-sm"
autoFocus
maxLength={200}
diff --git a/client/src/components/pipeline/arcCanvas/DeriveFromManuscriptPreview.jsx b/client/src/components/pipeline/arcCanvas/DeriveFromManuscriptPreview.jsx
index c8dbd62034..d7a1cdb526 100644
--- a/client/src/components/pipeline/arcCanvas/DeriveFromManuscriptPreview.jsx
+++ b/client/src/components/pipeline/arcCanvas/DeriveFromManuscriptPreview.jsx
@@ -98,11 +98,11 @@ export default function DeriveFromManuscriptPreview({ preview, committing, onCan
onChange={(e) => setArc((a) => ({ ...a, protagonistArc: e.target.value }))} />
</label>
- <div className="border-t border-port-border pt-2 space-y-2">
+ <label className="block border-t border-port-border pt-2 space-y-2">
<span className="text-[11px] uppercase tracking-wider text-gray-500">Volume</span>
<input className={inputCls} value={volume.title} maxLength={DERIVE_TITLE_MAX} placeholder="Volume title"
onChange={(e) => setVolume((v) => ({ ...v, title: e.target.value }))} />
- </div>
+ </label>
<div className="border-t border-port-border pt-2 space-y-2">
<span className="text-[11px] uppercase tracking-wider text-gray-500">Issues (acts / chapters)</span>
diff --git a/client/src/components/pipeline/arcCanvas/SeasonActions.jsx b/client/src/components/pipeline/arcCanvas/SeasonActions.jsx
index 4f29ace98b..99817a002f 100644
--- a/client/src/components/pipeline/arcCanvas/SeasonActions.jsx
+++ b/client/src/components/pipeline/arcCanvas/SeasonActions.jsx
@@ -94,6 +94,7 @@ export default function SeasonActions({
value={newTitle}
onChange={(e) => setNewTitle(e.target.value)}
placeholder="Issue / Episode title…"
+ aria-label="Issue / episode title"
className="flex-1 px-2 py-1.5 bg-port-bg border border-port-border rounded text-white text-sm"
autoFocus
maxLength={300}
diff --git a/client/src/components/pipeline/arcCanvas/SeasonEditor.jsx b/client/src/components/pipeline/arcCanvas/SeasonEditor.jsx
index c5d2681901..6f2287685c 100644
--- a/client/src/components/pipeline/arcCanvas/SeasonEditor.jsx
+++ b/client/src/components/pipeline/arcCanvas/SeasonEditor.jsx
@@ -48,6 +48,7 @@ export default function SeasonEditor({ series, season, seasons, onSeriesUpdate,
onChange={(e) => setDraft({ ...draft, title: e.target.value })}
disabled={contentDisabled}
placeholder="Title"
+ aria-label="Volume / season title"
className={contentInputClass}
maxLength={200}
/>
@@ -57,6 +58,7 @@ export default function SeasonEditor({ series, season, seasons, onSeriesUpdate,
onChange={(e) => setDraft({ ...draft, number: parseInt(e.target.value, 10) || 0 })}
disabled={contentDisabled}
placeholder="#"
+ aria-label="Volume / season number"
className={`w-16 ${contentInputClass}`}
min={0}
max={99}
@@ -67,6 +69,7 @@ export default function SeasonEditor({ series, season, seasons, onSeriesUpdate,
onChange={(e) => setDraft({ ...draft, logline: e.target.value })}
disabled={contentDisabled}
placeholder="One-sentence logline"
+ aria-label="Logline"
className={`w-full ${contentInputClass}`}
maxLength={500}
/>
@@ -85,6 +88,7 @@ export default function SeasonEditor({ series, season, seasons, onSeriesUpdate,
onChange={(e) => setDraft({ ...draft, endingHook: e.target.value })}
disabled={contentDisabled}
placeholder="Ending hook"
+ aria-label="Ending hook"
className={contentInputClass}
maxLength={1000}
/>
@@ -94,6 +98,7 @@ export default function SeasonEditor({ series, season, seasons, onSeriesUpdate,
onChange={(e) => setDraft({ ...draft, episodeCountTarget: parseInt(e.target.value, 10) || 0 })}
disabled={contentDisabled}
placeholder="Issue / episode target"
+ aria-label="Issue / episode count target"
title="Issue / episode count target for this volume / season"
className={contentInputClass}
min={0}
diff --git a/client/src/components/pipeline/arcCanvas/TickingClockEditor.jsx b/client/src/components/pipeline/arcCanvas/TickingClockEditor.jsx
index 8f560cc002..75ed3c0518 100644
--- a/client/src/components/pipeline/arcCanvas/TickingClockEditor.jsx
+++ b/client/src/components/pipeline/arcCanvas/TickingClockEditor.jsx
@@ -35,6 +35,7 @@ export default function TickingClockEditor({ clock, disabled, onChange }) {
</label>
{enabled ? (
<div className="space-y-2 pl-1">
+ <label htmlFor="ticking-clock-label" className="block text-[10px] uppercase tracking-wider text-gray-500">Countdown</label>
<input
id="ticking-clock-label"
type="text"
diff --git a/client/src/components/pipeline/stages/IdeaStage.jsx b/client/src/components/pipeline/stages/IdeaStage.jsx
index b430ade90a..9544929482 100644
--- a/client/src/components/pipeline/stages/IdeaStage.jsx
+++ b/client/src/components/pipeline/stages/IdeaStage.jsx
@@ -89,16 +89,18 @@ export default function IdeaStage(props) {
</p>
<ul className="space-y-2">
{questions.map((q, i) => (
- <li key={i} className="space-y-1">
- <div className="text-xs text-gray-300">{q}</div>
- <input
- type="text"
- value={answers[i] || ''}
- onChange={(e) => setAnswers((prev) => ({ ...prev, [i]: e.target.value }))}
- placeholder="Your answer (optional — leave blank for LLM's choice)"
- className="w-full px-2 py-1.5 bg-port-bg border border-port-border rounded text-white text-xs"
- disabled={refining}
- />
+ <li key={i}>
+ <label className="block space-y-1">
+ <span className="block text-xs text-gray-300">{q}</span>
+ <input
+ type="text"
+ value={answers[i] || ''}
+ onChange={(e) => setAnswers((prev) => ({ ...prev, [i]: e.target.value }))}
+ placeholder="Your answer (optional — leave blank for LLM's choice)"
+ className="w-full px-2 py-1.5 bg-port-bg border border-port-border rounded text-white text-xs"
+ disabled={refining}
+ />
+ </label>
</li>
))}
</ul>
diff --git a/client/src/components/pipeline/stages/StoryboardsStage.jsx b/client/src/components/pipeline/stages/StoryboardsStage.jsx
index 5efcfe6799..160809789b 100644
--- a/client/src/components/pipeline/stages/StoryboardsStage.jsx
+++ b/client/src/components/pipeline/stages/StoryboardsStage.jsx
@@ -512,6 +512,7 @@ export default function StoryboardsStage({ issue, series, onStageUpdate, actions
onChange={(e) => updateScene(i, { slugline: e.target.value })}
onBlur={() => persist(scenes)}
placeholder="INT. FOUNDRY — NIGHT"
+ aria-label={`Scene ${i + 1} slugline`}
className="flex-1 mr-2 px-2 py-1 bg-port-bg border border-port-border rounded text-white text-xs uppercase tracking-wider font-mono"
maxLength={200}
/>
@@ -750,6 +751,7 @@ function ShotList({
onChange={(e) => onUpdateShot(j, { durationSeconds: Number(e.target.value) || 4 })}
onBlur={onBlurShot}
title="Duration in seconds"
+ aria-label={`Shot ${j + 1} duration in seconds`}
className="px-1 py-1 bg-port-bg border border-port-border rounded text-white text-[10px] text-center"
/>
<button
diff --git a/client/src/components/sharing/DuplicateGroup.jsx b/client/src/components/sharing/DuplicateGroup.jsx
index cae55ce6f8..b994703150 100644
--- a/client/src/components/sharing/DuplicateGroup.jsx
+++ b/client/src/components/sharing/DuplicateGroup.jsx
@@ -65,6 +65,7 @@ function RecordRow({ kind, record, onRenamed }) {
{editing ? (
<div className="flex items-center gap-2">
<input autoFocus value={name} onChange={(e) => setName(e.target.value)}
+ aria-label={`Rename ${record.name}`}
onKeyDown={(e) => { if (e.key === 'Enter') save(); if (e.key === 'Escape') setEditing(false); }}
className="flex-1 px-2 py-1 bg-port-card border border-port-border rounded text-white" />
<button type="button" onClick={save} disabled={busy} aria-label="Save" className="text-port-success hover:opacity-80"><Check size={14} /></button>
diff --git a/client/src/components/shell/TerminalHotKeys.jsx b/client/src/components/shell/TerminalHotKeys.jsx
index e84eee11a0..1ac6ee24be 100644
--- a/client/src/components/shell/TerminalHotKeys.jsx
+++ b/client/src/components/shell/TerminalHotKeys.jsx
@@ -58,6 +58,7 @@ export default function TerminalHotKeys({ sendCtrlB, sendCtrlC, handlePaste, sen
type="text"
className="w-32 px-2 py-1.5 bg-port-card text-white text-xs font-mono rounded border border-port-accent/50 focus:outline-none focus:border-port-accent min-h-[40px] placeholder-gray-500 shrink-0"
placeholder="Tap & paste here"
+ aria-label="Paste target — tap and paste here"
onPaste={handlePasteInputEvent}
onBlur={() => setShowPasteInput(false)}
/>
diff --git a/client/src/components/universe/CharacterDetailEditor.jsx b/client/src/components/universe/CharacterDetailEditor.jsx
index d1e9ec7e12..9a14155426 100644
--- a/client/src/components/universe/CharacterDetailEditor.jsx
+++ b/client/src/components/universe/CharacterDetailEditor.jsx
@@ -154,8 +154,10 @@ function DraftField({ field, value, onCommit, disabled, idPrefix }) {
// character cards don't render duplicate `chr-field-pronouns` DOM ids
// and break the label/input association.
const id = `chr-field-${idPrefix || 'unknown'}-${field.name}`;
+ // `id` stays off the shared spread and is written at each call site: a
+ // control whose id arrives through `{...common}` reads as unnamed to any
+ // reader — human or the a11y scan — that cannot resolve the spread.
const common = {
- id,
value: draft.value,
onChange: draft.onChange,
onBlur: draft.onBlur,
@@ -170,8 +172,8 @@ function DraftField({ field, value, onCommit, disabled, idPrefix }) {
{field.label}
</label>
{field.type === 'textarea'
- ? <textarea {...common} rows={2} />
- : <input type="text" {...common} />}
+ ? <textarea id={id} {...common} rows={2} />
+ : <input type="text" id={id} {...common} />}
</div>
);
}
diff --git a/client/src/components/universeBuilder/CompositeSheetsEditor.jsx b/client/src/components/universeBuilder/CompositeSheetsEditor.jsx
index 5943db794f..18a95246d8 100644
--- a/client/src/components/universeBuilder/CompositeSheetsEditor.jsx
+++ b/client/src/components/universeBuilder/CompositeSheetsEditor.jsx
@@ -135,6 +135,7 @@ export default function CompositeSheetsEditor({
value={newLabel}
onChange={(e) => setNewLabel(e.target.value)}
placeholder={newKind === 'world_pitch_poster' ? 'World summary concept pitch poster' : 'Gas-Giant Drifters costume sheet'}
+ aria-label="New board label"
className="bg-port-card border border-port-border rounded px-2 py-1 text-white text-sm"
maxLength={120}
/>
@@ -193,6 +194,7 @@ export default function CompositeSheetsEditor({
<input
value={editLabel}
onChange={(e) => setEditLabel(e.target.value)}
+ aria-label="Board label"
className="bg-port-card border border-port-border rounded px-2 py-1 text-white text-sm"
maxLength={120}
/>
diff --git a/client/src/components/universeBuilder/InfluenceChipsInput.jsx b/client/src/components/universeBuilder/InfluenceChipsInput.jsx
index 2434423c4b..aab3a29afd 100644
--- a/client/src/components/universeBuilder/InfluenceChipsInput.jsx
+++ b/client/src/components/universeBuilder/InfluenceChipsInput.jsx
@@ -37,12 +37,18 @@ const TONE_CLASS = {
*
* `readOnly` collapses the editor to a plain chip preview (no input, no X
* buttons, no drag handles) so locked influences render with the same chrome.
+ *
+ * `ariaLabel` names the trailing entry field. The two lists render side by side
+ * with identical chrome, so "Add reference" alone would read the same for both
+ * — callers pass which list they are (`Style prompt reference`, `Negative
+ * prompt reference`).
*/
export default function InfluenceChipsInput({
tokens,
onChange,
tone = 'accent',
placeholder = 'Add reference, press Enter',
+ ariaLabel = 'Add reference',
readOnly = false,
emptyLabel = '(none)',
}) {
@@ -150,6 +156,7 @@ export default function InfluenceChipsInput({
}
}}
placeholder={placeholder}
+ aria-label={ariaLabel}
maxLength={WORLD_INFLUENCE_ENTRY_MAX}
className="flex-1 min-w-[120px] bg-transparent text-sm text-white placeholder-gray-500 focus:outline-none"
/>
diff --git a/client/src/components/universeBuilder/UniverseBibleTab.jsx b/client/src/components/universeBuilder/UniverseBibleTab.jsx
index 17a8f7c13c..5d87e78477 100644
--- a/client/src/components/universeBuilder/UniverseBibleTab.jsx
+++ b/client/src/components/universeBuilder/UniverseBibleTab.jsx
@@ -71,6 +71,7 @@ function StyleNegativePromptEditor({ influences, onChange, locked, onToggleLock
tokens={safe.embrace}
onChange={(next) => onChange({ ...safe, embrace: next })}
placeholder="moebius linework, cel-shading, dust palette…"
+ ariaLabel="Add style prompt reference"
tone="success"
readOnly={!!locked?.influencesEmbrace}
/>
@@ -84,6 +85,7 @@ function StyleNegativePromptEditor({ influences, onChange, locked, onToggleLock
tokens={safe.avoid}
onChange={(next) => onChange({ ...safe, avoid: next })}
placeholder="blurry, lowres, watermark, neon cyberpunk…"
+ ariaLabel="Add negative prompt reference"
tone="error"
readOnly={!!locked?.influencesAvoid}
/>
diff --git a/client/src/components/universeBuilder/UniverseBuilderPage.jsx b/client/src/components/universeBuilder/UniverseBuilderPage.jsx
index 08f9ddddf1..8f677cf9e5 100644
--- a/client/src/components/universeBuilder/UniverseBuilderPage.jsx
+++ b/client/src/components/universeBuilder/UniverseBuilderPage.jsx
@@ -493,8 +493,9 @@ export default function UniverseBuilder() {
expand. New buckets default to kind='other' so they land under
the Other tab. */}
<section className="bg-port-card border border-port-border rounded p-3 flex items-center gap-2 flex-wrap">
- <span className="text-xs text-gray-400 mr-1">Add a custom sub-bucket (lands under Other):</span>
+ <label htmlFor="universe-add-sub-bucket" className="text-xs text-gray-400 mr-1">Add a custom sub-bucket (lands under Other):</label>
<input
+ id="universe-add-sub-bucket"
type="text"
value={newCategoryName}
onChange={(e) => setNewCategoryName(e.target.value)}
diff --git a/client/src/components/universeBuilder/UniverseCategoryEditor.jsx b/client/src/components/universeBuilder/UniverseCategoryEditor.jsx
index 577c9a14c3..2f8a4853bf 100644
--- a/client/src/components/universeBuilder/UniverseCategoryEditor.jsx
+++ b/client/src/components/universeBuilder/UniverseCategoryEditor.jsx
@@ -259,6 +259,7 @@ export function CategoryEditor({
onChange={(e) => setGenCustom(e.target.value)}
onKeyDown={(e) => { if (e.key === 'Enter') runGenerate(genCustom); }}
placeholder="Custom"
+ aria-label="Custom number to generate"
className="w-16 bg-port-bg border border-port-border rounded px-1.5 py-1 text-white text-xs focus:outline-none focus:border-port-accent"
/>
<button
@@ -317,6 +318,7 @@ export function CategoryEditor({
value={newLabel}
onChange={(e) => setNewLabel(e.target.value)}
placeholder="Label (e.g. Crystalline canyon basin)"
+ aria-label="New entry label"
className="bg-port-card border border-port-border rounded px-2 py-1 text-white text-sm"
maxLength={120}
/>
@@ -434,6 +436,7 @@ function VariationCard({
<input
value={editLabel}
onChange={(e) => setEditLabel(e.target.value)}
+ aria-label="Entry label"
className="bg-port-card border border-port-border rounded px-2 py-1 text-white text-sm"
maxLength={120}
/>
diff --git a/client/src/components/universeBuilder/UniverseTrunkPanels.jsx b/client/src/components/universeBuilder/UniverseTrunkPanels.jsx
index 434697c6b2..a24e175327 100644
--- a/client/src/components/universeBuilder/UniverseTrunkPanels.jsx
+++ b/client/src/components/universeBuilder/UniverseTrunkPanels.jsx
@@ -95,6 +95,7 @@ export function TrunkView({
onChange={(e) => setNewBucketName(e.target.value)}
onKeyDown={(e) => { if (e.key === 'Enter') handleAddBucket(); }}
placeholder={trunk.kind === 'characters' ? 'heroes, villains, factions' : trunk.kind === 'places' ? 'colonies, ruins' : 'weapons, vehicles'}
+ aria-label={`New ${trunk.label} sub-bucket name`}
className="flex-1 min-w-[160px] bg-port-bg border border-port-border rounded px-2 py-1.5 text-white text-sm focus:outline-none focus:border-port-accent"
maxLength={WORLD_CATEGORY_KEY_MAX}
autoFocus
diff --git a/client/src/components/voice/VoiceWidget.jsx b/client/src/components/voice/VoiceWidget.jsx
index ab2a5af048..8e539cfbbd 100644
--- a/client/src/components/voice/VoiceWidget.jsx
+++ b/client/src/components/voice/VoiceWidget.jsx
@@ -754,6 +754,7 @@ export default function VoiceWidget() {
value={draft}
onChange={(e) => setDraft(e.target.value)}
placeholder="Type a message…"
+ aria-label="Message to the voice assistant"
className="flex-1 bg-transparent text-sm text-white placeholder-gray-500 focus:outline-none"
/>
<button
diff --git a/client/src/components/wiki/tabs/SearchTab.jsx b/client/src/components/wiki/tabs/SearchTab.jsx
index 4a11494b95..6d54deaa1e 100644
--- a/client/src/components/wiki/tabs/SearchTab.jsx
+++ b/client/src/components/wiki/tabs/SearchTab.jsx
@@ -34,6 +34,7 @@ export default function SearchTab({ vaultId }) {
onChange={e => setQuery(e.target.value)}
onKeyDown={e => e.key === 'Enter' && handleSearch()}
placeholder="Search wiki pages and raw sources..."
+ aria-label="Search wiki pages and raw sources"
className="w-full bg-port-card border border-port-border rounded-lg pl-11 pr-20 py-3 text-white placeholder-gray-500 focus:outline-none focus:border-port-accent"
autoFocus
/>
diff --git a/client/src/components/writers-room/LibraryPane.jsx b/client/src/components/writers-room/LibraryPane.jsx
index 9ce5438de7..4a844a92e2 100644
--- a/client/src/components/writers-room/LibraryPane.jsx
+++ b/client/src/components/writers-room/LibraryPane.jsx
@@ -170,6 +170,7 @@ export default function LibraryPane({ folders, works, activeWorkId, onSelectWork
value={folderName}
onChange={(e) => setFolderName(e.target.value)}
placeholder="Folder name"
+ aria-label="Folder name"
className="w-full bg-port-bg border border-port-border rounded px-2 py-1 text-xs min-w-0 min-h-[44px]"
/>
<div className="flex items-center gap-1">
@@ -187,6 +188,7 @@ export default function LibraryPane({ folders, works, activeWorkId, onSelectWork
value={workTitle}
onChange={(e) => setWorkTitle(e.target.value)}
placeholder="Title"
+ aria-label="Work title"
className="w-full bg-port-bg border border-port-border rounded px-2 py-1 text-xs min-h-[44px]"
/>
<select
diff --git a/client/src/pages/AIProviders.jsx b/client/src/pages/AIProviders.jsx
index c04cf533f8..83a664a463 100644
--- a/client/src/pages/AIProviders.jsx
+++ b/client/src/pages/AIProviders.jsx
@@ -1389,6 +1389,7 @@ function ProviderForm({ provider, onClose, onSave, allProviders = [], runnerAllo
<code className="text-xs text-gray-300 bg-port-bg px-2 py-1.5 rounded border border-port-border shrink-0">{key}</code>
<input
type={isSecret ? 'password' : 'text'}
+ aria-label={`${key} value`}
value={value}
onChange={(e) => setFormData(prev => ({
...prev,
@@ -1439,6 +1440,7 @@ function ProviderForm({ provider, onClose, onSave, allProviders = [], runnerAllo
value={newEnvKey}
onChange={(e) => setNewEnvKey(e.target.value.toUpperCase())}
placeholder="KEY"
+ aria-label="New environment variable name"
className="w-1/3 px-2 py-1.5 bg-port-bg border border-port-border rounded text-white text-sm focus:border-port-accent focus:outline-hidden font-mono"
/>
<input
@@ -1446,6 +1448,7 @@ function ProviderForm({ provider, onClose, onSave, allProviders = [], runnerAllo
value={newEnvValue}
onChange={(e) => setNewEnvValue(e.target.value)}
placeholder="value"
+ aria-label="New environment variable value"
className="flex-1 px-2 py-1.5 bg-port-bg border border-port-border rounded text-white text-sm focus:border-port-accent focus:outline-hidden"
/>
<label className="flex items-center gap-1 text-xs text-gray-400 shrink-0 cursor-pointer" title="Mark as secret (value will be masked on provider list)">
diff --git a/client/src/pages/DataDog.jsx b/client/src/pages/DataDog.jsx
index 64670c7691..96cd8504ae 100644
--- a/client/src/pages/DataDog.jsx
+++ b/client/src/pages/DataDog.jsx
@@ -288,6 +288,7 @@ export default function DataDog() {
name="site"
value={formData.site}
onChange={handleInputChange}
+ aria-label="Custom site"
className="w-full px-3 py-2 bg-gray-700 border border-gray-600 rounded text-white"
placeholder="e.g., api.custom-datadog.com"
/>
diff --git a/client/src/pages/MediaCollectionDetail.jsx b/client/src/pages/MediaCollectionDetail.jsx
index 457ae83e7c..9eca2154c7 100644
--- a/client/src/pages/MediaCollectionDetail.jsx
+++ b/client/src/pages/MediaCollectionDetail.jsx
@@ -354,6 +354,7 @@ export default function MediaCollectionDetail() {
if (e.key === 'Escape') { setNameDraft(collection.name); setEditingName(false); }
}}
maxLength={80}
+ aria-label="Collection name"
className="text-xl font-semibold bg-port-card border border-port-border rounded px-2 py-1 text-white focus:outline-none focus:border-port-accent"
/>
);
diff --git a/client/src/pages/VideoTimeline.jsx b/client/src/pages/VideoTimeline.jsx
index 24424e76df..db27c56e83 100644
--- a/client/src/pages/VideoTimeline.jsx
+++ b/client/src/pages/VideoTimeline.jsx
@@ -75,6 +75,7 @@ export default function VideoTimeline() {
value={name}
onChange={(e) => setName(e.target.value)}
placeholder="New project name…"
+ aria-label="New project name"
className="flex-1 max-w-sm px-3 py-2 bg-port-card border border-port-border rounded-md text-white text-sm placeholder-gray-500 focus:outline-none focus:border-port-accent"
disabled={creating}
/>