Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/bright-jars-breathe.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@siemens/ix': patch
---

Update the modal accessibility Storybook examples so the blocking variant opens with a real backdrop and both blocking and non-blocking demos include interactive content behind and inside the dialog.
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,14 @@ type Story = StoryObj;
/**
* Modal dialog with an accessible name via `aria-labelledby` (blocking / `aria-modal="true"`).
*/
const openModal = async ({ canvasElement }: { canvasElement: HTMLElement }) => {
const modal = canvasElement.querySelector('ix-modal') as HTMLIxModalElement | null;
await modal?.showModal();
};
Comment thread
lakshmi-priya-b marked this conversation as resolved.
export const Default: Story = {
render: () => html`
<ix-button>background button1</ix-button>
<ix-button>background button2</ix-button>
<ix-modal class="visible" aria-labelledby="modal-a11y-title">
<ix-modal-header id="modal-a11y-title">Modal title</ix-modal-header>
<ix-modal-content>Supporting description for this dialog.</ix-modal-content>
Expand All @@ -40,6 +46,7 @@ export const Default: Story = {
</ix-modal-footer>
</ix-modal>
`,
play: openModal,
};

/**
Expand All @@ -49,6 +56,8 @@ export const NonBlocking: Story = {
render: () => html`
<main>
<p>Page content stays interactable while the panel is open.</p>
<ix-button>background button1</ix-button>
<ix-button>background button2</ix-button>
<ix-modal
class="visible"
aria-labelledby="modal-nb-title"
Expand All @@ -64,4 +73,5 @@ export const NonBlocking: Story = {
</ix-modal>
</main>
`,
play: openModal,
};
Loading