[whatwg] Proposal for non-modal versions of modal prompts
    Boris Zbarsky 
    bzbarsky at MIT.EDU
       
    Tue Mar 20 18:04:50 PDT 2012
    
    
  
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
    
    
More information about the whatwg
mailing list