Hacker News new | ask | show | jobs
by bigblind 1729 days ago
For screen readers, there's the "tree" aria role[0] which lets you mark a specific element as a tree, and mark the elements within it as items at a certain level.

[0] https://www.w3.org/WAI/GL/wiki/Using_ARIA_trees

3 comments

Nested DIVs also describe a tree but apparently that's too difficult to do with lambda calculus.
Tree wont' be a good fit for comments because one would want to read content by line/word/etc. while a tree item is presented as a whole thing by the screen reader so it's only good for small textual items.
There is also the aria-expanded role which could be added to a button if this [] were only changed to a button...