This has been building over time already in the dialog-box, just adding this into the tracker now.
Originally sparked from a complaint about alert() blocking the web page from doing things, like loading.
Now my goal is to make it function as close to alert() as possible in all ways, doing better when possible.
List of behaviors off the top of my head that must be replicated perfectly correctly or needs more thought:
- Keyboard shortcuts (space, enter, escape, scrolling keys, that's it maybe?)
- Space should be a configurable dismiss or scroll, and default to scroll since accidental dismissal is going to be annoying.
- What would Enter be? It should probably not close when used with keyboard navigation
- Scrolling (don't transfer scrolling to behind dialog lol)
- Page up/down scrolling
- Screen readers (needs external user testing because the only screen reader experience I have is a bit of macOS Voiceover, but current dev state is suboptimal announcing the close button)
- Probably more that I forgot
Eventual advantages of the dialog box:
- It's HTML, so things can be turned into clickable links, which is plainly better than having to copy links and pasting them right back into your browser