[html5] Best tag for modal window DOM element
Stefano Gargiulo
rastrano at gmail.com
Wed Nov 28 14:14:40 PST 2012
Thanks you all! I was looking for <dialog>, perfect :)
http://www.w3.org/TR/html5/commands.html#the-dialog-element
PS. also the DOM methods are very useful in my opinion, i hope it will
implemented soon in all the browsers:
dialog . show <http://www.w3.org/TR/html5/commands.html#dom-dialog-show>( [
anchor ] )
Displays the dialog<http://www.w3.org/TR/html5/commands.html#the-dialog-element>
element.
The argument, if provided, provides an anchor point to which the element
will be fixed.
dialog . showModal<http://www.w3.org/TR/html5/commands.html#dom-dialog-showmodal>(
[ anchor ] )
Displays the dialog<http://www.w3.org/TR/html5/commands.html#the-dialog-element>
element
and makes it the top-most modal dialog.
The argument, if provided, provides an anchor point to which the element
will be fixed.
This method honors the
autofocus<http://www.w3.org/TR/html5/attributes-common-to-form-controls.html#attr-fe-autofocus>
attribute.
dialog . close <http://www.w3.org/TR/html5/commands.html#dom-dialog-close>(
[ result ] )
Closes the dialog<http://www.w3.org/TR/html5/commands.html#the-dialog-element>
element.
The argument, if provided, provides a return value.
dialog . returnValue<http://www.w3.org/TR/html5/commands.html#dom-dialog-returnvalue>
[
= result ]
Returns the dialog<http://www.w3.org/TR/html5/commands.html#the-dialog-element>'s
return value.
Can be set, to update the return value.
2012/11/28 Guille Paz <guille87paz at gmail.com>
> Hi,
>
> The dialog element is in draft:
> http://www.w3.org/TR/html5/commands.html#the-dialog-element
>
> But, you can use any tag with ARIA:
> <article role="dialog"></article>
>
> Slds,
>
> Guille Paz
> http://pazguille.me
>
>
> On Wed, Nov 28, 2012 at 5:28 PM, Ian Hickson <ian at hixie.ch> wrote:
>
>> On Wed, 28 Nov 2012, Stefano Gargiulo wrote:
>> >
>> > What is the best html5 tag to describe a modal floating window, eg. a
>> > floating login mask over the page?
>> >
>> > <aside> ?
>> > <section> ?
>>
>> <dialog>, but it's not yet widely implemented.
>>
>> In the meantime, probably <article> or <section> or <aside>, depending on
>> exactly how the login window is set up: <article> if it would make sense
>> if it was on its own page, <aside> if it's the spiritual equivalent of a
>> sidebar login form (probably not if it's modal), <section> otherwise.
>>
>> --
>> Ian Hickson U+1047E )\._.,--....,'``. fL
>> http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,.
>> Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'
>> _______________________________________________
>> Help mailing list
>> Help at lists.whatwg.org
>> http://lists.whatwg.org/listinfo.cgi/help-whatwg.org
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/help-whatwg.org/attachments/20121128/4e0830fa/attachment-0002.htm>
More information about the Help
mailing list