From 501215e868dafaf5708e5d802ba960d889023ee9 Mon Sep 17 00:00:00 2001
From: otrok7 <50595291+otrok7@users.noreply.github.com>
Date: Mon, 8 Apr 2024 23:30:28 +0200
Subject: [PATCH 1/3] accessibility
---
croutonjs/meetingMap/js/meeting_map.js | 9 +++++++++
croutonjs/src/js/crouton-default-templates.js | 6 +++---
2 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/croutonjs/meetingMap/js/meeting_map.js b/croutonjs/meetingMap/js/meeting_map.js
index bdfd3cb..9233a69 100644
--- a/croutonjs/meetingMap/js/meeting_map.js
+++ b/croutonjs/meetingMap/js/meeting_map.js
@@ -297,6 +297,7 @@ function MeetingMap(inConfig) {
var g_suspendedFullscreen = false;
function closeModalWindow(modal) {
gDelegate.modalOff();
+ activeModal = null;
if (!modal.classList.contains("modal"))
return closeModalWindow(modal.parentNode);
modal.style.display = "none";
@@ -307,12 +308,20 @@ function MeetingMap(inConfig) {
}
}
}
+ var activeModal = null;
+ document.addEventListener("keydown", function(event) {
+ if (activeModal && event.key == "Escape") {
+ closeModalWindow(activeModal);
+ }
+ }, true);
function openModalWindow(modal) {
if (isFullscreen()) {
g_suspendedFullscreen = true;
toggleFullscreen();
}
modal.style.display = "block";
+ modal.focus();
+ activeModal = modal;
dd = document.getElementById("map-menu-dropdown");
if (dd) dd.style.display = "none";
gDelegate.modalOn();
diff --git a/croutonjs/src/js/crouton-default-templates.js b/croutonjs/src/js/crouton-default-templates.js
index d6fadc8..e3d9618 100644
--- a/croutonjs/src/js/crouton-default-templates.js
+++ b/croutonjs/src/js/crouton-default-templates.js
@@ -36,7 +36,7 @@ var croutonDefaultTemplates = {
"{{#isNotTemporarilyClosed this}}",
" {{#unless (hasFormats 'VM' this)}}",
"
",
- "
",
+ " ",
" ",
" {{getWord 'meeting details'}}",
" ",
@@ -66,10 +66,10 @@ var croutonDefaultTemplates = {
"{{/if}}"
].join('\n'),
meeting_modal_template: [
- "
{{this.meeting_name}}",
+ "
{{this.meeting_name}}",
].join('\n'),
meetingpage_frame_template: `
-
+
{{getWord "Meeting Details"}}×
From f53c64fe8917db3ade968088830f99c1575da25c Mon Sep 17 00:00:00 2001
From: otrok7 <50595291+otrok7@users.noreply.github.com>
Date: Tue, 9 Apr 2024 10:24:05 +0200
Subject: [PATCH 2/3] Version bump
---
crouton.php | 2 +-
readme.txt | 3 +++
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/crouton.php b/crouton.php
index fd69548..973a9c5 100644
--- a/crouton.php
+++ b/crouton.php
@@ -5,7 +5,7 @@
Description: A tabbed based display for showing meeting information.
Author: bmlt-enabled
Author URI: https://bmlt.app
-Version: 3.18.10
+Version: 3.18.11
*/
/* Disallow direct access to the plugin file */
if (basename($_SERVER['PHP_SELF']) == basename(__FILE__)) {
diff --git a/readme.txt b/readme.txt
index 28733ee..3b6b5ae 100644
--- a/readme.txt
+++ b/readme.txt
@@ -36,6 +36,9 @@ https://demo.bmlt.app/crouton
== Changelog ==
+= 3.18.11 =
+* Improve accessibility
+
= 3.18.10 =
* Move QR code generation to a different service.
* Arabic Translation
From d658bd5b09c56dec9432646be025f4865dcf0883 Mon Sep 17 00:00:00 2001
From: otrok7 <50595291+otrok7@users.noreply.github.com>
Date: Tue, 9 Apr 2024 10:33:09 +0200
Subject: [PATCH 3/3] add tabindex to close button
---
croutonjs/src/js/crouton-default-templates.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/croutonjs/src/js/crouton-default-templates.js b/croutonjs/src/js/crouton-default-templates.js
index e3d9618..1311477 100644
--- a/croutonjs/src/js/crouton-default-templates.js
+++ b/croutonjs/src/js/crouton-default-templates.js
@@ -85,9 +85,9 @@ var croutonDefaultTemplates = {
`,