Skip to content

Commit

Permalink
Merge pull request #499 from w3c/fix_aria_role_for_toc
Browse files Browse the repository at this point in the history
Use navigation role for TOC
  • Loading branch information
plehegar committed Nov 9, 2015
2 parents 16d7173 + bd47382 commit 6bb9146
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion js/w3c/aria.js
Expand Up @@ -17,7 +17,7 @@ define(
// ensure toc is labelled
var toc = $('section#toc', doc)
.find("ul:first");
toc.attr('role', 'directory') ;
toc.attr('role', 'navigation') ;
if (!toc.attr("id")) {
toc.attr('id', 'respecContents') ;
}
Expand Down
2 changes: 1 addition & 1 deletion tests/spec/core/structure-spec.js
Expand Up @@ -26,7 +26,7 @@ describe("Core - Structure", function () {
expect($toc.find("h2").text()).toEqual("Table of Contents");
expect($toc.find("h2 span").attr('resource')).toEqual('xhv:heading');
expect($toc.find("h2 span").attr('property')).toEqual('xhv:role');
expect($toc.find("ul:first").attr('role')).toEqual('directory');
expect($toc.find("ul:first").attr('role')).toEqual('navigation');
expect($toc.find("> ul > li").length).toEqual(3);
expect($toc.find("li").length).toEqual(15);
expect($toc.find("> ul > li a").first().text()).toEqual("1. ONE");
Expand Down

0 comments on commit 6bb9146

Please sign in to comment.