1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Merge pull request #3480 from thornbill/a11y

This commit is contained in:
Bill Thornton 2022-03-05 14:54:32 -05:00 committed by GitHub
commit 902f9259de
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 2 deletions

View file

@ -29,6 +29,7 @@ worker.addEventListener(
function drawBlurhash(target, pixels, width, height) { function drawBlurhash(target, pixels, width, height) {
const canvas = document.createElement('canvas'); const canvas = document.createElement('canvas');
canvas.setAttribute('aria-hidden', 'true');
canvas.width = width; canvas.width = width;
canvas.height = height; canvas.height = height;
const ctx = canvas.getContext('2d'); const ctx = canvas.getContext('2d');

View file

@ -1,6 +1,7 @@
import './emby-scrollbuttons.scss'; import './emby-scrollbuttons.scss';
import 'webcomponents.js/webcomponents-lite'; import 'webcomponents.js/webcomponents-lite';
import '../emby-button/paper-icon-button-light'; import '../emby-button/paper-icon-button-light';
import globalize from '../../scripts/globalize';
/* eslint-disable indent */ /* eslint-disable indent */
@ -13,8 +14,9 @@ const EmbyScrollButtonsPrototype = Object.create(HTMLDivElement.prototype);
function getScrollButtonHtml(direction) { function getScrollButtonHtml(direction) {
let html = ''; let html = '';
const icon = direction === 'left' ? 'chevron_left' : 'chevron_right'; const icon = direction === 'left' ? 'chevron_left' : 'chevron_right';
const title = direction === 'left' ? globalize.translate('Previous') : globalize.translate('Next') ;
html += '<button type="button" is="paper-icon-button-light" data-ripple="false" data-direction="' + direction + '" class="emby-scrollbuttons-button">'; html += `<button type="button" is="paper-icon-button-light" data-ripple="false" data-direction="${direction}" title="${title}" class="emby-scrollbuttons-button">`;
html += '<span class="material-icons ' + icon + '" aria-hidden="true"></span>'; html += '<span class="material-icons ' + icon + '" aria-hidden="true"></span>';
html += '</button>'; html += '</button>';

View file

@ -28,7 +28,7 @@ import Headroom from 'headroom.js';
html += '<button type="button" is="paper-icon-button-light" class="headerButton headerButtonLeft headerBackButton hide"><span class="material-icons ' + (browser.safari ? 'chevron_left' : 'arrow_back') + '" aria-hidden="true"></span></button>'; html += '<button type="button" is="paper-icon-button-light" class="headerButton headerButtonLeft headerBackButton hide"><span class="material-icons ' + (browser.safari ? 'chevron_left' : 'arrow_back') + '" aria-hidden="true"></span></button>';
html += '<button type="button" is="paper-icon-button-light" class="headerButton headerHomeButton hide barsMenuButton headerButtonLeft"><span class="material-icons home" aria-hidden="true"></span></button>'; html += '<button type="button" is="paper-icon-button-light" class="headerButton headerHomeButton hide barsMenuButton headerButtonLeft"><span class="material-icons home" aria-hidden="true"></span></button>';
html += '<button type="button" is="paper-icon-button-light" class="headerButton mainDrawerButton barsMenuButton headerButtonLeft hide"><span class="material-icons menu" aria-hidden="true"></span></button>'; html += '<button type="button" is="paper-icon-button-light" class="headerButton mainDrawerButton barsMenuButton headerButtonLeft hide"><span class="material-icons menu" aria-hidden="true"></span></button>';
html += '<h3 class="pageTitle"></h3>'; html += '<h3 class="pageTitle" aria-hidden="true"></h3>';
html += '</div>'; html += '</div>';
html += '<div class="headerRight">'; html += '<div class="headerRight">';
html += '<button is="paper-icon-button-light" class="headerSyncButton syncButton headerButton headerButtonRight hide"><span class="material-icons groups" aria-hidden="true"></span></button>'; html += '<button is="paper-icon-button-light" class="headerSyncButton syncButton headerButton headerButtonRight hide"><span class="material-icons groups" aria-hidden="true"></span></button>';