Files
wekan/client/components/users/userHeader.jade
T
Lauri Ojansivu 6a7af5391a Accessibility: every Admin Panel pane and the most used popups pass the WCAG 2.2 AA rules, at 320 px and with reduced motion.
tests/playwright/specs/47-accessibility-everywhere.e2e.js scans every Admin
Panel pane and the member, list, swimlane and card details menus with axe,
checks 320 px reflow and that nothing animates when reduced motion is asked
for. What it found is fixed:

- names: every unnamed input and select of the Admin Panel is named by the
  label shown beside it; table page filters lost their label in
  models/lib/tablePage.js; people rows and avatar links name the person, and
  a person link's name starts with its visible initials (2.5.3);
- contrast: the feature descriptions, source badges, instrumentation headings
  and the default theme's menu hover pass 4.5:1;
- target size: checkbox rows, notification options and the Select all links
  are at least 24 x 24 px;
- the member menu's dependency toggles are checkboxes in a well-formed list;
- reduced motion: one rule in its own CSS layer makes every animation and
  transition instant, even those header.css marks !important.

Spec 47 passes in Chromium, and specs 45 and 46 still pass (39).
tests/accessibilitySpec47Fixes.test.cjs pins the fixes, and fails when a
settings select has no name.

Thanks to xet7 !
2026-11-24 19:14:11 +02:00

