Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

accessibility #475

Merged
merged 3 commits into from
Apr 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion crouton.php
Original file line number Diff line number Diff line change
Expand Up @@ -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__)) {
Expand Down
9 changes: 9 additions & 0 deletions croutonjs/meetingMap/js/meeting_map.js
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand All @@ -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();
Expand Down
10 changes: 5 additions & 5 deletions croutonjs/src/js/crouton-default-templates.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ var croutonDefaultTemplates = {
"{{#isNotTemporarilyClosed this}}",
" {{#unless (hasFormats 'VM' this)}}",
" <div>",
" <a onclick='crouton.meetingModal({{this.id_bigint}})' id='map-button' class='btn btn-primary btn-xs'>",
" <a onclick='crouton.meetingModal({{this.id_bigint}})' tabindex='0' href='#' id='map-button' class='btn btn-primary btn-xs'>",
" <span class='glyphicon glyphicon-search' aria-hidden='true'></span>",
" {{getWord 'meeting details'}}",
" </a>",
Expand Down Expand Up @@ -66,10 +66,10 @@ var croutonDefaultTemplates = {
"{{/if}}"
].join('\n'),
meeting_modal_template: [
"<a onclick='crouton.meetingModal({{this.id_bigint}})'><span class='glyphicon glyphicon-search' aria-hidden='true'></span>{{this.meeting_name}}</a>",
"<a tabindex='0' href='#' onclick='crouton.meetingModal({{this.id_bigint}})'><span class='glyphicon glyphicon-search' aria-hidden='true'></span>{{this.meeting_name}}</a>",
].join('\n'),
meetingpage_frame_template: `
<div id="meeting_modal" class="modal bootstrap-bmlt" style="display: none;">
<div id="meeting_modal" class="modal bootstrap-bmlt" style="display: none;" tabindex="-1" >
<div class="modal-content">
<span class="modal-title">{{getWord "Meeting Details"}}</span><span id="close_meeting_details" class="modal-close">×</span>
<table id="meeting-details-table" class="bmlt-table table table-striped table-hover table-bordered tablesaw tablesaw-stack meeting-details">
Expand All @@ -85,9 +85,9 @@ var croutonDefaultTemplates = {
</tbody>
</table>
<div>
<a id="map-button" class="btn btn-primary btn-xs" href="{{{this.meeting_details_url}}}" target="_blank" rel="noopener noreferrer" style="float:left">
<a id="map-button" class="btn btn-primary btn-xs" href="{{{this.meeting_details_url}}}" tabindex="0" target="_blank" rel="noopener noreferrer" style="float:left">
{{getWord "Meeting Page"}}</a>
<a id="map-button" class="btn btn-primary btn-xs modal-close" style="float:right">
<a id="map-button" class="btn btn-primary btn-xs modal-close" tabindex="0" style="float:right">
{{getWord "Close"}}</a>
</div>
</div></div>`,
Expand Down
3 changes: 3 additions & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading