Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use navigation role for TOC #499

Merged
merged 1 commit into from Nov 9, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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