From e10594fb495d3c525a6ba5f9a55223fb9572c17c Mon Sep 17 00:00:00 2001 From: Thomas Marstrander Date: Thu, 9 Jun 2016 11:26:11 +0200 Subject: [PATCH] Hide redundant confirmation dialog exit button for assistive technologies. HFJ-2004 --- js/h5p-confirmation-dialog.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/js/h5p-confirmation-dialog.js b/js/h5p-confirmation-dialog.js index ab551dd..b6ff15f 100644 --- a/js/h5p-confirmation-dialog.js +++ b/js/h5p-confirmation-dialog.js @@ -120,6 +120,7 @@ H5P.ConfirmationDialog = (function (EventDispatcher) { // Exit button var exitButton = document.createElement('button'); exitButton.classList.add('h5p-confirmation-dialog-exit'); + exitButton.setAttribute('aria-hidden', 'true'); exitButton.title = options.cancelText; // Cancel handler @@ -167,7 +168,7 @@ H5P.ConfirmationDialog = (function (EventDispatcher) { // Element with focus before dialog var previouslyFocused; - + /** * Set parent of confirmation dialog * @param {HTMLElement} wrapper @@ -191,7 +192,7 @@ H5P.ConfirmationDialog = (function (EventDispatcher) { /** * Hide siblings of element from assistive technology - * + * * @param {HTMLElement} element * @returns {Array} The previous hidden state of all siblings */ @@ -213,7 +214,7 @@ H5P.ConfirmationDialog = (function (EventDispatcher) { /** * Restores assistive technology state of element's siblings - * + * * @param {HTMLElement} element * @param {Array} hiddenSiblings Hidden state of all siblings */