fixes 16.9.2025

This commit is contained in:
seve12 2025-09-16 23:05:35 +03:00
parent ed416ca555
commit d19eb801f3
2 changed files with 22 additions and 6 deletions

View file

@ -140,7 +140,12 @@ BlazeComponent.extendComponent({
document.querySelectorAll('.js-toggle').forEach(function(el) {
el.setAttribute('tabindex', '0');
el.setAttribute('role', 'button');
el.setAttribute('aria-label', 'Toggle');
// Short, descriptive label for favorite/star toggle
if (el.classList.contains('js-favorite-toggle')) {
el.setAttribute('aria-label', TAPi18n.__('favorite-toggle-label'));
} else {
el.setAttribute('aria-label', 'Toggle');
}
});
document.querySelectorAll('.js-color-choice').forEach(function(el) {
el.setAttribute('tabindex', '0');
@ -615,12 +620,12 @@ BlazeComponent.extendComponent({
right: '',
},
buttonText: {
prev: TAPi18n.__('calendar-previous-month'),
next: TAPi18n.__('calendar-next-month'),
prev: TAPi18n.__('calendar-previous-month-label'), // e.g. "Previous month"
next: TAPi18n.__('calendar-next-month-label'), // e.g. "Next month"
},
ariaLabel: {
prev: TAPi18n.__('calendar-previous-month'),
next: TAPi18n.__('calendar-next-month'),
prev: TAPi18n.__('calendar-previous-month-label'),
next: TAPi18n.__('calendar-next-month-label'),
},
// height: 'parent', nope, doesn't work as the parent might be small
height: 'auto',

View file

@ -49,6 +49,16 @@ template(name="userFormsLayout")
if isLoading
+loader
else
// ARIA live region for error messages
div#login-error-message(role="alert" aria-live="assertive" style="color: #d32f2f; margin-bottom: 1em;")
// Add autocomplete attribute to login input for WCAG compliance
script.
document.addEventListener('DOMContentLoaded', function() {
var loginInput = document.querySelector('input[type="text"], input[type="email"]');
if (loginInput && loginInput.name && (loginInput.name.toLowerCase().includes('user') || loginInput.name.toLowerCase().includes('email'))) {
loginInput.setAttribute('autocomplete', 'username email');
}
});
+Template.dynamic(template=content)
if currentSetting.displayAuthenticationMethod
+connectionMethod(authenticationMethod=currentSetting.defaultAuthenticationMethod)
@ -60,7 +70,8 @@ template(name="userFormsLayout")
if getLegalNoticeWithWritTraduction
div
div.at-form-lang
select.select-lang.js-userform-set-language
label(for="userform-set-language-select") {{_ 'choose_language'}}
select.select-lang.js-userform-set-language#userform-set-language-select(aria-label="{{_ 'choose_language'}}")
each languages
if isCurrentLanguage
option(value="{{tag}}" selected="selected") {{name}}