A number of e-learning platforms and web-based word processors offer users the ability to highlight and annotate sections of text. Currently, this functionality is not accessible to screen reader users.
Screen reader users should be able to:
- Differentiate between highlighted and non-highlighted sections.
The HTML5 <mark> tag can be used in combination with hidden text that identifies text as highlighted.
Note: The HTML5 <mark> tag is not currently registered by screen readers.
- Be made aware of where highlights start and end.
Hidden text should be inserted in the beginning as well as the end of each highlighted section.
- Highlight text.
It’s not clear what the interaction for highlighting using a screen reader would be like. Existing articles that touch on making annotations accessible (such as the Microsoft Position Paper on Annotations) discuss it from the p.o.v. of the reader, but what about screen reader users making the annotations themselves?
- Comment on highlighted sections.
Same issue as with highlighting, how can screen reader users select text and then choose an 'insert comment' option?
- Turn highlights on and off.
Could “turn on highlighting” trigger some js that adds a tabindex attribute to each mark tag so they become easily reach-able via keyboard?
- Go to a comment when there is one and return to the main text after reading it.
The HTML5 <mark> tag could be used in combination with a hidden link that becomes visible when it receives focus (similar to a Skip to Content link) that would take screen reader and keyboard users directly to the comment, and a similar ‘back to content’ link at the end of each comment.
clip: rect(0 0 0 0);
width: 1px; }
<mark><a id="highlight1" href="#comment1" class="visuallyhidden">Start of highlighting. Follow link to comment.</a>quick brown fox<a href="#comment1" class="visuallyhidden">End of highlighting</a></mark>
jumped over the lazy dog.</p>
<p>Paragraph two blah blah</p>
<p>Paragraph three blah blah</p>
<p><a id="comment1"></a>Comment by Jan: Most foxes are red. [<a href="#highlight1" aria-label="Return to highlighted text">Back</a>]</p>