浏览代码

fixes 16.9.2025

seve12 4 周之前
父节点
当前提交
d19eb801f3
共有 2 个文件被更改,包括 22 次插入6 次删除
  1. 10 5
      client/components/boards/boardBody.js
  2. 12 1
      client/components/main/layouts.jade

+ 10 - 5
client/components/boards/boardBody.js

@@ -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',

+ 12 - 1
client/components/main/layouts.jade

@@ -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}}