},
openMenu: function (callback) {
- var t = '<div class="content"></div>';
+ var 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': '[Ctrl][-]'
+ }) + '</p>';
+ t += '</header>';
+ t += '<section>'
+
+
+ let sections = [
+ {
+ icon: 'keyboard',
+ 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: 'audiodescription',
+ 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: 'resources',
+ 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: '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.'),
+ },
+ ];
+ $.each(sections, function (k, section) {
+ t += '<article>';
+ t += '<img src="images/accessibility/' + section.icon + '.svg">';
+ t += '<h2>' + section.title + '</h2>';
+ t += '<p>' + section.text + '<p/>';
+ t += '</article>';
+ });
+
+ t += '</article>';
+ t += '</section>';
+ t += '</div>';
this.fluidbook.menu.viewWrap(t, 'accessibility');
if (callback != undefined) {
callback();
translate: function (str, markupIfNonAvailable) {
return this.__(str, markupIfNonAvailable);
},
- __: function (str, markupIfNonAvailable) {
+
+ __: function (str, markupIfNonAvailable, replace) {
if (str === undefined) {
return;
}
str = str.substring(1);
}
+ let res;
if (this.translations[str] == undefined || this.translations[str] == null || this.translations[str] == '') {
if (markupIfNonAvailable == undefined || !markupIfNonAvailable) {
- return str;
+ res = str;
} else {
- return '~ ' + str + ' ~';
+ res = '~ ' + str + ' ~';
}
+ } else {
+ res = this.translations[str];
}
- return this.translations[str];
+ if (replace) {
+ $.each(replace, function (k, v) {
+ res = res.replaceAll(':' + k, v);
+ });
+ }
+ return res;
}
};