more fixes

This commit is contained in:
seve12 2025-09-10 17:17:51 +03:00
parent cb10ad3a20
commit 106009316f
2 changed files with 29 additions and 1 deletions

View file

@ -76,6 +76,27 @@ BlazeComponent.extendComponent({
}
},
onRendered() {
// Set the language attribute on the <html> element for accessibility
document.documentElement.lang = TAPi18n.getLanguage();
// Ensure the accessible name for the board view switcher matches the visible label "Swimlanes"
// Example: If the switcher has class .js-board-view-swimlanes
this.$('.js-board-view-swimlanes').attr('aria-label', 'Swimlanes');
// Add a highly visible focus indicator for interactive elements
if (!document.getElementById('wekan-accessible-focus-style')) {
const style = document.createElement('style');
style.id = 'wekan-accessible-focus-style';
style.innerHTML = `
button:focus, [role="button"]:focus, a:focus, input:focus, select:focus, textarea:focus, .dropdown-menu:focus, .js-board-view-swimlanes:focus {
outline: 3px solid #005fcc !important;
outline-offset: 2px !important;
background-color: #e6f0ff !important;
}
`;
document.head.appendChild(style);
}
const boardComponent = this;
const $swimlanesDom = boardComponent.$('.js-swimlanes');
@ -328,6 +349,9 @@ BlazeComponent.extendComponent({
BlazeComponent.extendComponent({
onRendered() {
// Set the language attribute on the <html> element for accessibility
document.documentElement.lang = TAPi18n.getLanguage();
this.autorun(function () {
$('#calendar-view').fullCalendar('refetchEvents');
});
@ -484,6 +508,9 @@ BlazeComponent.extendComponent({
document.body.appendChild(modalElement);
const openModal = function() {
modalElement.style.display = 'flex';
// Set focus to the input field for better keyboard accessibility
const input = modalElement.querySelector('#card-title-input');
if (input) input.focus();
};
const closeModal = function() {
modalElement.style.display = 'none';

View file

@ -1,4 +1,5 @@
head
html(lang="{{TAPi18n.getLanguage()}}")
head
title
meta(name="viewport" content="width=device-width, initial-scale=1")
meta(http-equiv="X-UA-Compatible" content="IE=edge")