polish(transcribe): review nits — kbd size, focus ring, guard, action doc (#327)
Review follow-up (Leonie, Felix, Markus): bump cheatsheet key caps to text-sm
for the 60+ audience, add a focus-visible ring to the close button, simplify
the draw-hint guard to {#if drawArmed} (the $effect already clears it outside
edit mode), and document why the transcribeShortcuts action ignores its node
and binds to window.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -27,6 +27,10 @@ function isEditableTarget(target: EventTarget | null): boolean {
|
||||
return tag === 'INPUT' || tag === 'TEXTAREA' || target.isContentEditable;
|
||||
}
|
||||
|
||||
// `node` is unused: the listener is global (window) so a shortcut fires no
|
||||
// matter where focus sits on the page. It is still authored as a Svelte action
|
||||
// (`use:transcribeShortcuts`) so its lifecycle is tied to the host element's
|
||||
// mount/unmount and `destroy()` reliably removes the listener.
|
||||
export function transcribeShortcuts(_node: HTMLElement, initial: TranscribeShortcutOptions) {
|
||||
let options = initial;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user