Files
bible/rules/patterns/modal-workflows/README.md

26 lines
1.2 KiB
Markdown

# Shared modal example
A shared component owns the header layout, close and backdrop behavior, busy
state and navigation control placement. Each dialog provides only its title,
body, available actions and optional wizard steps. The left and right navigation
icons use the same icon family and have accessible labels.
```html
<dialog class="modal" aria-labelledby="job-title">
<div class="modal-head">
<button type="button" data-modal-close aria-label="Close" title="Close">...</button>
<button type="button" data-modal-navigation aria-label="Back" title="Back">...</button>
<button type="button" data-modal-navigation aria-label="Next" title="Next">...</button>
<h2 id="job-title">Backup job</h2>
<div class="modal-head-actions"><button type="submit" aria-label="Save" title="Save">...</button></div>
</div>
<div class="modal-body">...</div>
</dialog>
```
The shared shell places close and navigation on the left and centers the title.
The navigation pair stays visible with unavailable directions disabled, separated
from close. The highlighted save icon stays at the far right of the header.
A dialog without wizard steps omits navigation;
its content and actions remain specific to that dialog.