Hacker News new | ask | show | jobs
by floatingatoll 1729 days ago
Is there any HTML that can be wrapped around the spacer-indents that would mark them as indented for screenreaders? If I knew more about this I’d propose that as a unified diff, so that they could apply it to their templates and solve this, but I don’t :(

(I know there’s ways to restructure it completely to do this, but I like focused and surgical changes that don’t affect anyone who doesn’t notice them. Opinions vary on that.)

2 comments

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

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...
The UL/OL tags for lists solved this problem 30 years ago.