4 ms·
Personally I think this solution is simpler and easier to implement than using js. This isn't really an abuse. This seems exactly what these tags were intended
by conradludgate 6y ago
Personally I think this solution is simpler and easier to implement than using js. This isn't really an abuse. This seems exactly what these tags were intended for
- ironmagma 6y agoIt says it in the article: > WARNING! This is a misuse of these HTML elements. While it is valid markup, it may not be accessible. This is an experiment and not intended for production use.
- anoncake 6y agoThen what is the correct use for them? If it's valid markup, used for the correct purpose, accessibility is the responsibility of the browser.
- xg15 6y agoThe correct use is for the <summary> element to be a summary of the rest of the block. This is not the case in threaded conversations.
- WorldMaker 6y agoIs the title of a thread not a summary of that thread?
- xg15 6y agoThis is not about the title but about a post and its replies though.
- WorldMaker 6y agoBut in most "threaed forum" examples, including several in the article, such as HN or Reddit, the post contents would be in the body of the DETAILS and the SUMMARY for when minimized is just the title or a summary of how many comments are below. This article isn't suggesting putting the whole post in the SUMMARY, though the given example doesn't likely make that clear because it isn't a full example.
- WorldMaker 6y agoSeems an overly cautious warning. The spec seems to indicate that the only "semantic" meaning to these elements is "I have content or controls I wish to show/hide" and the accessibility guarantee is "allow the user to show/hide details". It sounds perfectly cromulent use. Could even default the details to shown with the "open" attribute and still meet the spec-detailed description as the affordance there is that it can then be hidden. DETAILS spec: https://html.spec.whatwg.org/multipage/interactive-elements.html#the-details-element https://html.spec.whatwg.org/multipage/interactive-elements....
- deleted 6y ago[deleted]