Search code examples
htmlaccessibilitywai-aria

What aria role to use for a forum signature?


To improve accessibility, what role should I use for completely unrelated content such as a forum signature? Since it's completely unrelated to the main content and would frequently repeat, I thought it might even be a good idea to use aria-hidden="true" on it to make the experience of reading a forum thread with a screen reader more fluid, although according to MDN, aria-hidden "should not be used on a focusable element".


Solution

  • Based on the comments there are two things I would implement:

    Item 1 - a <footer>

    Put the signature in a <footer> element, it is the most appropriate element for if you are using <article> for each post.

    I would also suggest you put an aria-label on each footer that says something like aria-label="signature for {username}" just to make it clear to people who use a screen reader.

    Item 2 - keyboard navigation

    People who use a screen reader will be fine if you have structured the page correctly and able to skip between posts without having to always listen to a signature.

    However for keyboard users who rely on the Tab key I would recommend adding keyboard shortcuts to jump between posts so they don't have to keep tabbing past signatures.

    An easy way to do this would be to implement keyboard shortcut keys for jumping between posts. "J" and "K" are widely used keys for previous and next items.

    However I would also suggest a way to switch this feature off, just in case it interferes with a screen reader (as "k" is "next link" in most screen readers).