WebAIM - Web Accessibility In Mind

E-mail List Archives

Tree role in a forum?

for

From: Alexander Karelas
Date: May 5, 2018 3:11AM


I develop this forum: https://forums.baza.gr/readmsg/92 in which (as you
might see) the titles of the messages in the thread form a visual tree,
similar to how threaded emails appear in Thunderbird, or subject lines
appear in USENET clients.

Now I wonder if that visual tree should have a role="tree".

I thought it would be a good idea, in order to allow screen-reader users
to navigate around the tree with standard keystrokes which would avoid
the confusion.

But on the other hand, I see that the 'u' key in NVDA does nothing when
focus is inside the tree. I liked the fact that 'u' would go to the next
unread link (ie an unread message in the tree), since it would allow the
screen-reader user to not traverse the entire tree to find a message
that they haven't read already.

So, does using role="tree" seem like a good idea to you in this case?

Maybe I should code my own keyboard shortcut that will take the user to
the next unread message in the tree... something which would require
keeping track in the database of which messages they've read already,
since the browser won't report this information to JavaScript for
privacy reasons.

What do you think? Any other advice?

Thanks