These forums are currently read-only due to receiving more spam than actual discussion. Sorry.

It is currently Sat Dec 02, 2017 4:03 pm Advanced search

<summary> element contents

Do you think the HTML spec should do something differently? You can discuss spec feedback here, but you should send it to the WHATWG mailing list or file a bug in the W3C bugzilla for it to be considered.

<summary> element contents

Postby tdriggs » Wed Nov 28, 2012 6:26 pm

In the details element, from section 4.11, my understanding is that the <summary> element may only contain phrasing content, and therefore may not contain elements such as headers, or other such block content. I'm concerned that this is an unnecessary constraint that will result in people either not using the feature, or using it in a way that results in ignored validation errors. I would therefore like to suggest that the <summary> element definition be amended to accept more content than it does today, while keeping its current behavior of showing the element's other contents when clicked.
tdriggs
<h6>
 
Posts: 1
Joined: Wed Nov 28, 2012 6:19 pm

Re: <summary> element contents

Postby JAB Creations » Thu Nov 29, 2012 12:03 am

I would imagine the summary element is much like the summary attribute on the table element. On my site I use the meta-description also as a summary just below the header for each blog entry. Because it's an element I imagine you can think of it like a specialized paragraph though with a more refined role; therefore using inline text elements such as em(phasis) and strong probably would not be out of the intended scope.

If people do dumb stuff like using only WebKit prefixes for CSS3 features on mobile devices then the correct thing to do is to educate people. (X)HTML5 validators should fail to validate documents containing block-level elements inside of the summary in example. In contrast Opera incorrectly caved and added WebKit prefixed properties in 12.1 which only gives the idea that it's in any way acceptable to do the wrong thing.

Of course XHTML5 could be evolved to break the XML parsing when the summary element contains any block-level elements and force authors to code correctly but people still think code is just a bunch of text, not an application. In short some people will choose to do the wrong thing, use it as an advantage to show that you're not only that much more capable though you're not lazy and ignorant as well.
User avatar
JAB Creations
<aside>
 
Posts: 566
Joined: Tue Mar 13, 2007 4:48 am
Location: Sarasota Florida, USA

Re: <summary> element contents

Postby zcorpan » Thu Nov 29, 2012 10:46 am

What's the use case?
zcorpan
<article>
 
Posts: 807
Joined: Tue Feb 06, 2007 8:29 pm
Location: Sweden


Return to Feedback on the Specs

Who is online

Users browsing this forum: No registered users and 1 guest