Matt Fitzpatrick has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/268363

Change subject: Linker: add role="navigation" to generated table of contents
......................................................................

Linker: add role="navigation" to generated table of contents

Adds accessibility context to the automatically generated table
of contents div for a page.

Most screen readers will announce the div's role, "navigation",
meaning a collection of navigational links.

Additionally, with the navigation role, the div is a landmark
and a region. Screen readers that allow jumping between
landmarks, like NVDA, or jumping between regions, like JAWS,
will allow users to jump to and from the table of contents.

Change-Id: Ie9b291301f683d2be2cb2134f9d6ae3f7a6d831b
---
M includes/Linker.php
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/63/268363/1

diff --git a/includes/Linker.php b/includes/Linker.php
index 4b9b963..f7b2b84 100644
--- a/includes/Linker.php
+++ b/includes/Linker.php
@@ -1719,7 +1719,7 @@
        }
 
        /**
-        * Wraps the TOC in a table and provides the hide/collapse javascript.
+        * Wraps the TOC in a navigation div and provides the hide/collapse 
javascript.
         *
         * @param string $toc Html of the Table Of Contents
         * @param string|Language|bool $lang Language for the toc title, 
defaults to user language
@@ -1729,7 +1729,7 @@
                $lang = wfGetLangObj( $lang );
                $title = wfMessage( 'toc' )->inLanguage( $lang )->escaped();
 
-               return '<div id="toc" class="toc">'
+               return '<div role="navigation" id="toc" class="toc">'
                        . '<div id="toctitle"><h2>' . $title . "</h2></div>\n"
                        . $toc
                        . "</ul>\n</div>\n";

-- 
To view, visit https://gerrit.wikimedia.org/r/268363
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie9b291301f683d2be2cb2134f9d6ae3f7a6d831b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Matt Fitzpatrick <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to