mathiasbynens / jquery-details

World’s first <details>/<summary> polyfill™
https://mths.be/details
GNU General Public License v2.0
121 stars 34 forks source link

Don’t auto-insert <summary> when there isn’t one already #1

Open mathiasbynens opened 12 years ago

mathiasbynens commented 12 years ago

http://www.whatwg.org/specs/web-apps/current-work/multipage/interactive-elements.html#the-details-element:

If there is no child summary element, the user agent should provide its own legend (e.g. “Details”).

Chrome (the only browser with a working <details> implementation) does just that — provide a text legend saying “Details”. This is just a text node, not a child of a summary element.

Consider matching this behavior.

(I hope the spec will change this in the future: https://www.w3.org/Bugs/Public/show_bug.cgi?id=15455)