I used AI to help figure this out, you'll need to test all your accessibility and might want to change the selector to use an ID.
- Add radix dialog
- Add html embed
- Add this to the the embed:
<script type="module">
window.addEventListener('load', () => {
const triggerButton = document.querySelector('button[aria-haspopup="dialog"][data-state="closed"]');
if (triggerButton) {
triggerButton.setAttribute('aria-expanded', 'true');
triggerButton.setAttribute('data-state', 'open');
// Optionally, you can trigger a click event for any additional event listeners
triggerButton.click();
}
});
</script>
- Publish