Page MenuHomePhabricator

Make TOC better accessible
Closed, DuplicatePublic

Description

On both desktop and mobile TOC should be equipped with:

role="navigation"

TOC will be brought to immediate attention of blind users. Screenreaders are supposed to offer in first place, after alerts, the navigation elements pointing to related other pages and the major navigation within the page.

See navigation@WAI-ARIA.

A similar concept is <nav> in Grouping content@HTML. The role="navigation" attribute is telling the screenreader that this <div> element is playing the same role.

<div id="toc" class="toc" role="navigation">

This is a follow-up of T26659 from 2010/2016.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJan 29 2020, 10:52 AM
TheDJ added a subscriber: TheDJ.Jan 29 2020, 12:15 PM

(+) Some Screenreaders do generate a TOC already from document headlines in the same way as MW does.

However, even those will benefit from labelling our TOC as navigation element rather than new and independent content. Furthermore it might be cut from text flow and section sequence.