- From: Boris Zbarsky <bzbarsky@MIT.EDU>
- Date: Tue, 20 Mar 2012 21:04:50 -0400
On 3/20/12 6:50 PM, Adam Barth wrote: > I'm not sure<dialog> addresses the same use cases as alert() and > confirm() because<dialog> is significantly more complicated. But also allows for much better UX... > <dialog id="orderConfirm"> > Are you sure you want to order the widget? > <button onclick="document.getElementById('orderConfirm').close(true);">Ok</button> > <button onclick="document.getElementById('orderConfirm').close(false);">Cancel</button> Those should be "Yes" and "No" respectively, according to every single HIG I've seen. Something that's not possible with confirm(), unfortunately. Perhaps confirm() should take (optional) labels for the two buttons? > Even after all that, you get a less functional experience in some > respects. For example, on Mac OS X, the Cancel button should be to > the left of the Ok button whereas on Windows they should be ordered as > in my example (i.e., with Ok to the left of Cancel). Yep, this is a drawback for <dialog>.... -Boris
Received on Tuesday, 20 March 2012 18:04:50 UTC