}
// Only the Menu should have titles + the locales icon in the horizontal menu
- if (navType === 'menu' || id === 'locales') {
+ if (navType === 'menu' || id === 'locales' || id === 'accessibility') {
if (title !== undefined && title !== '') {
res += ' <span class="menu-item-title">' + this.fluidbook.l10n.__(title) + '</span>';
}
// All possible icons and default ordering
- var all = ["extra", "index", "chapters", "search", "friend", "print", "pdf", 'notes', "bookmark", "archives", "basket", "fullscreen", "sound", "3d", "help", "lang", "extra1", "extra2", "extra3", "extra4", "extra5",];
+ var all = ["extra", "index", "chapters", "search", "friend", "print", "pdf", 'notes', "bookmark", "archives", "basket", "fullscreen", "sound", "3d", "help", "extra1", "extra2", "extra3", "extra4", "extra5", "lang", 'accessibility'];
// Fallback to default list if navOrder is still empty for some reason
if (navOrder.length === 0) {
navOrder = all;
}
- // If the locales icon is included, it should always be placed last in the list for formatting reasons
- var localeIconIndex;
+ // If the locales or accessibility icon is included, it should always be placed last in the list for formatting reasons
+ let localeIconIndex, a11yIconIndex;
if ((localeIconIndex = navOrder.indexOf('lang')) !== -1) {
navOrder.push(navOrder.splice(localeIconIndex, 1)[0]); // Push to end of array
}
+ if ((a11yIconIndex = navOrder.indexOf('accessibility')) !== -1) {
+ navOrder.push(navOrder.splice(a11yIconIndex, 1)[0]);
+ }
var hide = array_diff(all, navOrder);
var thisall = navOrder.concat(hide);
} else if (icon === 'lang' && this.fluidbook.l10n.multilangEnabled) {
// Note: the "!" at the beginning of the title/help parameters means that we don't want these strings translated
link = this.addLink(navType, 'nav-locales', '#/locales', 'locales', '!' + this.fluidbook.l10n.getCurrentLanguageName(), '!Select Language', 'Control+L');
+ } else if (icon === 'accessibility' && this.fluidbook.settings.accessibility_menu) {
+ link = this.addLink(navType, 'nav-accessibility', '#/accessibility', 'accessibility', 'accessibility', 'accessibility', 'Ctrl+Alt+A');
} else if (icon === 'archives' && this.fluidbook.settings.externalArchives) {
link = this.addLink(navType, 'nav-archives', '#/archives', 'archives', '!' + this.fluidbook.settings.archivesLabel, '!' + this.fluidbook.settings.archivesLabel, '');
} else if (icon === 'help' && this.fluidbook.settings.help) {