i'm seeing an anti-pattern here, and we should fix it in pieces using css:
<div class="theme-menu__popover" id="theme-menu-popover" role="menu" aria-label="Theme" hidden>
<button
type="button"
class="theme-menu__option"
role="menuitemradio"
aria-checked="false"
data-theme-option="auto"
data-theme-option-mode="auto"
>
<span class="theme-swatch theme-menu__swatch" data-theme-mode="auto" aria-hidden="true"></span>
<span class="theme-menu__label">Auto/System</span>
</button>
<button
type="button"
class="theme-menu__option"
role="menuitemradio"
aria-checked="false"
data-theme-option="light"
data-theme-option-mode="light"
>
<span class="theme-swatch theme-menu__swatch" data-theme="light" aria-hidden="true"></span>
<span class="theme-menu__label">Light</span>
</button>