Skip to content

Commit cdf905d

Browse files
centdixclaude
andcommitted
fix: replace autofocus attribute with use:action to resolve a11y warning
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent dc6c487 commit cdf905d

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

frontend/src/lib/CreateWorktreeDialog.svelte

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
let profile = $state(savedProfile ?? "Full");
3333
let saveDefault = $state(false);
3434
35+
function focus(node: HTMLElement) { node.focus(); }
36+
3537
$effect(() => {
3638
if (!profiles.some(p => p.name === profile)) {
3739
profile = defaultProfile;
@@ -61,7 +63,7 @@
6163
<textarea
6264
id="wt-prompt"
6365
rows="3"
64-
autofocus
66+
use:focus
6567
class="w-full px-2.5 py-1.5 rounded-md border border-edge bg-surface text-primary text-[13px] placeholder:text-muted/50 outline-none focus:border-accent resize-y"
6668
placeholder="Describe the task for the agent..."
6769
bind:value={prompt}

0 commit comments

Comments
 (0)