<!-- $script -->
<!-- $ga -->
</head>
-<body data-branch="master">
+<body data-branch="master" aria-hidden="true">
<!--googleoff: all-->
<!-- $beginbody -->
<div style="display:none;" id="svg-container" aria-hidden="true"><!-- $svg --></div>
</div>
</div>
</div>
- <header>
- <nav id="horizontalNav"></nav>
- <nav id="menu"></nav>
+ <header role="banner">
+ <nav id="horizontalNav" aria-label="Global"></nav>
+ <nav id="menu" aria-hidden="true"></nav>
<div id="search"></div>
<a id="logo" href="#" aria-hidden="true"></a>
</header>
<canvas width="1024" height="1024"></canvas>
</div>
<main id="fluidbook">
- <div id="accessible-contents"></div>
+ <div id="accessible-contents" aria-live="polite"></div>
<div id="edges" aria-hidden="true">
<div class="edge left">
<div class="top"></div>
$(this.fluidbook).on('fluidbook.page.change.end', function (e, data) {
$this.endChangePage(data);
});
+ $(this.fluidbook).on('fluidbook.splash.hide', function () {
+ $("body").attr('aria-hidden', 'false');
+ setTimeout(function () {
+ $(this.fluidbook).trigger('fluidbook.splash.hide');
+ }, 2500);
+ });
},
endChangePage: function (page) {
};
/*! outline.js v1.2.0 - https://github.com/lindsayevans/outline.js/ */
-(function(d){
+(function (d) {
var style_element = d.createElement('STYLE'),
dom_events = 'addEventListener' in d,
- add_event_listener = function(type, callback){
+ add_event_listener = function (type, callback) {
// Basic cross-browser event handling
- if(dom_events){
+ if (dom_events) {
d.addEventListener(type, callback);
- }else{
+ } else {
d.attachEvent('on' + type, callback);
}
},
- set_css = function(css_text){
+ set_css = function (css_text) {
// Handle setting of <style> element contents in IE8
!!style_element.styleSheet ? style_element.styleSheet.cssText = css_text : style_element.innerHTML = css_text;
}
d.getElementsByTagName('HEAD')[0].appendChild(style_element);
// Using mousedown instead of mouseover, so that previously focused elements don't lose focus ring on mouse move
- add_event_listener('mousedown', function(){
+ add_event_listener('mousedown', function () {
set_css(':focus{outline:0}::-moz-focus-inner{border:0;}');
});
- add_event_listener('keydown', function(){
+ add_event_listener('keydown', function () {
set_css('');
});
var res = '';
if ($('html').hasClass('ltr')) {
res += '<div id="prev-arrows">';
- res += this.fluidbook.nav.getLink('interface-prev', '#', 'previous', '', labels.previous, 'arrow-top', true, '', 'ArrowLeft');
+ res += this.fluidbook.nav.getLink('interface-prev', '#', 'previous', '', labels.previous, 'arrow-top', true, '', 'PageUp');
res += this.fluidbook.nav.getLink('interface-first', '#', 'first', '', labels.first, 'arrow-bottom', true, '', 'Home');
res += '</div>';
res += '<div id="next-arrows">';
- res += this.fluidbook.nav.getLink('interface-next', '#', 'next', '', labels.next, 'arrow-top', true, '', 'ArrowRight');
+ res += this.fluidbook.nav.getLink('interface-next', '#', 'next', '', labels.next, 'arrow-top', true, '', 'PageDown');
res += this.fluidbook.nav.getLink('interface-last', '#', 'last', '', labels.last, 'arrow-bottom', true, '', 'End');
res += '</div>';
} else {
res += '<div id="next-arrows">';
- res += this.fluidbook.nav.getLink('interface-next', '#', 'previous', '', labels.previous, 'arrow-top', true, '', 'ArrowRight');
+ res += this.fluidbook.nav.getLink('interface-next', '#', 'previous', '', labels.previous, 'arrow-top', true, '', 'PageUp');
res += this.fluidbook.nav.getLink('interface-last', '#', 'first', '', labels.first, 'arrow-bottom', true, '', 'Home');
res += '</div>';
res += '<div id="prev-arrows">';
- res += this.fluidbook.nav.getLink('interface-prev', '#', 'next', '', labels.next, 'arrow-top', true, '', 'ArrowLeft');
+ res += this.fluidbook.nav.getLink('interface-prev', '#', 'next', '', labels.next, 'arrow-top', true, '', 'PageDown');
res += this.fluidbook.nav.getLink('interface-first', '#', 'last', '', labels.last, 'arrow-bottom', true, '', 'End');
res += '</div>';
}
var visibility = this.getButtonsVisibility(page);
if (visibility.next) {
- $("#next-arrows").removeClass('hidden');
+ this.showArrows("#next-arrows");
} else {
- $("#next-arrows").addClass('hidden');
+ this.hideArrows("#next-arrows");
}
if (visibility.previous) {
- $("#prev-arrows").removeClass('hidden');
+ this.showArrows("#prev-arrows");
} else {
- $("#prev-arrows").addClass('hidden');
+ this.hideArrows("#prev-arrows");
}
},
+
+ hideArrows: function (id) {
+ $(id).addClass('hidden').attr('aria-hidden', 'true');
+ $(id).find('a').attr('tabindex', '-1');
+ },
+
+ showArrows: function (id) {
+ $(id).removeClass('hidden').attr('aria-hidden', 'false');
+ $(id).find('a').attr('tabindex', null);
+ },
+
updateShadows: function (page, animationDuration) {
if (animationDuration === undefined) {
animationDuration = 0;
if ($this.fluidbook.zoom.zoom === 1) {
return;
}
- console.log(handler.key);
+
$this.fluidbook.zoom.move(handler.key);
e.preventDefault();
}, false, false);
initInterfaceShortcuts: function () {
var $this = this;
- this.keyShortcut('left,right,home,end', function (e, handler) {
+ this.keyShortcut('pageup,pagedown,home,end', function (e, handler) {
if ($this.fluidbook.zoom.zoom > 1) {
return;
}
- if (handler.key === 'left' || handler.key === 'right') {
+ if (handler.key === 'pageup' || handler.key === 'pagedown') {
var dir = 'Next';
- if (handler.key === 'left' && this.fluidbook.l10n.ltr || handler.key === 'right' && this.fluidbook.l10n.rtl) {
+ if (handler.key === 'pageup') {
dir = 'Previous';
}
var func = 'go' + dir;
}
#next-arrows.hidden, #prev-arrows.hidden {
- display: none;
opacity: 0;
cursor: default;
pointer-events: none;