578 lines
22 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
template(name="headerUserBar")
#header-user-bar
//- aria-label: WCAG 2.5.3 Label in Name - the name shown (and the initials of the
//- avatar) are part of the accessible name, followed by what the link opens.
a.header-user-bar-name.js-open-header-member-menu(title="{{_ 'memberMenuPopup-title'}}" aria-label="{{userBarLabel}}")
.header-user-bar-avatar
+userAvatar(userId=currentUser._id)
unless isMiniScreen
unless isSandstorm
if currentUser.profile.fullname
= currentUser.profile.fullname
else
= currentUser.username
template(name="memberMenuPopup")
//- #6837: a feature profile hides features on purpose, and says so, so a
hidden feature is never taken for a missing one (models/lib/featureProfiles.js).
with featureProfileNotice
p.feature-profile-notice.quiet(role="note")
i.fa.fa-eye-slash(aria-hidden="true")
| {{_ 'feature-profile-notice' name=name count=hiddenCount}}
ul.pop-over-list
with currentUser
//- #6732: at the top - Show My / Show Board Dependencies, Import, Export.
+memberDependencyMenuItems
li.pop-over-list-separator
hr
li
a.js-my-cards(href="{{pathFor 'my-cards'}}")
i.fa.fa-list
| {{_ 'my-cards'}}
li
a.js-due-cards(href="{{pathFor 'due-cards'}}")
i.fa.fa-calendar
| {{_ 'dueCards-title'}}
if allowFeature 'workload'
li
a.js-workload(href="{{pathFor 'workload'}}")
i.fa.fa-tachometer
| {{_ 'workload-title'}}
if allowFeature 'billing'
li
a.js-billing(href="{{pathFor 'billing'}}")
i.fa.fa-money
| {{_ 'billing-title'}}
li
a.js-my-attachments(href="{{pathFor 'my-attachments'}}")
i.fa.fa-paperclip
| {{_ 'my-attachments'}}
li
a.js-starred-items(href="{{pathFor 'starred-items'}}")
i.fa.fa-star
| {{_ 'allboards.starred'}}
li
a.js-global-search(href="{{pathFor 'global-search'}}")
i.fa.fa-search
| {{_ 'globalSearch-title'}}
li
a(href="{{pathFor 'home'}}")
i.fa.fa-home
| {{_ 'all-boards'}}
li
a(href="{{pathFor 'public'}}")
i.fa.fa-globe
| {{_ 'public'}}
li
a.board-header-btn.js-open-archived-board
i.fa.fa-archive
span {{_ 'archives'}}
//- Notifications removed from the member menu: same as the header bell icon.
if currentSetting.customHelpLinkUrl
li
a(href="{{currentSetting.customHelpLinkUrl}}", title="{{_ 'help'}}", target="_blank", rel="noopener noreferrer")
i.fa.fa-question-circle
| {{_ 'help'}}
unless currentUser.isWorker
li
a(href="{{pathFor 'allboards-templates'}}")
i.fa.fa-list
| {{_ 'templates'}}
//- Multitenancy option D (D.7): the Admin Panel link is also for a per-tenant
//- Global Admin, whose panel is the same one with only their own
//- Organization's panes in it. A site admin lands on Settings as before; a
//- per-tenant admin's Settings tab does not exist, so they are sent to
//- People, which is the first tab they have.
if currentUser.isAdmin
li
a.js-go-setting(href="{{pathFor 'setting'}}")
i.fa.fa-lock
| {{_ 'admin-panel'}}
else if currentUser.isOrgAdmin
li
a.js-go-setting(href="{{pathFor 'people'}}")
i.fa.fa-lock
| {{_ 'admin-panel'}}
li.pop-over-list-separator
hr
if isSameDomainNameSettingValue
li
a.js-invite-people
i.fa.fa-envelope
| {{_ 'invite-people'}}
if isNotOAuth2AuthenticationMethod
li
a.js-edit-profile
i.fa.fa-user
| {{_ 'edit-profile'}}
//- WP-6: the legal pages and the person's own data, in one place.
li
a.js-privacy-and-my-data
i.fa.fa-user-secret
| {{_ 'privacy-and-my-data'}}
li
a.js-member-date-settings
i.fa.fa-calendar
| {{_ 'date'}}
li
a.js-change-settings
i.fa.fa-cog
| {{_ 'change-settings'}}
li
a.js-change-color
i.fa.fa-paint-brush
| {{_ 'change-color'}}
li
a.js-open-notification-settings
i.fa.fa-bell
| {{_ 'notifications'}}
li
a.js-change-font
i.fa.fa-font
| {{_ 'change-font'}}
li
a.js-change-avatar
i.fa.fa-picture-o
| {{_ 'change-avatar'}}
unless isSandstorm
if isNotOAuth2AuthenticationMethod
li
a.js-change-password
i.fa.fa-key
| {{_ 'changePasswordPopup-title'}}
li
a.js-two-factor-auth
i.fa.fa-shield
| {{_ 'twoFactorAuthPopup-title'}}
//- #4265: boards this member left that came through a team.
li
a.js-hidden-boards
i.fa.fa-eye-slash
| {{_ 'hiddenBoardsPopup-title'}}
//- #5847: sign in with a passkey instead of a password.
unless isSandstorm
li
a.js-passkeys
i.fa.fa-key
| {{_ 'passkeysPopup-title'}}
//- #2460: sign in with a SQRL identity.
if sqrlOffered
li
a.js-sqrl
i.fa.fa-qrcode
| {{_ 'sqrlPopup-title'}}
li
a.js-change-language
i.fa.fa-flag
| {{_ 'changeLanguagePopup-title'}}
//- #2026 / #1377: what happened on all my boards.
li
a(href="{{pathFor 'activity-feed'}}")
i.fa.fa-history
| {{_ 'activity-feed-title'}}
if isSupportPageEnabled
li
a(href="{{pathFor 'support'}}")
i.fa.fa-question-circle
| {{_ 'support'}}
unless isSandstorm
hr
ul.pop-over-list
li
a.js-logout
i.fa.fa-sign-out
| {{_ 'log-out'}}
//- #5847: end every session of this account - other browsers, phones,
the desktop app - and this one.
li
a.js-logout-everywhere
i.fa.fa-power-off
| {{_ 'log-out-everywhere'}}
template(name="logoutEverywherePopup")
p {{_ 'log-out-everywhere-confirm'}}
button.js-confirm.negate.full(type="submit") {{_ 'log-out-everywhere'}}
template(name="invitePeoplePopup")
ul#registration-setting.setting-detail
li
#invite-people-infos
li
br
li
.invite-people(class="{{#if currentSetting.disableRegistration}}{{else}}hide{{/if}}")
ul
li
.title {{_ 'invite-people'}}
textarea#email-to-invite.wekan-form-control(data-editor-submit=".js-email-invite" rows='5', placeholder="{{_ 'email-addresses'}}")
li
.title {{_ 'to-boards'}}
.bg-white
each boards
a.option.flex.js-toggle-board-choose(id= _id)
.materialCheckBox(data-id= _id)
span= title
li
button.js-email-invite.primary {{_ 'invite'}}
template(name="editProfilePopup")
form
label
| {{_ 'fullname'}}
textarea.js-profile-fullname(rows="2" autofocus)= profile.fullname
label
| {{_ 'username'}}
span.error.hide.username-taken
| {{_ 'error-username-taken'}}
if allowUserNameChange
input.js-profile-username(type="text" value=username)
else
input.js-profile-username(type="text" value=username readonly)
label
| {{_ 'initials'}}
input.js-profile-initials(type="text" value=profile.initials)
label
| {{_ 'email'}}
span.error.hide.email-taken
| {{_ 'error-email-taken'}}
//- #2460: the member's SQRL client hardlocked the account.
span.error.hide.sqrl-hardlock-error
| {{_ 'sqrl-hardlock'}}
if allowEmailChange
input.js-profile-email(type="email" value="{{emails.[0].address}}")
else
input.js-profile-email(type="email" value="{{emails.[0].address}}" readonly)
div.buttonsContainer
input.primary.wide(type="submit" value="{{_ 'save'}}")
if allowUserDelete
div
input#deleteButton.primary.wide(type="button" value="{{_ 'delete'}}")
div
input#anonymizeButton.primary.wide(type="button" value="{{_ 'anonymize-account'}}")
template(name="changePasswordPopup")
+atForm(state='changePwd')
//- #5847: this account's passkeys (server/passkeys.js), added on this device
and removed from any.
template(name="passkeysPopup")
.passkeys-popup
p.quiet {{_ 'passkeys-description'}}
ul.pop-over-list
each passkeys
li.passkey-row
i.fa.fa-key
| {{name}}
span.quiet {{createdText}}
a.js-remove-passkey(data-id=id title="{{_ 'remove-btn'}}")
i.fa.fa-trash
else
li.quiet {{_ 'passkeys-none'}}
if supported
form.js-add-passkey
input.js-passkey-name(type="text" maxlength="60" placeholder="{{_ 'passkey-name'}}" aria-label="{{_ 'passkey-name'}}")
button.primary.js-add-passkey-button(type="submit") {{_ 'passkey-add'}}
else
p.quiet {{_ 'passkeys-unsupported'}}
if message
p.quiet= message
//- #2460: this account's SQRL identity (server/sqrl.js): added with the
member's SQRL client, removed from here.
template(name="sqrlPopup")
.sqrl-popup
p.quiet {{_ 'sqrl-description'}}
if mine
if mine.added
p
i.fa.fa-check
| {{_ 'sqrl-added'}}
if mine.disabled
p.quiet {{_ 'sqrl-disabled-by-client'}}
if mine.sqrlOnly
p.quiet
i.fa.fa-lock
| {{_ 'sqrl-only-on'}}
if mine.hardlock
p.quiet
i.fa.fa-lock
| {{_ 'sqrl-hardlock-on'}}
button.js-sqrl-remove(type="button") {{_ 'sqrl-remove'}}
else
p.quiet {{_ 'sqrl-none'}}
if shown
.sqrl-box
a.sqrl-qr(href=shown.link aria-label="{{_ 'sqrl-open-client'}}") {{{shown.svg}}}
p.quiet {{_ 'sqrl-scan'}}
a.button(href=shown.link) {{_ 'sqrl-open-client'}}
else
button.primary.js-sqrl-add(type="button") {{_ 'sqrl-add'}}
if message
p.quiet= message
//- #4265: the boards this member hid by leaving them; each comes back to
All Boards with Restore. Access is the board's own, as before.
template(name="hiddenBoardsPopup")
ul.pop-over-list.hidden-boards-popup
each hiddenBoards
li
span= title
a.js-restore-hidden-board(data-id=_id)
i.fa.fa-undo
| {{_ 'restore'}}
else
li.quiet {{_ 'hidden-boards-none'}}
template(name="twoFactorAuthPopup")
//- Issue #3058: opt-in per-user TOTP two-factor authentication, via
//- Meteor's official accounts-2fa package
//- (https://docs.meteor.com/packages/accounts-2fa.html). All secret
//- generation and code verification is done by that package
//- (Accounts.generate2faActivationQrCode / Accounts.enableUser2fa /
//- Accounts.disableUser2fa) - this template only shows the resulting QR
//- code / secret and the enable/disable controls. See
//- client/components/users/userHeader.js for the wiring.
.two-factor-auth-popup
if isLoadingStatus
+loader
else
if hasTwoFactorAuth
p.two-factor-auth-status
i.fa.fa-check-circle
| {{_ 'twoFactorAuth-enabled'}}
div.buttonsContainer
button.primary.js-two-factor-disable(type="button") {{_ 'twoFactorAuth-disable'}}
else
if activationStep
p {{_ 'twoFactorAuth-scan-instructions'}}
if qrSvg
.two-factor-auth-qr-code
!= qrSvg
if qrSecret
p.two-factor-auth-secret
| {{_ 'twoFactorAuth-manual-entry'}}
code {{qrSecret}}
form.js-two-factor-confirm-form
label
| {{_ 'twoFactorCode-prompt'}}
input.js-two-factor-confirm-input(type="text" inputmode="numeric" pattern="[0-9]*" maxlength="6" autocomplete="one-time-code" autofocus)
div.two-factor-auth-error.error.hide
div.buttonsContainer
input.primary(type="submit" value="{{_ 'twoFactorAuth-confirm'}}")
button.js-two-factor-cancel-activation(type="button") {{_ 'twoFactorCode-cancel'}}
else
p {{_ 'twoFactorAuth-explanation'}}
div.buttonsContainer
button.primary.js-two-factor-start-enable(type="button") {{_ 'twoFactorAuth-enable'}}
template(name="changeLanguagePopup")
ul.pop-over-list
each languages
li(class="{{# if isCurrentLanguage}}active{{/if}}")
a.js-set-language(href="#" dir="{{languageDirection}}" data-language="{{tag}}")
span.language-label
span.language-main-line
span.emoji-icon.language-flags(dir="ltr" aria-hidden="true") {{languageFlag}}
bdi.language-name {{languageName}}
if rtl
span.language-rtl(dir="ltr") (RTL)
if countryFlag
span.language-region
| (
span.emoji-icon.language-country-flag(dir="ltr" aria-hidden="true") {{countryFlag}}
if regionName
|  
bdi {{regionName}}
| )
if isCurrentLanguage
i.fa.fa-check
template(name="changeColorPopup")
//- #5778: global theme color override, saved to the user profile. Works like
Board Settings / Change Color, but applies to the whole UI (All Boards, Search,
Admin Panel, etc). The shared picker (docs/Theme/Theme.md) offers category +
theme dropdowns and custom color wheels for flat/clear themes.
+themeColorPicker(scope="global")
template(name="changeFontPopup")
//- #4759: pick a UI font that ALREADY EXISTS in this browser. One button per
detected font, each shown in its OWN font (names are plain text, Blaze-escaped,
validated to a curated whitelist server-side). Font size is a row of buttons
(smaller on the left, 100% in the middle, larger on the right). Clicking a font
or size applies it IMMEDIATELY (no Save button).
form.change-font.edit-label
label {{_ 'font'}}
.ui-font-buttons
a.ui-font-btn.js-ui-font-btn(data-font="" class="{{#if isNoneSelected}}active{{/if}}") {{_ 'font-default'}}
each detectedFonts
a.ui-font-btn.js-ui-font-btn(data-font="{{name}}" style="{{optionStyle}}" class="{{#if selected}}active{{/if}}") {{name}}
//- Preview (pangram + numbers) right below the font-name buttons.
.font-preview(style=previewStyle) {{_ 'font-preview-text'}}
label {{_ 'font-size'}}
.ui-font-size-buttons
each fontSizes
a.ui-font-size-btn.js-ui-font-size-btn(data-size="{{key}}" class="{{#if selected}}active{{/if}}") {{label}}
//- #4759: the text colour, from a colour wheel, unsettable. Applied
immediately when the wheel is committed / reset.
There was a "text background color" beside it. It painted a colour behind
the text of every element that carries text, and there is no choice of
elements that looks right: on the boxes it painted the page, and on the
text carriers it striped headings and menu rows with bands. It is removed
rather than left in as a setting nobody can make look good.
label {{_ 'text-color'}}
.color-wheel-wrap
input.js-ui-text-color(type="color" value=textColorHex title="{{_ 'text-color'}}")
a.js-reset-text-color(class="{{#unless hasTextColor}}disabled{{/unless}}") {{_ 'remove-btn'}}
//- WCAG 1.4.3: the colour is made legible on the theme's surface; this says so.
if textColorAdjusted
p.ui-text-color-adjusted.js-ui-text-color-adjusted {{_ 'text-color'}}: {{readableTextColor}} (4.5:1)
template(name="changeSettingsPopup")
//- #6835: its own class - a popup keeps the screens before it (the member
menu) side by side in the same .pop-over, so the popup's data-popup would
restyle those too. userForm.css
ul.pop-over-list.change-settings-list
li
a.js-toggle-desktop-drag-handles
i.fa.fa-arrows
| {{_ 'show-desktop-drag-handles'}}
if isShowDesktopDragHandles
i.fa.fa-check
//- #2111 / #1604: mark cards changed since I last opened them.
li
a.js-toggle-unread-changes(title="{{_ 'show-unread-changes-desc'}}")
i.fa.fa-circle
| {{_ 'show-unread-changes'}}
if isUnreadChanges
i.fa.fa-check
//- #1273: keep the #label / @member text in a new card's title.
li
a.js-toggle-keep-title-tags(title="{{_ 'keep-title-tags-description'}}")
i.fa.fa-hashtag
| {{_ 'keep-title-tags'}}
if isKeepTitleTags
i.fa.fa-check
//- #6755: the blue focus outline (an accessibility feature, so on by default).
li
a.js-toggle-hide-focus-outline
i.fa.fa-square-o
| {{_ 'show-focus-outline'}}
if isShowFocusOutline
i.fa.fa-check
//- #6827: the Add card form stays open after a card is added.
li
a.js-toggle-keep-add-card-form-open(title="{{_ 'keep-add-card-form-open-description'}}")
i.fa.fa-plus-square
| {{_ 'keep-add-card-form-open'}}
if isKeepAddCardFormOpen
i.fa.fa-check
//- #6810: a leading "[Text] " of a new card's title becomes a label (#3986).
li
a.js-toggle-title-bracket-label(title="{{_ 'title-bracket-label-description'}}")
i.fa.fa-tag
| {{_ 'title-bracket-label'}}
if isTitleBracketLabel
i.fa.fa-check
li
a.js-toggle-submit-on-enter(title="{{_ 'submit-on-enter-description'}}")
i.fa.fa-level-down
| {{_ 'submit-on-enter'}}
if isSubmitOnEnter
i.fa.fa-check
li
//- #6531: off by default - a click opens the card it was aimed at and closes
//- the one before it. Turned on, every clicked card stays open in its own
//- draggable window.
a.js-toggle-open-many-cards-at-once(title="{{_ 'open-many-cards-at-once-description'}}")
i.fa.fa-clone
| {{_ 'open-many-cards-at-once'}}
if isOpenManyCardsAtOnce
i.fa.fa-check
li
//- #5427: off by default - a short synthesized "ding" plays when a
//- checklist item is checked off.
a.js-toggle-checklist-ding-sound(title="{{_ 'checklist-ding-sound-description'}}")
i.fa.fa-bell
| {{_ 'checklist-ding-sound'}}
if isChecklistDingSound
i.fa.fa-check
unless currentUser.isWorker
li
label.bold.clear
i.fa.fa-sort-numeric-asc
| {{_ 'show-cards-minimum-count'}}
input#show-cards-count-at.inline-input.left(type="number" value="#{showCardsCountAt}" min="-1")
label.bold.clear
| {{_ 'card-settings'}}
//- #6465: the checkbox and its label are ONE row, built the way every
//- other checkbox row in this file is (see the board list above):
//- a .flex anchor, the .materialCheckBox, then the text. It used to
//- carry a `b  ` spacer and `.left` (float: inline-start) as
//- well - a float inside a flex container is ignored, so the spacer
//- became a stray flex item and the box drifted away from the text it
//- belongs to, up beside the "Card settings" heading above.
ul#cards.card-description-rescued
a.flex.js-rescue-card-description(title="{{_ 'rescue-card-description'}}")
#rescue-card-description.materialCheckBox(class="{{#if rescueCardDescription}}is-checked{{/if}}", value=rescueCardDescription)
span {{_ 'rescue-card-description'}}
//- "Save", and themed. It said "Apply" while every other settings form in
//- WeKan says Save, and it carried no `.primary` class - so it fell to the
//- BASE submit rule in forms.css, whose fallback is `#000`: a pure black
//- button with no theme in it. `.primary` is the themed one
//- (`var(--theme-accent, #005377)`), which is what the Save button of the
//- Change Language form above it uses.
input.js-apply-user-settings.primary.left(type="submit" value="{{_ 'save'}}")
template(name="userDeletePopup")
unless currentUser.isWorker
p {{_ 'delete-user-confirm-popup'}}
button.js-confirm.negate.full(type="submit") {{_ 'delete'}}
template(name="userAnonymizePopup")
unless currentUser.isWorker
p {{_ 'anonymize-account-confirm-popup'}}
button.js-confirm.negate.full(type="submit") {{_ 'anonymize-account'}}
//- WP-6: Member Settings / Privacy and my data - the published legal pages and
//- "Download my data" (WP-5, server/routes/personalDataExport.js: everything
//- WeKan holds about the signed-in person, as a ZIP of JSON; for every account,
//- the right of access is not a setting).
template(name="privacyAndMyDataPopup")
ul.pop-over-list
li
a.js-download-my-data(href="{{myDataUrl}}" download)
i.fa.fa-download
| {{_ 'download-my-data'}}
+legalPageLinks
+legalAcceptancesList
//- P3: every session of this account - when it signed in, and when last
//- active where idle logout records it - each with Sign out
//- (server/methods/sessions.js, models/lib/sessionList.js).
if mySessions.length
h4.privacy-sessions-title {{_ 'my-sessions'}}
ul.privacy-sessions
each mySessions
li
if current
strong {{_ 'session-this-browser'}}
| ·
| {{_ 'session-signed-in' date=(date when)}}
if lastActiveAt
| · {{date lastActiveAt}}
|
button.js-end-session(type="button" data-session="{{id}}") {{_ 'session-end'}}
//- WP-10: where this account signed in from, how often, first and last
//- (getMyLoginHistory, server/methods/loginOffices.js).
if myLoginHistory.length
h4.privacy-login-history-title {{_ 'my-login-history'}}
ul.privacy-login-history
each myLoginHistory
li
code {{address}}
if locationLabel
| {{locationLabel}}
| · {{logins}} · {{date firstAt}} – {{date at}}