A major cause of accessibility problems in Web Apps is authors faking modal dialogue boxes and not providing keyboard access to close or respond to those. Thanks largely to the agitation of The Mighty Steve Faulkner, Ian Hickson will be looking at at how to build this into the language.
This is particularly welcome, because when I interviewed Ian for the Web Standards Project two years ago, I asked him what his favourite feature that will get bumped from HTML5 to HTMLnext, and he replied
In-window modal dialogs or dialog box—the kind of prompt you get when the computer asks you a question and won’t let you do anything else until you answer the question. For instance, the window that comes up when you say "Save As…" is usually a modal dialog.
Right now people fake it with
divs and complicated styles and script. It would be neat to just be able to say "make this section a modal dialog". Like
showModalDialog(), but within the page instead of opening a new window with a new page.
I’d add it to HTML 5, but there are so many new features already that we need to wait for the browsers to catch up.
Steve’s mail to the working group gives lots of examples of faked modal dialogues in the wild. They’re also collecting use-cases over at the WHATWG wiki – don’t be bashful to add any that you can think of.
It would be super if there were a declarative method, for example (off the top of my head) a
modal attribute that could go on a div/ article/ form that would do the trick.
What do you think?