Procházet zdrojové kódy

Refactor header and layout templates for improved accessibility and consistency

seve12 před 2 týdny
rodič
revize
6a713d9e8d

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

@@ -340,12 +340,12 @@ BlazeComponent.extendComponent({
       selectable: true,
       timezone: 'local',
       weekNumbers: true,
-      header: {
-        left: 'title   today prev,next',
-        center:
-          'agendaDay,listDay,timelineDay agendaWeek,listWeek,timelineWeek month,listMonth',
-        right: '',
+      headerToolbar: {
+        left: 'prev,next today',
+        center: 'title',
+        right: 'month,agendaWeek,agendaDay'
       },
+      footerToolbar: false,
       // height: 'parent', nope, doesn't work as the parent might be small
       height: 'auto',
       /* TODO: lists as resources: https://fullcalendar.io/docs/vertical-resource-view */

+ 6 - 3
client/components/boards/boardHeader.jade

@@ -1,5 +1,5 @@
 template(name="boardHeaderBar")
-  h1.header-board-menu
+  h1.header-board-menu {{currentBoard.title}}
     with currentBoard
       if $eq title 'Templates'
         | {{_ 'templates'}}
@@ -137,8 +137,11 @@ template(name="boardHeaderBar")
           i.fa.fa-check-square-o
           span {{#if MultiSelection.isActive}}{{_ 'multi-selection-on'}}{{else}}{{_ 'multi-selection'}}{{/if}}
           if MultiSelection.isActive
-            a.board-header-btn-close.js-multiselection-reset(title="{{_ 'filter-clear'}}")
-              i.fa.fa-times-thin
+            a.board-header-btn-close.js-multiselection-reset(
+            title="{{_ 'deactivate-multi-selection'}}"
+            aria-label="{{_ 'deactivate-multi-selection'}}"
+          )
+            i.fa.fa-times-thin
 
       .separator
       a.board-header-btn.js-toggle-sidebar(title="{{_ 'sidebar-open'}} {{_ 'or'}} {{_ 'sidebar-close'}}")

+ 1 - 1
client/components/cards/cardDetails.jade

@@ -540,7 +540,7 @@ template(name="cardDetails")
       else if getDescription
         if currentBoard.allowsDescriptionTitle
           hr
-          h3.card-details-item-title {{_ 'description'}}
+          div.card-details-item-title {{_ 'description'}}
         if currentBoard.allowsDescriptionText
           +viewer
             = getDescription

+ 12 - 3
client/components/main/header.jade

@@ -39,12 +39,20 @@ template(name="header")
           if currentSetting.customTopLeftCornerLogoImageUrl
             if currentSetting.customTopLeftCornerLogoLinkUrl
               a(href="{{currentSetting.customTopLeftCornerLogoLinkUrl}}" alt="{{currentSetting.productName}}" title="{{currentSetting.productName}}")
-                img(src="{{currentSetting.customTopLeftCornerLogoImageUrl}}" height="{{#if currentSetting.customTopLeftCornerLogoHeight}}#{currentSetting.customTopLeftCornerLogoHeight}{{else}}27{{/if}}" width="auto" margin="0" padding="0")
+                img(
+                  src="{{currentSetting.customTopLeftCornerLogoImageUrl}}"
+                  alt="{{currentSetting.productName}} logo"
+                  title="{{currentSetting.productName}}"
+                )
             unless currentSetting.customTopLeftCornerLogoLinkUrl
               img(src="{{currentSetting.customTopLeftCornerLogoImageUrl}}" height="{{#if currentSetting.customTopLeftCornerLogoHeight}}#{currentSetting.customTopLeftCornerLogoHeight}{{else}}27{{/if}}" width="auto" margin="0" padding="0" alt="{{currentSetting.productName}}" title="{{currentSetting.productName}}")
           unless currentSetting.customTopLeftCornerLogoImageUrl
             div#headerIsSettingDatabaseCallDone
-              img(src="{{pathFor '/logo-header.png'}}" alt="{{currentSetting.productName}}" title="{{currentSetting.productName}}")
+              img(
+                src="{{pathFor '/logo-header.png'}}"
+                alt="{{currentSetting.productName}} logo"
+                title="{{currentSetting.productName}}"
+              )
         span.allBoards
           a(href="{{pathFor 'home'}}")
             span.fa.fa-home
@@ -73,7 +81,8 @@ template(name="header")
       //  Hide duplicate create board button,
       //  because it did not show board templates correctly.
       //a#header-new-board-icon.js-create-board
-      //  i.fa.fa-plus(title="Create a new board")
+      button.add-card(aria-label="Add card" title="Add card")
+        i.fa.fa-plus
 
       +notifications
 

+ 2 - 2
client/components/main/layouts.jade

@@ -21,11 +21,11 @@ head
 template(name="userFormsLayout")
   section.auth-layout
     if currentSetting.hideLogo
-      h1.at-form-landing-logo
+      h1.at-form-landing-logo Wekan
         br
         br
     unless currentSetting.hideLogo
-      h1.at-form-landing-logo
+      h1.at-form-landing-logo Wekan
       if currentSetting.customLoginLogoImageUrl
         if currentSetting.customLoginLogoLinkUrl
           a(href="{{currentSetting.customLoginLogoLinkUrl}}")