mirror of
https://github.com/wekan/wekan.git
synced 2025-12-18 00:10:13 +01:00
more fixes
This commit is contained in:
parent
cb10ad3a20
commit
106009316f
2 changed files with 29 additions and 1 deletions
|
|
@ -76,6 +76,27 @@ BlazeComponent.extendComponent({
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onRendered() {
|
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 boardComponent = this;
|
||||||
const $swimlanesDom = boardComponent.$('.js-swimlanes');
|
const $swimlanesDom = boardComponent.$('.js-swimlanes');
|
||||||
|
|
||||||
|
|
@ -328,6 +349,9 @@ BlazeComponent.extendComponent({
|
||||||
|
|
||||||
BlazeComponent.extendComponent({
|
BlazeComponent.extendComponent({
|
||||||
onRendered() {
|
onRendered() {
|
||||||
|
// Set the language attribute on the <html> element for accessibility
|
||||||
|
document.documentElement.lang = TAPi18n.getLanguage();
|
||||||
|
|
||||||
this.autorun(function () {
|
this.autorun(function () {
|
||||||
$('#calendar-view').fullCalendar('refetchEvents');
|
$('#calendar-view').fullCalendar('refetchEvents');
|
||||||
});
|
});
|
||||||
|
|
@ -484,6 +508,9 @@ BlazeComponent.extendComponent({
|
||||||
document.body.appendChild(modalElement);
|
document.body.appendChild(modalElement);
|
||||||
const openModal = function() {
|
const openModal = function() {
|
||||||
modalElement.style.display = 'flex';
|
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() {
|
const closeModal = function() {
|
||||||
modalElement.style.display = 'none';
|
modalElement.style.display = 'none';
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
head
|
html(lang="{{TAPi18n.getLanguage()}}")
|
||||||
|
head
|
||||||
title
|
title
|
||||||
meta(name="viewport" content="width=device-width, initial-scale=1")
|
meta(name="viewport" content="width=device-width, initial-scale=1")
|
||||||
meta(http-equiv="X-UA-Compatible" content="IE=edge")
|
meta(http-equiv="X-UA-Compatible" content="IE=edge")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue