From: soufiane Date: Mon, 22 Dec 2025 10:34:37 +0000 (+0100) Subject: wip #7779 @8:00 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=7afef164648bd65cf0526619dfdbd518653bac07;p=fluidbook-html5.git wip #7779 @8:00 --- diff --git a/images/accessibility/action-selected-item.svg b/images/accessibility/action-selected-item.svg new file mode 100644 index 00000000..09a5120a --- /dev/null +++ b/images/accessibility/action-selected-item.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/images/accessibility/bookmarks.svg b/images/accessibility/bookmarks.svg new file mode 100644 index 00000000..9c174d92 --- /dev/null +++ b/images/accessibility/bookmarks.svg @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/images/accessibility/burger-menu.svg b/images/accessibility/burger-menu.svg new file mode 100644 index 00000000..1cde0a2a --- /dev/null +++ b/images/accessibility/burger-menu.svg @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/images/accessibility/close-opened-item.svg b/images/accessibility/close-opened-item.svg new file mode 100644 index 00000000..3bb85bca --- /dev/null +++ b/images/accessibility/close-opened-item.svg @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/images/accessibility/content.svg b/images/accessibility/content.svg new file mode 100644 index 00000000..d0f0f4c0 --- /dev/null +++ b/images/accessibility/content.svg @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/images/accessibility/first-page.svg b/images/accessibility/first-page.svg new file mode 100644 index 00000000..65f5d84f --- /dev/null +++ b/images/accessibility/first-page.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/images/accessibility/help.svg b/images/accessibility/help.svg new file mode 100644 index 00000000..214f0602 --- /dev/null +++ b/images/accessibility/help.svg @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/images/accessibility/icon-downloadable.svg b/images/accessibility/icon-downloadable.svg new file mode 100644 index 00000000..6f43da66 --- /dev/null +++ b/images/accessibility/icon-downloadable.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/images/accessibility/icon-help.svg b/images/accessibility/icon-help.svg new file mode 100644 index 00000000..8b2940a0 --- /dev/null +++ b/images/accessibility/icon-help.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/images/accessibility/icon-listen.svg b/images/accessibility/icon-listen.svg new file mode 100644 index 00000000..703cbf3f --- /dev/null +++ b/images/accessibility/icon-listen.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/images/accessibility/icon-optimized-navigation.svg b/images/accessibility/icon-optimized-navigation.svg new file mode 100644 index 00000000..7b40e235 --- /dev/null +++ b/images/accessibility/icon-optimized-navigation.svg @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/images/accessibility/last-page.svg b/images/accessibility/last-page.svg new file mode 100644 index 00000000..4b89ed79 --- /dev/null +++ b/images/accessibility/last-page.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/images/accessibility/next-page-result.svg b/images/accessibility/next-page-result.svg new file mode 100644 index 00000000..be0cc2d1 --- /dev/null +++ b/images/accessibility/next-page-result.svg @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/images/accessibility/next-page.svg b/images/accessibility/next-page.svg new file mode 100644 index 00000000..9967f55a --- /dev/null +++ b/images/accessibility/next-page.svg @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/images/accessibility/notes.svg b/images/accessibility/notes.svg new file mode 100644 index 00000000..15c1ed21 --- /dev/null +++ b/images/accessibility/notes.svg @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/images/accessibility/overview.svg b/images/accessibility/overview.svg new file mode 100644 index 00000000..aeaa8a53 --- /dev/null +++ b/images/accessibility/overview.svg @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/images/accessibility/play-left-page-audio.svg b/images/accessibility/play-left-page-audio.svg new file mode 100644 index 00000000..60f01440 --- /dev/null +++ b/images/accessibility/play-left-page-audio.svg @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/images/accessibility/play-right-page-audio.svg b/images/accessibility/play-right-page-audio.svg new file mode 100644 index 00000000..3b60da8c --- /dev/null +++ b/images/accessibility/play-right-page-audio.svg @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/images/accessibility/previous-page.svg b/images/accessibility/previous-page.svg new file mode 100644 index 00000000..053a1803 --- /dev/null +++ b/images/accessibility/previous-page.svg @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/images/accessibility/print.svg b/images/accessibility/print.svg new file mode 100644 index 00000000..bb8d7484 --- /dev/null +++ b/images/accessibility/print.svg @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/images/accessibility/search.svg b/images/accessibility/search.svg new file mode 100644 index 00000000..1a2e24b8 --- /dev/null +++ b/images/accessibility/search.svg @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/images/accessibility/select-next-previous-interactive-item.svg b/images/accessibility/select-next-previous-interactive-item.svg new file mode 100644 index 00000000..9695a0d0 --- /dev/null +++ b/images/accessibility/select-next-previous-interactive-item.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/images/accessibility/switch-sound.svg b/images/accessibility/switch-sound.svg new file mode 100644 index 00000000..c9876a34 --- /dev/null +++ b/images/accessibility/switch-sound.svg @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/images/accessibility/swith-normal-fullscreen.svg b/images/accessibility/swith-normal-fullscreen.svg new file mode 100644 index 00000000..d63a995a --- /dev/null +++ b/images/accessibility/swith-normal-fullscreen.svg @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/images/accessibility/zoom-in.svg b/images/accessibility/zoom-in.svg new file mode 100644 index 00000000..9397757f --- /dev/null +++ b/images/accessibility/zoom-in.svg @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/images/accessibility/zoom-out.svg b/images/accessibility/zoom-out.svg new file mode 100644 index 00000000..2f514d01 --- /dev/null +++ b/images/accessibility/zoom-out.svg @@ -0,0 +1,9 @@ + + + + + + + Ctrl + - + + diff --git a/js/libs/fluidbook/fluidbook.accessibility.js b/js/libs/fluidbook/fluidbook.accessibility.js index 78f0c3a4..d604a84b 100644 --- a/js/libs/fluidbook/fluidbook.accessibility.js +++ b/js/libs/fluidbook/fluidbook.accessibility.js @@ -47,49 +47,192 @@ FluidbookAccessibility.prototype = { }, openMenu: function (callback) { - var t = '
'; - t += '
'; - t += '

' + this.fluidbook.l10n.__('A user experience optimized for accessibility') + '

'; - t += '

' + 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.') + '

'; - t += '

' + 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': '[Ctrl][+]', - 'zoomoutshortcut': '[Ctrl][-]' - }) + '

'; - t += '
'; - t += '
' - - let sections = [ { - icon: 'keyboard', + 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 Tab key to jump from one element to the next (use Shift+Tab to jump backward). Press Enter to activate the selected element.'), }, { - icon: 'audiodescription', + icon: 'icon-listen', title: this.fluidbook.l10n.__('Listen to the page'), text: this.fluidbook.l10n.__('Click the audio icon 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', + 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: 'help', + 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 play the left page audiodescription'), + section: 'Navigation', + if: this.fluidbook.settings.audiodescription, + }, + { + icon: 'play-right-page-audio', + title: this.fluidbook.l10n.__('Shift and arrow right to play the right page audiodescription'), + section: 'Navigation', + }, + { + icon: 'next-page', + title: this.fluidbook.l10n.__('Arrow right or page down for next page'), + section: 'Navigation', + }, + { + icon: 'previous-page', + title: this.fluidbook.l10n.__('Arrow left or page up for previous page'), + section: 'Navigation', + }, + { + icon: 'last-page', + title: this.fluidbook.l10n.__('End for the last page'), + section: 'Navigation', + }, + { + icon: 'first-page', + title: this.fluidbook.l10n.__('Home for the first page'), + section: 'Navigation', + }, + { + icon: 'select-next-previous-interactive-item', + title: this.fluidbook.l10n.__('Tab or Shift+Tab to select next or previous interactive item'), + section: 'Navigation', + }, + { + icon: 'action-selected-item', + title: this.fluidbook.l10n.__('Enter to action the selected item'), + section: 'Navigation', + }, + { + icon: 'close-opened-item', + title: this.fluidbook.l10n.__('Escape to close an opened item'), + section: 'Navigation', + }, + { + icon: 'zoom-in', + title: this.fluidbook.l10n.__('Control and + to Zoom in'), + section: 'Display / Sound', + }, + { + icon: 'zoom-out', + title: this.fluidbook.l10n.__('Control and - to Zoom out'), + section: 'Display / Sound', + }, + { + icon: 'swith-normal-fullscreen', + title: this.fluidbook.l10n.__('F11 to switch between Normal and Fullscreen'), + section: 'Display / Sound', + if: this.fluidbook.settings.fullscreen + }, + { + icon: 'switch-sound', + title: this.fluidbook.l10n.__('Control and M to switch the Sound On and Off'), + section: 'Display / Sound', + if: this.fluidbook.settings.sound + }, + { + icon: 'help', + title: this.fluidbook.l10n.__('F1 for help'), + section: 'Pannels', + if: this.fluidbook.settings.help + }, + { + icon: 'content', + title: this.fluidbook.l10n.__('F2 for content'), + section: 'Pannels', + }, + { + icon: 'overview', + title: this.fluidbook.l10n.__('Control and O for an Overview'), + section: 'Pannels', + }, + { + icon: 'print', + title: this.fluidbook.l10n.__('Control and P to Print'), + section: 'Pannels', + if: this.fluidbook.settings.print + }, + { + icon: 'bookmarks', + title: this.fluidbook.l10n.__('Control and B for Bookmarks'), + section: 'Pannels', + if: this.fluidbook.settings.bookmark + }, + { + icon: 'notes', + title: this.fluidbook.l10n.__('Control and Alt and N for Notes'), + section: 'Pannels', + if: this.fluidbook.settings.notes + }, + { + icon: 'burger-menu', + title: this.fluidbook.l10n.__('F10 to open Burger menu'), + section: 'Pannels', + }, + { + icon: 'search', + title: this.fluidbook.l10n.__('Control and F to Search'), + section: 'Search', + }, + { + icon: 'next-page-result', + title: this.fluidbook.l10n.__('F3 for next page with result'), + section: 'Search', + if: this.fluidbook.settings.search + }, + ]; + + var t = '
'; + t += '
'; + t += '

' + this.fluidbook.l10n.__('A user experience optimized for accessibility') + '

'; + t += '

' + 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.') + '

'; + t += '

' + 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': '[Ctrl][+]', + 'zoomoutshortcut': '[Ctrl][-]' + }) + '

'; + t += '
'; + t += '
' + $.each(sections, function (k, section) { - t += '
'; - t += ''; - t += '

' + section.title + '

'; - t += '

' + section.text + '

'; - t += '

'; + if(section.if !== false) { + t += '
'; + t += ''; + t += '

' + section.title + '

'; + t += '

' + section.text + '

'; + t += '
'; + } + }); + + t += '
'; + t += '
'; + t += '

List of keyboard shortcuts

'; + + $.each(sections_shortcuts, function (k, section) { + t += '

'+section.title+'

'; + $.each(articles_shortcuts, function (k, article) { + if(article.section === section.title && article.if !== false) { + t += '
'; + t += ''; + t += '

' + article.title + '

'; + t += '
'; + } + }); }); - t += ''; t += '
'; t += '
'; this.fluidbook.menu.viewWrap(t, 'accessibility'); diff --git a/style/accessibility.less b/style/accessibility.less index 9e6ba232..c3d8f467 100644 --- a/style/accessibility.less +++ b/style/accessibility.less @@ -1,3 +1,6 @@ +@import "book-variables"; +@import "variables"; + .visually-hidden, #accessible-contents { clip-path: inset(100%); clip: rect(1px, 1px, 1px, 1px); @@ -18,7 +21,7 @@ border: 0; position: absolute; cursor: pointer; - transform-origin: 0% 0; + transform-origin: 0 0; .mobilefirst & { z-index: 21; @@ -68,20 +71,55 @@ .mview[data-menu="accessibility"] { + @media (max-width: 1023px) { + width: calc(100% - 38px) !important; + min-width: auto !important; + left: 50% !important; + transform: translateX(-50%) !important; + } .content { background-color: #fff; color: #000; text-align: left; padding: 65px; + @media @small { + padding: 35px; + } + + section { + border-top: 2px solid; + padding-top: 70px; + margin-top: 70px; + + &.shortcuts { + img { + height: 38px; + } + + article { + margin-bottom: 20px; + } + } + } header { height: auto !important; + h1 { font-size: 80px; font-weight: 600; letter-spacing: -4px; line-height: 1; margin-bottom: 64px; + + @media @small { + font-size: 60px; + word-break: break-word; + } + } + + p:not(:last-child) { + margin-bottom: 30px; } } @@ -89,13 +127,52 @@ font-size: 20px; line-height: 30px; letter-spacing: -0.5px; - margin: 32px 0; } h2{ font-size: 32px; font-weight: 700; line-height: 38px; + margin-bottom: 20px; + } + + h3{ + font-weight: 700; + margin: 0 0 20px; + } + + strong { + font-weight: 700; + } + + article{ + margin-bottom: 30px; + &:after{ + content: " "; + clear: both; + display: block; + } + + img { + float: left; + max-height: 100px; + @media (max-width: 1023px) { + float: none; + margin-bottom: 20px; + } + } + + p,h2 { + margin-left: 200px; + @media (max-width: 1023px) { + margin-left: 0; + } + &:before { + content: " "; + clear: both; + display: inline-flex; + } + } } } } \ No newline at end of file diff --git a/style/cart/bastide.less b/style/cart/bastide.less index 2aba15bb..666718e7 100644 --- a/style/cart/bastide.less +++ b/style/cart/bastide.less @@ -198,7 +198,7 @@ } - input[type=email], input[type=number], input[type=text], select, textarea { + input[type=email], input[type=number], input[type=text], input[type=password], select, textarea { -webkit-appearance: none; appearance: none; border: 2px solid; @@ -397,5 +397,4 @@ max-width: 50ch; margin: 2em auto 0; } - }