Re: [whatwg] summary/details - proposal

On Sun, 6 Apr 2014, Steve Faulkner wrote:
> On 6 April 2014 05:11, Ian Hickson <ian@hixie.ch> wrote:
> > On Sat, 5 Apr 2014, Steve Faulkner wrote:
> > >
> > > The <summary> itself is not interactive, so only the triangle 
> > > provides the actionable control.
> >
> > The spec doesn't disallow making clicks on (non-interactive) parts of 
> > the summary defer to the disclosure triangle. Browsers should just 
> > match platform conventions, where applicable, and otherwise make 
> > whatever is considered the best choice for users (such as making such 
> > content also trigger the disclosure triangle).
>
> Platform conventions for disclosure type widgets vary, on windows for 
> example, the current implementations match the convention.

The conventions on Windows are all over the place:

   http://msdn.microsoft.com/en-us/library/windows/desktop/aa511487.aspx

...but I doubt that this matches any of the Windows conventions:

| when the summary element includes other interactive elements (as it is 
| allowed to), clicking on them results in the details element being 
| opened/closed


> > > <details>
> > > <summary id=x> <label for=x>Foo</label> </summary>
> > >  ...
> > > </details>
> >
> > That's way more complicated than necessary for authors,
> 
> how so?

All that should be necessary is:

 <details>
  <summary> Foo </summary>
  ...
 </details>

Adding two attributes and an elements is thus more complicated than 
necessary. This seems pretty unambiguous to me.


> with the current definition how do authors provide a label for the 
> disclosure widget when summary also contains controls with labels?

If doing so matches the platform conventions, any non-interactive text in 
the <summary> would open the widget.


> in the absence of browser making "clicks on (non-interactive) parts of 
> the summary defer to the disclosure triangle." how is an author supposed 
> to do this?

The author isn't supposed to do this. The whole point of semantic controls 
like this is that the user agent is the one that picks the user interface.

Once we start talking about custom widgets, we're in the space of Web 
components, at which point the author can do whatever the author wants.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Monday, 7 April 2014 18:21:14 UTC