Skip to content

Commit a2888a8

Browse files
masseaterclaude
andcommitted
fix(sdd-webapp): add accessible labels and use getErrorMessage
- Add htmlFor/id labels to form inputs in ProjectSelector - Update fetchSpecContent to use getErrorMessage utility 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 27516c3 commit a2888a8

2 files changed

Lines changed: 17 additions & 3 deletions

File tree

packages/sdd-webapp/src/client/components/ProjectSelector.tsx

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,13 +95,27 @@ export function ProjectSelector({
9595
<PopoverContent>
9696
<div className="flex flex-col gap-2">
9797
<div className="text-sm font-medium">Add project</div>
98+
<label
99+
htmlFor="project-path"
100+
className="text-xs text-muted-foreground"
101+
>
102+
Project path
103+
</label>
98104
<Input
99-
placeholder="Project path (e.g., /path/to/project)"
105+
id="project-path"
106+
placeholder="e.g., /path/to/project"
100107
value={newPath}
101108
onChange={(e) => setNewPath(e.target.value)}
102109
/>
110+
<label
111+
htmlFor="project-name"
112+
className="text-xs text-muted-foreground"
113+
>
114+
Project name (optional)
115+
</label>
103116
<Input
104-
placeholder="Project name (optional)"
117+
id="project-name"
118+
placeholder="e.g., My Project"
105119
value={newName}
106120
onChange={(e) => setNewName(e.target.value)}
107121
/>

packages/sdd-webapp/src/client/hooks/useSpecs.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export function useSpecs(
5252
setSpecContent(data);
5353
setSelectedFile(path);
5454
} catch (err) {
55-
setError(err instanceof Error ? err.message : "Unknown error");
55+
setError(getErrorMessage(err, "Unknown error"));
5656
} finally {
5757
stopLoading();
5858
}

0 commit comments

Comments
 (0)