From e3b29a21999f1bc915ebc4f10b84257dffa3da51 Mon Sep 17 00:00:00 2001 From: Thomas Marstrander Date: Mon, 6 Jun 2016 14:57:51 +0200 Subject: [PATCH] Accessibility - reads confirmation dialog text on show. HFJ-1992 --- js/h5p-confirmation-dialog.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/js/h5p-confirmation-dialog.js b/js/h5p-confirmation-dialog.js index c948192..9badb8e 100644 --- a/js/h5p-confirmation-dialog.js +++ b/js/h5p-confirmation-dialog.js @@ -80,6 +80,7 @@ H5P.ConfirmationDialog = (function (EventDispatcher) { // Popup text var text = document.createElement('div'); text.classList.add('h5p-confirmation-dialog-text'); + text.setAttribute('role', 'alert'); text.innerHTML = options.dialogText; body.appendChild(text); @@ -116,6 +117,7 @@ H5P.ConfirmationDialog = (function (EventDispatcher) { // Exit button var exitButton = document.createElement('button'); exitButton.classList.add('h5p-confirmation-dialog-exit'); + exitButton.title = options.cancelText; exitButton.onclick = dialogCanceled; exitButton.onkeydown = function (e) { if (e.which === 32) { // Space