Commit 062cdc3
authored
fix: add inert attribute to background content when popup is shown (#34)
* fix: add inert attribute to background content when popup is shown (#22)
When the validation error popup is displayed, the modal container is
moved to document.body via a portal effect so that the inert attribute
can safely be applied to <main> and <header>. This prevents keyboard
focus from reaching background content while the popup is open.
* fix: remove hardcoded container names to allow multiple worktrees to run simultaneously
* fix: use native <dialog> for validation modal to properly trap focus
Replace manual inert attribute management + DOM portal approach with a
native <dialog> element using showModal(). The browser's top-layer
mechanism handles focus trapping and background inertness natively,
fixing keyboard navigation leaking to background elements.
* fix: only apply flex layout when dialog[open] to avoid overriding UA display:none
* fix: remove dialog container from tab sequence with tabindex=-11 parent caf6f42 commit 062cdc3
1 file changed
Lines changed: 36 additions & 31 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
305 | 305 | | |
306 | 306 | | |
307 | 307 | | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
308 | 318 | | |
309 | 319 | | |
310 | 320 | | |
| |||
436 | 446 | | |
437 | 447 | | |
438 | 448 | | |
439 | | - | |
440 | | - | |
441 | | - | |
442 | | - | |
443 | | - | |
444 | | - | |
445 | | - | |
446 | | - | |
447 | | - | |
448 | | - | |
449 | | - | |
450 | | - | |
451 | | - | |
452 | | - | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
453 | 460 | | |
454 | 461 | | |
455 | 462 | | |
| |||
674 | 681 | | |
675 | 682 | | |
676 | 683 | | |
677 | | - | |
678 | | - | |
679 | | - | |
680 | | - | |
681 | | - | |
682 | | - | |
683 | | - | |
684 | | - | |
685 | | - | |
686 | | - | |
687 | | - | |
688 | | - | |
689 | | - | |
690 | | - | |
| 684 | + | |
| 685 | + | |
691 | 686 | | |
692 | 687 | | |
693 | | - | |
694 | 688 | | |
695 | 689 | | |
696 | | - | |
697 | | - | |
698 | 690 | | |
699 | 691 | | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
700 | 705 | | |
701 | 706 | | |
702 | 707 | | |
| |||
0 commit comments