Skip to content

Replace the two-button captions/transcript switch with a segmented control #420

Description

@maboa

Summary

Replace the two-button captions/transcript switch in the navbar with a single
segmented control ("Transcript | Captions") whose active segment is highlighted.

Problem

#caption-editor-btn and #transcript-editor-btn are a mutually exclusive
mode switch implemented as two separate action buttons: clicking one disables
itself and enables the other (js/editor-core.js click handlers). The
disabled button is therefore the only indicator of the current view — but
disabled conventionally reads as "unavailable", not "you are here". The
tooltips name actions ("Edit captions"), not state, so nothing in the UI says
which editor is active.

Proposal

  • One two-segment control in the existing design language (daisyUI join or
    tabs tabs-boxed): Transcript | Captions, selected segment highlighted.
  • Same behaviour contract as today so programmatic callers keep working — the
    transcription services call
    document.querySelector('#transcript-editor-btn')?.click() on completion
    (deepgram/assemblyai/whisper/parakeet modules), so either keep the ids on
    the segments or keep hidden compatibility elements.
  • Slightly narrower than two btn-square buttons — frees navbar space.
  • Accessibility: role="tablist"/aria-selected (or a radio group) makes the
    state machine explicit for screen readers, continuing the Accessibility: fix Lighthouse findings (labels, ARIA tab roles, contrast) #402 work.

Notes

Downstream, Glider (the native macOS wrapper) plans to reposition the switch
within its top bar; that's a Glider-side layout concern. The control-form fix
belongs upstream so browser users get the clearer state indication too.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions