Generate theme toggle HTML button markup with a localized aria-label.
Renders a moon (lightโdark) and sun (darkโlight) icon as crisp inline
SVGs (with currentColor) so the icon renders identically across
platforms โ emoji rendering varies wildly between OSes. The legacy
emoji <span>s remain as a low-priority fallback for environments
where SVG is suppressed or stylesheets fail to load.
The button announces its current state via aria-pressed so screen
readers describe it as a toggle rather than a generic action button.
Parameters
ariaLabel: string
Localized accessible label for the theme toggle button
Generate theme toggle HTML button markup with a localized aria-label. Renders a moon (lightโdark) and sun (darkโlight) icon as crisp inline SVGs (with
currentColor) so the icon renders identically across platforms โ emoji rendering varies wildly between OSes. The legacy emoji<span>s remain as a low-priority fallback for environments where SVG is suppressed or stylesheets fail to load.The button announces its current state via
aria-pressedso screen readers describe it as a toggle rather than a generic action button.