$(this.fluidbook).trigger('fluidbook.splash.hide');
}, 2500);
});
+
+ $(document).on('change', "[data-menu=accessibility] .settings input", function () {
+ let userSettings = $this.getSettings();
+ userSettings[$(this).attr('name')] = $(this).is(':checked');
+ $this.saveSettings(userSettings);
+ $this.applySettings();
+ });
+ this.applySettings();
+ },
+
+ getSettings: function () {
+ return this.fluidbook.cache.get('accessibility', {'accessiblecontents': true});
+ },
+
+ saveSettings: function (settings) {
+ this.fluidbook.cache.set('accessibility', settings);
+ },
+
+ applySettings: function () {
+ let settings = this.getSettings();
+ if (settings['accessiblecontents']) {
+ $('body').removeClass('no-accessiblecontents');
+ } else {
+ $('body').addClass('no-accessiblecontents');
+ }
},
endChangePage: function (page) {
},
openMenu: function (callback) {
- let sections = [
- {
- icon: 'icon-optimized-navigation',
- title: this.fluidbook.l10n.__('Optimized navigation using both mouse and keyboard'),
- text: this.fluidbook.l10n.__('Functionalities within the Fluidbook can be accessed using both the mouse and standard keyboard shortcuts. All interactive elements (buttons, links, etc.) are accessible using the <strong>Tab key</strong> to jump from one element to the next (use <strong>Shift+Tab</strong> to jump backward). Press <strong>Enter</strong> to activate the selected element.'),
- },
- {
- icon: 'icon-listen',
- title: this.fluidbook.l10n.__('Listen to the page'),
- text: this.fluidbook.l10n.__('Click the <strong>audio icon</strong> to hear an audio version of your Fluidbook. Where an audio version isn’t yet available, you can download a transcript of the content. Alternatively, you can use the Text-to-Speech feature from your screen reader software.'),
- if: this.fluidbook.settings.audiodescription,
- },
- {
- icon: 'icon-downloadable',
- title: this.fluidbook.l10n.__('Downloadable resources'),
- text: this.fluidbook.l10n.__('When infographic resources are downloaded, they have been optimized for screen reader compatibility to support accessible offline use.'),
- }, {
- icon: 'icon-help',
- title: this.fluidbook.l10n.__('We’re here to help'),
- text: this.fluidbook.l10n.__('If this Fluidbook doesn’t meet your accessibility requirements, please let us know. We’re committed to working with you to ensure you can access the content in a way that works for you.'),
- },
- ];
- let sections_shortcuts = [
- {title: 'Navigation'},
- {title: 'Display / Sound'},
- {title: 'Pannels'},
- {title: 'Search'},
- ]
- let articles_shortcuts = [
- {
- icon: 'play-left-page-audio',
- title: this.fluidbook.l10n.__('Shift and arrow left to <strong>play the left page audiodescription</strong>'),
- section: 'Navigation',
- if: this.fluidbook.settings.audiodescription,
- },
- {
- icon: 'play-right-page-audio',
- title: this.fluidbook.l10n.__('Shift and arrow right to <strong>play the right page audiodescription</strong>'),
- section: 'Navigation',
- if: this.fluidbook.settings.audiodescription
- },
- {
- icon: 'next-page',
- title: this.fluidbook.l10n.__('Arrow right or page down for <strong>next page</strong>'),
- section: 'Navigation',
- },
- {
- icon: 'previous-page',
- title: this.fluidbook.l10n.__('Arrow left or page up for <strong>previous page</strong>'),
- section: 'Navigation',
- },
- {
- icon: 'last-page',
- title: this.fluidbook.l10n.__('End for the <strong>last page</strong>'),
- section: 'Navigation',
- },
- {
- icon: 'first-page',
- title: this.fluidbook.l10n.__('Home for the <strong>first page</strong>'),
- section: 'Navigation',
- },
- {
- icon: 'select-next-previous-interactive-item',
- title: this.fluidbook.l10n.__('Tab or Shift+Tab to <strong>select next or previous interactive item</strong>'),
- section: 'Navigation',
- },
- {
- icon: 'action-selected-item',
- title: this.fluidbook.l10n.__('Enter to <strong>action the selected item</strong>'),
- section: 'Navigation',
- },
- {
- icon: 'close-opened-item',
- title: this.fluidbook.l10n.__('Escape to <strong>close an opened item</strong>'),
- section: 'Navigation',
- },
- {
- icon: 'zoom-in',
- title: this.fluidbook.l10n.__('Control and + to <strong>Zoom in</strong>'),
- section: 'Display / Sound',
- },
- {
- icon: 'zoom-out',
- title: this.fluidbook.l10n.__('Control and - to <strong>Zoom out</strong>'),
- section: 'Display / Sound',
- },
- {
- icon: 'swith-normal-fullscreen',
- title: this.fluidbook.l10n.__('F11 to <strong>switch between Normal and Fullscreen</strong>'),
- section: 'Display / Sound',
- if: this.fluidbook.settings.fullscreen
- },
- {
- icon: 'switch-sound',
- title: this.fluidbook.l10n.__('Control and M to <strong>switch the Sound On and Off</strong>'),
- section: 'Display / Sound',
- if: this.fluidbook.settings.sound
- },
- {
- icon: 'help',
- title: this.fluidbook.l10n.__('F1 for <strong>help</strong>'),
- section: 'Pannels',
- if: this.fluidbook.settings.help
- },
- {
- icon: 'content',
- title: this.fluidbook.l10n.__('F2 for <strong>content</strong>'),
- section: 'Pannels',
- },
- {
- icon: 'overview',
- title: this.fluidbook.l10n.__('Control and O for an <strong>Overview</strong>'),
- section: 'Pannels',
- },
- {
- icon: 'print',
- title: this.fluidbook.l10n.__('Control and P to <strong>Print</strong>'),
- section: 'Pannels',
- if: this.fluidbook.settings.print
- },
- {
- icon: 'bookmarks',
- title: this.fluidbook.l10n.__('Control and B for <strong>Bookmarks</strong>'),
- section: 'Pannels',
- if: this.fluidbook.settings.bookmark
- },
- {
- icon: 'notes',
- title: this.fluidbook.l10n.__('Control and Alt and N for <strong>Notes</strong>'),
- section: 'Pannels',
- if: this.fluidbook.settings.notes
- },
- {
- icon: 'burger-menu',
- title: this.fluidbook.l10n.__('F10 to <strong>open Burger menu</strong>'),
- section: 'Pannels',
- },
- {
- icon: 'search',
- title: this.fluidbook.l10n.__('Control and F to <strong>Search</strong>'),
- section: 'Search',
- },
- {
- icon: 'next-page-result',
- title: this.fluidbook.l10n.__('F3 for <strong>next page with result</strong>'),
- section: 'Search',
- if: this.fluidbook.settings.search
- },
- ];
+ let sections = [{
+ icon: 'icon-optimized-navigation',
+ title: this.fluidbook.l10n.__('Optimized navigation using both mouse and keyboard'),
+ text: this.fluidbook.l10n.__('Functionalities within the Fluidbook can be accessed using both the mouse and standard keyboard shortcuts. All interactive elements (buttons, links, etc.) are accessible using the <strong>Tab key</strong> to jump from one element to the next (use <strong>Shift+Tab</strong> to jump backward). Press <strong>Enter</strong> to activate the selected element.'),
+ }, {
+ icon: 'icon-listen',
+ title: this.fluidbook.l10n.__('Listen to the page'),
+ text: this.fluidbook.l10n.__('Click the <strong>audio icon</strong> to hear an audio version of your Fluidbook. Where an audio version isn’t yet available, you can download a transcript of the content. Alternatively, you can use the Text-to-Speech feature from your screen reader software.'),
+ if: this.fluidbook.settings.audiodescription,
+ }, {
+ icon: 'icon-downloadable',
+ title: this.fluidbook.l10n.__('Downloadable resources'),
+ text: this.fluidbook.l10n.__('When infographic resources are downloaded, they have been optimized for screen reader compatibility to support accessible offline use.'),
+ }, {
+ icon: 'icon-help',
+ title: this.fluidbook.l10n.__('We’re here to help'),
+ text: this.fluidbook.l10n.__('If this Fluidbook doesn’t meet your accessibility requirements, please let us know. We’re committed to working with you to ensure you can access the content in a way that works for you.'),
+ },];
+ let sections_shortcuts = [{title: this.fluidbook.l10n.__('Navigation')}, {title: this.fluidbook.l10n.__('Display / Sound')}, {title: this.fluidbook.l10n.__('Panels')}, {title: this.fluidbook.l10n.__('Search')},]
+ let articles_shortcuts = [{
+ icon: 'play-left-page-audio',
+ title: this.fluidbook.l10n.__('Shift and arrow left to <strong>play the left page audiodescription</strong>'),
+ section: this.fluidbook.l10n.__('Navigation'),
+ if: this.fluidbook.settings.audiodescription,
+ }, {
+ icon: 'play-right-page-audio',
+ title: this.fluidbook.l10n.__('Shift and arrow right to <strong>play the right page audiodescription</strong>'),
+ section: this.fluidbook.l10n.__('Navigation'),
+ if: this.fluidbook.settings.audiodescription
+ }, {
+ icon: 'next-page',
+ title: this.fluidbook.l10n.__('Arrow right or page down for <strong>next page</strong>'),
+ section: this.fluidbook.l10n.__('Navigation'),
+ }, {
+ icon: 'previous-page',
+ title: this.fluidbook.l10n.__('Arrow left or page up for <strong>previous page</strong>'),
+ section: this.fluidbook.l10n.__('Navigation'),
+ }, {
+ icon: 'last-page',
+ title: this.fluidbook.l10n.__('End for the <strong>last page</strong>'),
+ section: this.fluidbook.l10n.__('Navigation'),
+ }, {
+ icon: 'first-page',
+ title: this.fluidbook.l10n.__('Home for the <strong>first page</strong>'),
+ section: this.fluidbook.l10n.__('Navigation'),
+ }, {
+ icon: 'select-next-previous-interactive-item',
+ title: this.fluidbook.l10n.__('Tab or Shift+Tab to <strong>select next or previous interactive item</strong>'),
+ section: this.fluidbook.l10n.__('Navigation'),
+ }, {
+ icon: 'action-selected-item',
+ title: this.fluidbook.l10n.__('Enter to <strong>action the selected item</strong>'),
+ section: this.fluidbook.l10n.__('Navigation'),
+ }, {
+ icon: 'close-opened-item',
+ title: this.fluidbook.l10n.__('Escape to <strong>close an opened item</strong>'),
+ section: this.fluidbook.l10n.__('Navigation'),
+ }, {
+ icon: 'zoom-in',
+ title: this.fluidbook.l10n.__('Control and + to <strong>Zoom in</strong>'),
+ section: this.fluidbook.l10n.__('Display / Sound'),
+ }, {
+ icon: 'zoom-out',
+ title: this.fluidbook.l10n.__('Control and - to <strong>Zoom out</strong>'),
+ section: this.fluidbook.l10n.__('Display / Sound'),
+ }, {
+ icon: 'swith-normal-fullscreen',
+ title: this.fluidbook.l10n.__('F11 to <strong>switch between Normal and Fullscreen</strong>'),
+ section: this.fluidbook.l10n.__('Display / Sound'),
+ if: this.fluidbook.settings.fullscreen
+ }, {
+ icon: 'switch-sound',
+ title: this.fluidbook.l10n.__('Control and M to <strong>switch the Sound On and Off</strong>'),
+ section: this.fluidbook.l10n.__('Display / Sound'),
+ if: this.fluidbook.settings.sound
+ }, {
+ icon: 'help',
+ title: this.fluidbook.l10n.__('F1 for <strong>help</strong>'),
+ section: this.fluidbook.l10n.__('Panels'),
+ if: this.fluidbook.settings.help
+ }, {
+ icon: 'content',
+ title: this.fluidbook.l10n.__('F2 for <strong>content</strong>'),
+ section: this.fluidbook.l10n.__('Panels'),
+ }, {
+ icon: 'overview',
+ title: this.fluidbook.l10n.__('Control and O for an <strong>Overview</strong>'),
+ section: this.fluidbook.l10n.__('Panels'),
+ }, {
+ icon: 'print',
+ title: this.fluidbook.l10n.__('Control and P to <strong>Print</strong>'),
+ section: this.fluidbook.l10n.__('Panels'),
+ if: this.fluidbook.settings.print
+ }, {
+ icon: 'bookmarks',
+ title: this.fluidbook.l10n.__('Control and B for <strong>Bookmarks</strong>'),
+ section: this.fluidbook.l10n.__('Panels'),
+ if: this.fluidbook.settings.bookmark
+ }, {
+ icon: 'notes',
+ title: this.fluidbook.l10n.__('Control and Alt and N for <strong>Notes</strong>'),
+ section: this.fluidbook.l10n.__('Panels'),
+ if: this.fluidbook.settings.notes
+ }, {
+ icon: 'burger-menu',
+ title: this.fluidbook.l10n.__('F10 to <strong>open Burger menu</strong>'),
+ section: this.fluidbook.l10n.__('Panels'),
+ }, {
+ icon: 'search',
+ title: this.fluidbook.l10n.__('Control and F to <strong>Search</strong>'),
+ section: this.fluidbook.l10n.__('Search'),
+ }, {
+ icon: 'next-page-result',
+ title: this.fluidbook.l10n.__('F3 for <strong>next page with result</strong>'),
+ section: this.fluidbook.l10n.__('Search'),
+ if: this.fluidbook.settings.search
+ },];
- var t = '<div class="caption "><a href="#/closeview" role="button" aria-label="Close" aria-keyshortcuts="Escape" class="button back">'+ getSpriteIcon('interface-close') +'</a></div>'
+ var t = '<div class="caption "><a href="#/closeview" role="button" aria-label="Close" aria-keyshortcuts="Escape" class="button back">' + getSpriteIcon('interface-close') + '</a></div>'
t += '<div class="content">';
t += '<header>';
t += '<h1>' + this.fluidbook.l10n.__('A user experience optimized for accessibility') + '</h1>';
t += '<p>' + this.fluidbook.l10n.__('This interactive Fluidbook has been thoughtfully designed to support accessibility and inclusivity. We are actively working towards compliance with the WCAG 2.2 accessibility standards, aiming to meet both Level A and AA criteria.') + '</p>';
t += '<p>' + this.fluidbook.l10n.__('The Fluidbook is compatible with assistive technologies such as screen readers (e.g., JAWS, NVDA), and can be navigated using either a mouse or keyboard. Users can easily adjust text and content size by clicking directly on the page or using shortcuts like :zoominshortcut and :zoomoutshortcut. Wherever possible, content is provided in multiple formats - text, video, image, transcript, and audio - to suit different needs.', false, {
- 'zoominshortcut': '<strong>[Ctrl][+]</strong>',
- 'zoomoutshortcut': '<strong>[Ctrl][-]</strong>'
+ 'zoominshortcut': '<strong>[Ctrl][+]</strong>', 'zoomoutshortcut': '<strong>[Ctrl][-]</strong>'
}) + '</p>';
t += '</header>';
+
+ let userSettings = this.getSettings();
+
+ let settings = [{
+ title: this.fluidbook.l10n.__("Accessibility"),
+ text: this.fluidbook.l10n.__("Active visual and textual aids: alternative texts, audio descriptions, explanatory tooltips."),
+ name: 'accessiblecontents',
+ icon: 'icon-accessible-contents',
+ if: true || this.fluidbook.settings.hasAccessibleLink,
+ }];
+
+ let showSettings = false;
+ $.each(settings, function (k, s) {
+ if (s.if) {
+ showSettings = true;
+ return false;
+ }
+ });
+
+ if (showSettings) {
+ t += '<section class="settings">';
+ t += '<div class="preload" aria-hidden="true"><label><article><input name="a" type="checkbox" checked /><input type="checkbox" name="b"/></article></label></div>'
+ t += '<h2>' + this.fluidbook.l10n.__('Accessibility settings') + '</h2>';
+ $.each(settings, function (k, s) {
+ if (!s.if) {
+ return;
+ }
+ t += '<label><article>';
+ t += '<img src="images/accessibility/' + s.icon + '.svg">';
+ t += '<div><h3>' + s.title + '</h3>';
+ t += '<p>' + s.text + '</p></div>';
+ t += '<input value="1" type="checkbox" name="' + s.name + '" ';
+ if (userSettings[s.name]) {
+ t += ' checked="checked"';
+ }
+ t += '/>'
+ t += '</article></label>';
+
+ });
+ t += '</section>';
+ }
+
t += '<section class="options">'
$.each(sections, function (k, section) {
- if(section.if !== false) {
+ if (section.if !== false) {
t += '<article>';
t += '<img src="images/accessibility/' + section.icon + '.svg">';
t += '<h2>' + section.title + '</h2>';
t += '</section>';
t += '<section class="shortcuts">';
- t += '<h2>List of keyboard shortcuts</h2>';
+ t += '<h2>' + this.fluidbook.l10n.__('List of keyboard shortcuts') + '</h2>';
$.each(sections_shortcuts, function (k, section) {
- t += '<h3>'+section.title+'</h3>';
+ t += '<h3>' + section.title + '</h3>';
$.each(articles_shortcuts, function (k, article) {
- if(article.section === section.title && article.if !== false) {
+ if (article.section === section.title && article.if !== false) {
t += '<article>';
t += '<img src="images/accessibility/' + article.icon + '.svg">';
t += '<p>' + article.title + '</p>';
/*! outline.js v1.2.0 - https://github.com/lindsayevans/outline.js/ */
(function (d) {
- var style_element = d.createElement('STYLE'),
- dom_events = 'addEventListener' in d,
+ var style_element = d.createElement('STYLE'), dom_events = 'addEventListener' in d,
add_event_listener = function (type, callback) {
// Basic cross-browser event handling
if (dom_events) {
} 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);