From 52c02ae41d765dd3c3a8f1bc950050262a019e3e Mon Sep 17 00:00:00 2001 From: Chelsea Shaw <82459713+hashishaw@users.noreply.github.com> Date: Mon, 18 Dec 2023 11:03:35 -0600 Subject: [PATCH] UI: Add a11y testing (#24476) --- changelog/24476.txt | 3 + ui/app/components/auth-saml.hbs | 9 +- ui/app/components/calendar-widget.js | 16 -- ui/app/components/policy-form.hbs | 6 +- ui/app/components/sidebar/frame.hbs | 4 +- ui/app/components/tool-actions-form.js | 3 + ui/app/styles/components/auth-form.scss | 2 +- ui/app/styles/components/calendar-widget.scss | 33 --- .../styles/components/console-ui-panel.scss | 17 ++ ui/app/styles/components/doc-link.scss | 1 - .../components/empty-state-component.scss | 12 +- ui/app/styles/components/masked-input.scss | 7 +- ui/app/styles/components/radio-card.scss | 2 +- ui/app/styles/components/search-select.scss | 2 +- ui/app/styles/components/tool-tip.scss | 15 +- ui/app/styles/core/charts.scss | 4 +- ui/app/styles/core/element-styling.scss | 3 +- ui/app/styles/core/inputs.scss | 2 +- ui/app/styles/core/json-diff-patch.scss | 12 +- ui/app/styles/core/link.scss | 4 - ui/app/styles/core/tag.scss | 7 +- ui/app/styles/helper-classes/colors.scss | 10 +- ui/app/styles/helper-classes/typography.scss | 4 +- ui/app/templates/components/auth-form.hbs | 1 + ui/app/templates/components/auth-jwt.hbs | 5 +- .../templates/components/calendar-widget.hbs | 118 ++++---- .../components/clients/dashboard.hbs | 4 +- .../components/configure-aws-secret.hbs | 38 +-- .../components/console/command-input.hbs | 38 ++- .../console/log-error-with-html.hbs | 2 +- .../components/console/log-error.hbs | 2 +- .../templates/components/console/log-help.hbs | 2 +- .../templates/components/console/log-json.hbs | 2 +- .../templates/components/console/log-list.hbs | 2 +- .../components/console/log-object.hbs | 2 +- .../components/console/log-success.hbs | 2 +- .../templates/components/console/log-text.hbs | 2 +- .../templates/components/console/ui-panel.hbs | 17 +- .../components/control-group-success.hbs | 1 + .../dashboard/client-count-card.hbs | 2 +- .../dashboard/quick-actions-card.hbs | 3 +- .../components/dashboard/replication-card.hbs | 2 +- .../dashboard/secrets-engines-card.hbs | 25 +- .../components/generated-item-list.hbs | 2 +- .../components/identity/entity-nav.hbs | 18 +- .../components/identity/popup-alias.hbs | 2 +- .../components/identity/popup-members.hbs | 2 +- .../components/identity/popup-metadata.hbs | 2 +- .../components/identity/popup-policy.hbs | 2 +- .../templates/components/keymgmt/key-edit.hbs | 2 +- .../components/keymgmt/provider-edit.hbs | 7 +- ui/app/templates/components/link-status.hbs | 4 +- .../mfa/login-enforcement-list-item.hbs | 2 +- .../components/mfa/method-list-item.hbs | 2 +- ui/app/templates/components/mfa/mfa-form.hbs | 2 +- .../mfa/mfa-login-enforcement-form.hbs | 5 + ui/app/templates/components/mfa/nav.hbs | 2 +- .../components/mount-accessor-select.hbs | 8 +- .../components/oidc/assignment-form.hbs | 1 + .../templates/components/oidc/client-form.hbs | 2 +- .../templates/components/oidc/client-list.hbs | 2 +- ui/app/templates/components/oidc/key-form.hbs | 2 +- .../components/oidc/provider-form.hbs | 2 +- .../components/oidc/provider-list.hbs | 2 +- ui/app/templates/components/pgp-file.hbs | 3 +- .../components/secret-edit-toolbar.hbs | 6 +- ui/app/templates/components/secret-edit.hbs | 10 +- .../components/secret-list/aws-role-item.hbs | 2 +- .../secret-list/database-list-item.hbs | 2 +- .../templates/components/secret-list/item.hbs | 2 +- .../components/secret-list/ssh-role-item.hbs | 2 +- .../secret-list/transform-list-item.hbs | 2 +- .../transform-transformation-item.hbs | 2 +- ui/app/templates/components/section-tabs.hbs | 2 +- .../transform-show-transformation.hbs | 16 +- .../components/transform-template-edit.hbs | 2 +- .../components/transit-form-show.hbs | 2 +- .../templates/components/wizard-content.hbs | 2 +- ui/app/templates/error.hbs | 2 +- .../cluster/access/identity/aliases/show.hbs | 2 +- .../vault/cluster/access/identity/index.hbs | 21 +- .../vault/cluster/access/identity/show.hbs | 2 +- .../vault/cluster/access/methods.hbs | 29 +- .../vault/cluster/access/mfa/index.hbs | 4 +- .../vault/cluster/access/namespaces/index.hbs | 12 +- .../templates/vault/cluster/access/oidc.hbs | 6 +- ui/app/templates/vault/cluster/clients.hbs | 2 +- .../vault/cluster/secrets/backends.hbs | 13 +- ui/app/templates/vault/error.hbs | 2 +- .../addon/components/autocomplete-input.hbs | 3 +- ui/lib/core/addon/components/code-snippet.hbs | 20 -- .../addon/components/confirmation-modal.hbs | 5 +- .../addon/components/copy-secret-dropdown.hbs | 3 +- ui/lib/core/addon/components/empty-state.hbs | 8 +- ui/lib/core/addon/components/enable-input.hbs | 2 +- ui/lib/core/addon/components/enable-input.ts | 8 +- ui/lib/core/addon/components/form-field.hbs | 1 + ui/lib/core/addon/components/icon.hbs | 2 +- ui/lib/core/addon/components/info-tooltip.hbs | 3 +- ui/lib/core/addon/components/json-editor.hbs | 8 +- ui/lib/core/addon/components/masked-input.hbs | 1 + .../core/addon/components/overview-card.hbs | 12 +- ui/lib/core/addon/components/page/error.hbs | 11 +- ui/lib/core/addon/components/popup-menu.hbs | 3 +- ui/lib/core/addon/components/radio-card.hbs | 4 +- .../core/addon/components/search-select.hbs | 2 +- .../addon/components/secret-list-header.hbs | 54 ++-- ui/lib/core/addon/components/select.js | 2 + .../addon/components/shamir/dr-token-flow.hbs | 8 +- ui/lib/core/addon/components/shamir/form.hbs | 10 +- ui/lib/core/addon/components/string-list.hbs | 2 +- ui/lib/core/addon/components/text-file.hbs | 12 +- .../core/addon/components/toolbar-actions.hbs | 2 +- .../core/addon/components/toolbar-filters.hbs | 2 +- ui/lib/core/addon/components/ttl-picker.hbs | 4 +- .../components/replication-secondary-card.hbs | 36 +-- .../addon/templates/components/select.hbs | 5 +- ui/lib/core/app/components/code-snippet.js | 6 - .../addon/components/page/credentials.hbs | 3 +- .../addon/components/page/role/details.hbs | 2 +- .../addon/components/tab-page-header.hbs | 8 +- ui/lib/kv/addon/components/kv-list-filter.hbs | 3 +- ui/lib/kv/addon/components/kv-page-header.hbs | 6 +- .../addon/components/page/configuration.hbs | 4 +- ui/lib/kv/addon/components/page/list.hbs | 6 +- .../addon/components/page/secret/details.hbs | 8 +- .../page/secret/metadata/details.hbs | 8 +- .../page/secret/metadata/version-history.hbs | 8 +- .../kv/addon/components/page/secret/paths.hbs | 28 +- .../kv/addon/components/page/secret/paths.js | 10 +- ui/lib/kv/addon/templates/error.hbs | 4 +- .../ldap/addon/components/page/libraries.hbs | 1 + .../addon/components/page/library/details.hbs | 6 +- .../page/library/details/accounts.hbs | 9 +- .../addon/components/page/role/details.hbs | 2 +- ui/lib/ldap/addon/components/page/roles.hbs | 8 +- .../ldap/addon/components/tab-page-header.hbs | 14 +- .../page/pki-configuration-details.hbs | 4 +- .../addon/components/page/pki-issuer-edit.hbs | 4 +- .../page/pki-issuer-rotate-root.hbs | 4 +- .../pki/addon/components/pki-page-header.hbs | 14 +- ui/lib/pki/addon/components/pki-role-form.hbs | 3 +- .../components/secrets/destination-header.hbs | 4 +- .../components/secrets/page/destinations.hbs | 4 +- ui/package.json | 3 +- ui/testem.js | 2 +- .../access/identity/entities/create-test.js | 7 + .../identity/groups/aliases/create-test.js | 7 + .../access/identity/groups/create-test.js | 7 + .../enterprise-control-groups-test.js | 7 + ui/tests/acceptance/enterprise-kmip-test.js | 7 + ui/tests/acceptance/init-test.js | 7 + .../secrets/backend/kubernetes/roles-test.js | 7 + .../secrets/backend/ldap/libraries-test.js | 7 + .../secrets/backend/ldap/roles-test.js | 7 + ui/tests/acceptance/sidebar-nav-test.js | 8 +- ui/tests/acceptance/ssh-test.js | 7 + ui/tests/helpers/general-selectors.js | 6 +- ui/tests/helpers/kubernetes/overview.js | 8 +- ui/tests/helpers/kv/kv-selectors.js | 4 +- ui/tests/helpers/pki/overview.js | 12 +- .../components/autocomplete-input-test.js | 13 + .../components/calendar-widget-test.js | 54 ++-- .../clients/horizontal-bar-chart-test.js | 29 +- .../components/clients/line-chart-test.js | 30 +- .../components/clients/running-total-test.js | 7 + .../clients/vertical-bar-chart-test.js | 48 ++-- .../components/confirm-action-test.js | 7 + .../components/console/log-json-test.js | 7 + .../components/control-group-success-test.js | 12 +- .../dashboard/quick-actions-card-test.js | 9 + .../database-role-setting-form-test.js | 7 + .../components/enable-input-test.js | 20 +- .../components/filter-input-test.js | 12 +- .../integration/components/form-field-test.js | 13 + .../components/get-credentials-card-test.js | 8 + .../components/json-editor-test.js | 10 +- .../components/keymgmt/distribute-test.js | 9 + .../components/keymgmt/provider-edit-test.js | 9 + .../kubernetes/page/configure-test.js | 8 + .../kubernetes/page/overview-test.js | 8 + .../page/role/create-and-edit-test.js | 10 + .../kubernetes/page/role/details-test.js | 7 + .../components/kv/kv-data-fields-test.js | 7 + .../components/kv/kv-page-header-test.js | 4 +- .../components/kv/page/kv-page-list-test.js | 20 +- .../kv/page/kv-page-secret-details-test.js | 7 + .../kv/page/kv-page-secret-edit-test.js | 8 + .../kv/page/kv-page-secret-paths-test.js | 16 +- .../kv/page/kv-page-secrets-create-test.js | 8 + .../kv/page/kv-page-version-history-test.js | 2 +- .../ldap/page/configuration-test.js | 8 + .../components/ldap/page/libraries-test.js | 6 + .../page/library/details/accounts-test.js | 2 +- .../components/ldap/page/overview-test.js | 8 + .../ldap/page/role/create-and-edit-test.js | 7 + .../components/license-info-test.js | 10 + .../mfa-login-enforcement-form-test.js | 10 + .../mfa-login-enforcement-header-test.js | 14 + .../mount-backend/type-form-test.js | 7 + .../components/oidc/assignment-form-test.js | 8 + .../components/oidc/client-form-test.js | 12 + .../components/oidc/key-form-test.js | 11 + .../components/oidc/provider-form-test.js | 11 + .../components/oidc/scope-form-test.js | 7 + .../components/overview-card-test.js | 15 +- .../path-filter-config-list-test.js | 10 + .../integration/components/pgp-file-test.js | 4 +- .../page/pki-configuration-details-test.js | 7 + .../pki/page/pki-issuer-generate-root-test.js | 10 + .../pki/page/pki-issuer-rotate-root-test.js | 8 + .../components/pki/pki-generate-csr-test.js | 7 + .../components/pki/pki-key-parameters-test.js | 7 + .../components/pki/pki-role-form-test.js | 8 + .../components/policy-example-test.js | 12 + .../components/policy-form-test.js | 8 + .../components/radio-button-test.js | 9 +- .../replication-secondary-card-test.js | 8 + .../components/search-select-test.js | 11 + .../search-select-with-modal-test.js | 11 + .../components/secret-edit-test.js | 18 +- .../integration/components/select-test.js | 4 +- .../components/sidebar/frame-test.js | 20 ++ .../components/sidebar/nav/access-test.js | 12 + .../components/sidebar/nav/cluster-test.js | 12 + .../components/sidebar/nav/policies-test.js | 12 + .../components/sidebar/nav/tools-test.js | 12 + .../components/sidebar/user-menu-test.js | 9 + .../integration/components/text-file-test.js | 14 +- .../integration/components/tool-tip-test.js | 2 +- .../transform-advanced-templating-test.js | 7 + .../components/transit-key-actions-test.js | 31 ++- .../integration/components/ttl-picker-test.js | 7 + ui/tests/test-helper.js | 11 + ui/yarn.lock | 261 ++++++++++++++---- 235 files changed, 1556 insertions(+), 739 deletions(-) create mode 100644 changelog/24476.txt delete mode 100644 ui/lib/core/addon/components/code-snippet.hbs delete mode 100644 ui/lib/core/app/components/code-snippet.js diff --git a/changelog/24476.txt b/changelog/24476.txt new file mode 100644 index 0000000000..797ed9a48d --- /dev/null +++ b/changelog/24476.txt @@ -0,0 +1,3 @@ +```release-note:improvement +ui: improve accessibility - color contrast, labels, and automatic testing +``` diff --git a/ui/app/components/auth-saml.hbs b/ui/app/components/auth-saml.hbs index 8d69fe8759..aa87e3770d 100644 --- a/ui/app/components/auth-saml.hbs +++ b/ui/app/components/auth-saml.hbs @@ -46,10 +46,11 @@ Logging in with a SAML auth method requires a browser in a secure context. - - Read more about secure contexts. - - + {{/if}} \ No newline at end of file diff --git a/ui/app/components/calendar-widget.js b/ui/app/components/calendar-widget.js index 2e1a3271b1..804c9af196 100644 --- a/ui/app/components/calendar-widget.js +++ b/ui/app/components/calendar-widget.js @@ -28,8 +28,6 @@ export default class CalendarWidget extends Component { currentDate = timestamp.now(); @tracked calendarDisplayDate = this.currentDate; // init to current date, updates when user clicks on calendar chevrons @tracked showCalendar = false; - @tracked tooltipTarget = null; - @tracked tooltipText = null; // both date getters return a date object get startDate() { @@ -72,20 +70,6 @@ export default class CalendarWidget extends Component { }); } - @action - addTooltip() { - if (this.disablePastYear) { - const previousYear = this.displayYear - 1; - this.tooltipText = `${previousYear} is unavailable because it is before your start date. Change your start month to a date in ${previousYear} to see data for this year.`; - this.tooltipTarget = '#previous-year'; - } - } - - @action - removeTooltip() { - this.tooltipTarget = null; - } - @action addYear() { this.calendarDisplayDate = addYears(this.calendarDisplayDate, 1); diff --git a/ui/app/components/policy-form.hbs b/ui/app/components/policy-form.hbs index a04533b8e3..c4085e64f9 100644 --- a/ui/app/components/policy-form.hbs +++ b/ui/app/components/policy-form.hbs @@ -23,11 +23,11 @@ {{/if}}
- + {{#if @renderPolicyExampleModal}} {{! only true in policy create and edit routes }} - + {{/if}} - +
{{#if @model.isNew}}
diff --git a/ui/app/components/sidebar/frame.hbs b/ui/app/components/sidebar/frame.hbs index 8511309370..2139385f3a 100644 --- a/ui/app/components/sidebar/frame.hbs +++ b/ui/app/components/sidebar/frame.hbs @@ -13,7 +13,7 @@ @icon="vault" @route="vault.cluster.dashboard" @model={{this.currentCluster.cluster.name}} - @ariaLabel="home link" + @ariaLabel="Vault home" data-test-sidebar-logo /> @@ -31,7 +31,7 @@ {{! this block is where the Hds::SideNav::Portal components render into }} <:body> - + <:footer> diff --git a/ui/app/components/tool-actions-form.js b/ui/app/components/tool-actions-form.js index 2441653bd3..40b183f3af 100644 --- a/ui/app/components/tool-actions-form.js +++ b/ui/app/components/tool-actions-form.js @@ -10,6 +10,7 @@ import Component from '@ember/component'; import { setProperties, computed, set } from '@ember/object'; import { addSeconds, parseISO } from 'date-fns'; import { A } from '@ember/array'; +import { capitalize } from '@ember/string'; const DEFAULTS = { token: null, @@ -30,6 +31,7 @@ const DEFAULTS = { const WRAPPING_ENDPOINTS = ['lookup', 'wrap', 'unwrap', 'rewrap']; export default Component.extend(DEFAULTS, { + flashMessages: service(), store: service(), // putting these attrs here so they don't get reset when you click back //random @@ -97,6 +99,7 @@ export default Component.extend(DEFAULTS, { props = assign({}, props, { [keyName]: resp.wrap_info.token }); } setProperties(this, props); + this.flashMessages.success(`${capitalize(action)} was successful.`); }, getData() { diff --git a/ui/app/styles/components/auth-form.scss b/ui/app/styles/components/auth-form.scss index a0f7fc55b6..c6f62abfea 100644 --- a/ui/app/styles/components/auth-form.scss +++ b/ui/app/styles/components/auth-form.scss @@ -37,6 +37,6 @@ } .is-label { - color: $grey; + color: var(--token-color-foreground-faint); } } diff --git a/ui/app/styles/components/calendar-widget.scss b/ui/app/styles/components/calendar-widget.scss index 258fcf9bdc..d7db945638 100644 --- a/ui/app/styles/components/calendar-widget.scss +++ b/ui/app/styles/components/calendar-widget.scss @@ -32,30 +32,6 @@ $dark-gray: #535f73; .calendar-widget { grid-area: calendar-widget; - - > button { - &.is-month-list { - background-color: $white; - color: black; - text-align: center; - border: $light-border; - border-radius: $radius; - } - &.is-current-month { - border: 1px solid $ui-gray-900; - } - &:hover { - background-color: lighten($dark-gray, 30%); - color: $white; - text-align: center; - cursor: pointer; - } - &.is-readOnly { - background-color: $ui-gray-100; - color: lighten($dark-gray, 30%); - pointer-events: none; - } - } } .border-col { @@ -84,15 +60,6 @@ $dark-gray: #535f73; } // for modal-dialog tooltips -.calendar-tooltip { - background-color: $ui-gray-700; - color: $white; - font-size: $size-8; - padding: $spacing-10; - border-radius: $radius-large; - width: 141px; -} - .ember-modal-dialog { z-index: 1000; } diff --git a/ui/app/styles/components/console-ui-panel.scss b/ui/app/styles/components/console-ui-panel.scss index 2342969ec8..ed4b420ef5 100644 --- a/ui/app/styles/components/console-ui-panel.scss +++ b/ui/app/styles/components/console-ui-panel.scss @@ -50,6 +50,10 @@ $console-close-height: 35px; margin-left: $spacing-20; padding: $spacing-12 $spacing-20; } + + .console-ui-panel-intro { + color: var(--token-color-palette-neutral-400); + } } .console-ui-input { @@ -83,6 +87,7 @@ $console-close-height: 35px; padding-right: $spacing-36; position: relative; background-color: rgba(#000, 0); + color: var(--token-color-palette-neutral-400); &:hover { background-color: rgba(#000, 0.5); } @@ -91,12 +96,24 @@ $console-close-height: 35px; .console-ui-alert { margin-left: calc(#{$spacing-20} - 0.33rem); position: relative; + color: var(--token-color-palette-neutral-400); svg { position: absolute; left: 0; top: 0; } + + &.console-ui-alert--error { + // HDS tokens are not light enough on the dark background to pass a11y tests. + // hex value for --token-color-foreground-critical + color: lighten(#e52228, 20%); + } + &.console-ui-alert--success { + // HDS tokens are not light enough on the dark background to pass a11y tests. + // hex value for --token-color-foreground-success + color: lighten(#008a22, 20%); + } } .panel-open .console-ui-panel { diff --git a/ui/app/styles/components/doc-link.scss b/ui/app/styles/components/doc-link.scss index 20edb9d62d..8629ee56a6 100644 --- a/ui/app/styles/components/doc-link.scss +++ b/ui/app/styles/components/doc-link.scss @@ -5,7 +5,6 @@ .doc-link { color: $blue; - text-decoration: none; font-weight: $font-weight-semibold; &:hover { text-decoration: underline !important; diff --git a/ui/app/styles/components/empty-state-component.scss b/ui/app/styles/components/empty-state-component.scss index abac11593b..dce11b29e4 100644 --- a/ui/app/styles/components/empty-state-component.scss +++ b/ui/app/styles/components/empty-state-component.scss @@ -5,8 +5,8 @@ .empty-state { align-items: center; - color: $grey; - background: $ui-gray-010; + color: var(--token-color-foreground-faint); + background: var(--token-color-surface-faint); display: flex; justify-content: center; padding: $spacing-48 $spacing-12; @@ -15,7 +15,7 @@ .empty-state-transparent { align-items: center; - color: $grey; + color: var(--token-color-foreground-faint); background: transparent; display: flex; justify-content: center; @@ -50,12 +50,6 @@ display: flex; justify-content: space-between; - a, - .link, - a:not(.button):not(.file-delete-button):not(.tag) { - text-decoration: none; - } - > * + * { margin-left: $spacing-12; margin-right: $spacing-12; diff --git a/ui/app/styles/components/masked-input.scss b/ui/app/styles/components/masked-input.scss index 5edd649e4d..12987d0574 100644 --- a/ui/app/styles/components/masked-input.scss +++ b/ui/app/styles/components/masked-input.scss @@ -3,8 +3,9 @@ * SPDX-License-Identifier: BUSL-1.1 */ -.masked-font { - color: $ui-gray-300; +.masked-font, +pre.masked-font { + color: var(--token-color-foreground-faint); } .masked-input { @@ -84,7 +85,7 @@ } .masked-input.masked .masked-value { - color: $grey-light; + color: var(--token-color-foreground-faint); } .masked-input .input:focus + .masked-input-toggle { diff --git a/ui/app/styles/components/radio-card.scss b/ui/app/styles/components/radio-card.scss index d6b9c11138..b335ebb6ef 100644 --- a/ui/app/styles/components/radio-card.scss +++ b/ui/app/styles/components/radio-card.scss @@ -83,7 +83,7 @@ } .radio-card-message-body { line-height: 1.2; - color: $ui-gray-500; + color: var(--token-color-foreground-faint); font-size: $size-8; } diff --git a/ui/app/styles/components/search-select.scss b/ui/app/styles/components/search-select.scss index 3e49c01b69..fe279671df 100644 --- a/ui/app/styles/components/search-select.scss +++ b/ui/app/styles/components/search-select.scss @@ -113,7 +113,7 @@ div > .ember-power-select-options { } .search-select-list-key { - color: $grey; + color: var(--token-color-foreground-faint); font-size: $size-8; } diff --git a/ui/app/styles/components/tool-tip.scss b/ui/app/styles/components/tool-tip.scss index d452b0d1b4..e77d90033e 100644 --- a/ui/app/styles/components/tool-tip.scss +++ b/ui/app/styles/components/tool-tip.scss @@ -7,21 +7,24 @@ font-size: $size-7; text-transform: none; margin: 8px 0px 0 -4px; + border: none; + border-radius: $radius-large; .box { position: relative; color: $white; max-width: 200px; - background: $grey; + background: $black; padding: 0.5rem; line-height: 1.4; + border-radius: $radius-large; } .fit-content { max-width: fit-content; } - @include css-top-arrow(8px, $grey, 1px, $grey-dark, 20px); + @include css-top-arrow(8px, $black, 1px, $black, 20px); &.ember-basic-dropdown-content--below.ember-basic-dropdown--transitioning-in { animation: drop-fade-above 0.15s; } @@ -53,17 +56,17 @@ } .ember-basic-dropdown-content--below.ember-basic-dropdown-content--left.tool-tip { - @include css-top-arrow(8px, $grey, 1px, $grey-dark, calc(100% - 20px)); + @include css-top-arrow(8px, $black, 1px, $black, calc(100% - 20px)); } .ember-basic-dropdown-content--below.ember-basic-dropdown-content--right.tool-tip { - @include css-top-arrow(8px, $grey, 1px, $grey-dark, calc(100% - 20px)); + @include css-top-arrow(8px, $black, 1px, $black, calc(100% - 20px)); } .ember-basic-dropdown-content--above.tool-tip { - @include css-bottom-arrow(8px, $grey, 1px, $grey-dark); + @include css-bottom-arrow(8px, $black, 1px, $black); margin-top: -8px; } .ember-basic-dropdown-content--above.ember-basic-dropdown-content--right.tool-tip { - @include css-bottom-arrow(8px, $grey, 1px, $grey-dark, calc(100% - 20px)); + @include css-bottom-arrow(8px, $black, 1px, $black, calc(100% - 20px)); } .b-checkbox .tool-tip-trigger { diff --git a/ui/app/styles/core/charts.scss b/ui/app/styles/core/charts.scss index ece1e4cab2..167d9f1125 100644 --- a/ui/app/styles/core/charts.scss +++ b/ui/app/styles/core/charts.scss @@ -250,7 +250,7 @@ p.data-details { } .chart-tooltip { - background-color: $ui-gray-700; + background-color: $black; color: white; font-size: $size-9; padding: 6px; @@ -282,7 +282,7 @@ p.data-details { height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; - border-top: 9px solid $ui-gray-700; + border-top: 9px solid $black; position: absolute; opacity: 0.8; bottom: -9px; diff --git a/ui/app/styles/core/element-styling.scss b/ui/app/styles/core/element-styling.scss index 383d3e2a7c..596523db17 100644 --- a/ui/app/styles/core/element-styling.scss +++ b/ui/app/styles/core/element-styling.scss @@ -33,7 +33,8 @@ h6 { a:hover, body, -pre, +// default set here is too dark for HDS codeblock +pre:not(.hds-code-block__code), strong, table th { color: $ui-gray-900; diff --git a/ui/app/styles/core/inputs.scss b/ui/app/styles/core/inputs.scss index 275200d7b7..e7982fd811 100644 --- a/ui/app/styles/core/inputs.scss +++ b/ui/app/styles/core/inputs.scss @@ -81,5 +81,5 @@ .input-hint { padding: 0 $spacing-10; font-size: $size-8; - color: $grey; + color: var(--token-color-foreground-faint); } diff --git a/ui/app/styles/core/json-diff-patch.scss b/ui/app/styles/core/json-diff-patch.scss index 3e472d9ddb..170926ff05 100644 --- a/ui/app/styles/core/json-diff-patch.scss +++ b/ui/app/styles/core/json-diff-patch.scss @@ -9,15 +9,23 @@ .jsondiffpatch-deleted pre, .jsondiffpatch-modified .jsondiffpatch-left-value pre, .jsondiffpatch-textdiff-deleted { - background: $red-500; + background: var(--token-color-foreground-critical-high-contrast); } .jsondiffpatch-added .jsondiffpatch-property-name, .jsondiffpatch-added .jsondiffpatch-value pre, .jsondiffpatch-modified .jsondiffpatch-right-value pre, .jsondiffpatch-textdiff-added { - background: $green-500; + background: var(--token-color-foreground-success-high-contrast); } .jsondiffpatch-property-name { color: $ui-gray-300; } + +.jsondiffpatch-added > .jsondiffpatch-property-name { + color: var(--token-color-surface-success); +} + +.jsondiffpatch-deleted > .jsondiffpatch-property-name { + color: var(--token-color-surface-critical); +} diff --git a/ui/app/styles/core/link.scss b/ui/app/styles/core/link.scss index 9382d51eef..efece782fc 100644 --- a/ui/app/styles/core/link.scss +++ b/ui/app/styles/core/link.scss @@ -21,7 +21,3 @@ cursor: default; } } -// NICE TO HAVE: replace all instances with helper "is-no-underline" -.link-plain { - text-decoration: none; -} diff --git a/ui/app/styles/core/tag.scss b/ui/app/styles/core/tag.scss index 4918d549ed..fd211e30b1 100644 --- a/ui/app/styles/core/tag.scss +++ b/ui/app/styles/core/tag.scss @@ -7,9 +7,10 @@ .tag:not(body) { align-items: center; - background-color: $ui-gray-100; + // same as HDS::Badge @color=neutral + background-color: var(--token-color-surface-strong); + color: var(--token-color-foreground-primary); border-radius: $radius; - color: $grey; display: inline-flex; font-size: $size-8; font-weight: $font-weight-normal; @@ -22,7 +23,7 @@ vertical-align: middle; code { - color: $grey; + color: var(--token-color-foreground-primary); } .icon { diff --git a/ui/app/styles/helper-classes/colors.scss b/ui/app/styles/helper-classes/colors.scss index 7f31e1df38..d505ef8b56 100644 --- a/ui/app/styles/helper-classes/colors.scss +++ b/ui/app/styles/helper-classes/colors.scss @@ -60,15 +60,11 @@ select.has-error-border, } .has-text-grey-light { - color: $ui-gray-300 !important; -} - -.has-text-grey-400 { - color: $ui-gray-400; + color: var(--token-color-foreground-faint) !important; } .has-text-grey { - color: $ui-gray-500 !important; + color: var(--token-color-foreground-faint) !important; } .has-text-grey-dark { @@ -92,7 +88,7 @@ select.has-error-border, } .has-text-success { - color: $green-500 !important; + color: var(--token-color-foreground-success) !important; } .has-text-highlight { diff --git a/ui/app/styles/helper-classes/typography.scss b/ui/app/styles/helper-classes/typography.scss index 2425adc375..4cde9b2d3c 100644 --- a/ui/app/styles/helper-classes/typography.scss +++ b/ui/app/styles/helper-classes/typography.scss @@ -3,7 +3,7 @@ * SPDX-License-Identifier: BUSL-1.1 */ -/* This helper includes styles relating to: font-size, font-family, font-alignment, text-transform, text-weight, font-style, text-decoration. +/* This helper includes styles relating to: font-size, font-family, font-alignment, text-transform, text-weight, font-style, text-decoration. * Deprecated, please use the HDS text component to style fonts https://helios.hashicorp.design/components/text */ // font size helpers @@ -101,7 +101,7 @@ } .sub-text { - color: $grey; + color: var(--token-color-foreground-faint); margin-bottom: $size-11; font-size: $size-8; diff --git a/ui/app/templates/components/auth-form.hbs b/ui/app/templates/components/auth-form.hbs index 8d06e36dcd..01ea4f760f 100644 --- a/ui/app/templates/components/auth-form.hbs +++ b/ui/app/templates/components/auth-form.hbs @@ -140,6 +140,7 @@ autocomplete="off" spellcheck="false" data-test-token={{true}} + id="token" />
diff --git a/ui/app/templates/components/auth-jwt.hbs b/ui/app/templates/components/auth-jwt.hbs index c58de16aba..5a8f2e2800 100644 --- a/ui/app/templates/components/auth-jwt.hbs +++ b/ui/app/templates/components/auth-jwt.hbs @@ -28,16 +28,17 @@ {{#unless this.isOIDC}}
- +
diff --git a/ui/app/templates/components/calendar-widget.hbs b/ui/app/templates/components/calendar-widget.hbs index 3fbbf964b1..cd428c422b 100644 --- a/ui/app/templates/components/calendar-widget.hbs +++ b/ui/app/templates/components/calendar-widget.hbs @@ -11,16 +11,14 @@ -