HTML Renderer

Render a parsed song to semantic HTML with aria labels and grid layout.


Functions

chordAriaLabel

chordAriaLabel(chord: Chord, tsBeats: number, isWholeBar: boolean, spoken: SpokenPreset, denominator: number): string

Generate an accessible spoken label for a chord using the given spoken preset.

reflowSong

reflowSong(song: Song, barsPerLine: number): Song

Classes

HtmlRenderer

Renders a `Song` to a semantic HTML string. Output uses CSS grid layout with `part` attributes for styling and `aria-label` attributes for accessibility.

Constructor

new HtmlRenderer(config: TextRendererConfig): HtmlRenderer

Methods

render(song: Song): string

Constants

DEFAULT_SPOKEN_PRESET

const DEFAULT_SPOKEN_PRESET: SpokenPreset

The built-in English spoken preset used by `HtmlRenderer` when none is provided.