Flyout component uses the native dialog element to provide a modal dialog which comes with browser-specific
behavior. As a result, accessibility features may vary across different browsers.Tab, Shift-TabESCfocus on trigger elementaria property:aria-labelaria-label="STRING"aria property is provided, uses the contents of the header slot and falls back to a fixed name.dialog, set aria-haspopup on the trigger using the aria property.
Provide the dialog title through the header slot or the flyout aria property.aria-haspopup through the trigger component aria prop when opening the flyout.header slot or aria property.<p-button aria-haspopup="dialog">
Open dialog
</p-button><p-button aria="{'aria-haspopup': 'dialog'}">
Open dialog
</p-button><p-flyout aria-label="Navigation">
...
</p-flyout><p-flyout>
<p-heading slot="header" tag="h2" size="lg">
Main navigation
</p-heading>
...
</p-flyout>
<!-- or with aria prop when no visible header is shown -->
<p-flyout aria="{'aria-label': 'Main navigation'}">
...
</p-flyout><p-button>
Open dialog
</p-button>
<p-flyout>
<p-heading slot="header" tag="h2" size="lg">
Dialog heading
</p-heading>
...
</p-flyout><p-button aria="{'aria-haspopup': 'dialog'}">
Open dialog
</p-button>
<p-flyout>
<p-heading slot="header" tag="h2" size="lg">
Dialog heading
</p-heading>
...
</p-flyout>