Scratch my post above, I made a better example:
Re:Bootstrap Treeview
by lukastyrychtr on Friday February 28, 2020 @06:36PM
(#22447433)
Unfortunately, this is missing the semantic metadata about the fact that it's a tree. It might be fine in some cases, but in general you would want to add some Aria attributes. But i'm not sure whether you could generate the entire thing server-side.
Re:Bootstrap Treeview
by jakearmitage on Friday February 28, 2020 @12:50PM
(#22444653)
Thank you, that's enlightening.
https://codepen.io/dsheiko/pen/MvEpXm
This is a bit fancier than necessary and that makes it not so good as an example for learning, but hopefully it will be enough to give you the idea.
edit: this one is a little bit better to understand the basics: https://medium.com/metaphorical-web/javascript-treeview-cont...
In short, summary/detail has the native hability to collapse the details and you can explore that to implement a tree by nesting them.