W3C home > Mailing lists > Public > whatwg@whatwg.org > March 2012

[whatwg] Proposal for non-modal versions of modal prompts

From: Maciej Stachowiak <mjs@apple.com>
Date: Wed, 21 Mar 2012 20:03:25 -0700
Message-ID: <6D4E7BE8-A5D0-4DE1-AF2E-0E21669D2B79@apple.com>

On Mar 20, 2012, at 6:04 PM, Boris Zbarsky wrote:

> 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.

Mac OS X HIG recommends that the active option should be labeled with a meaningful verb or verb phrase, not just something generic like "OK" or "Yes". So the proper labels would be "Order" and "Cancel" in this example. 

reddit's login overlay, for example, actually meets the spirit of this requirement by having "create account", "login" and "close this window" as the available commands, though the layout is webby and consistent with the web app itself, rather than consistent with Mac UI conventions.

Regards,
Maciej
Received on Wednesday, 21 March 2012 20:03:25 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:40 UTC