Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI: Add a11y testing #24476

Merged
merged 16 commits into from Dec 18, 2023
Merged

UI: Add a11y testing #24476

merged 16 commits into from Dec 18, 2023

Conversation

hashishaw
Copy link
Collaborator

@hashishaw hashishaw commented Dec 11, 2023

This PR adds and enables the ember-a11y-testing addon for our tests, and fixes some of the violations. The a11y tests only run on integration tests, until we update our common rule violating components (user-menu, console-ui panel). All of the work was reviewed in separate, smaller PR's.

Some updates you might notice in the UI:

  • Better contrast on light text, and more consistency on text colors.
  • Links now have underlines (for conformance until we update everything to HDS)
  • New code snippets styling
  • Updated tooltip styling
  • Darker highlights in the JSON diff

Comparison screenshots (old left, new right)

not found empty state kv commands tooltip updated styling version-diff

@hashishaw hashishaw added the ui label Dec 11, 2023
@hashishaw hashishaw added this to the 1.16.0-rc1 milestone Dec 11, 2023
@github-actions github-actions bot added the hashicorp-contributed-pr If the PR is HashiCorp (i.e. not-community) contributed label Dec 11, 2023
@hashishaw hashishaw changed the title UI: Add a11y testing (sidebranch) UI: Add a11y testing Dec 12, 2023
import manifest from 'vault/config/asset-manifest';

preloadAssets(manifest).then(() => {
setup(QUnit.assert);
setApplication(Application.create(config.APP));
setupGlobalA11yHooks(() => true, {
helpers: ['render'],
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Setting the tests to run only on render until we fix some widespread issues so that they generally don't run on acceptance tests

ui/testem.js Outdated
@@ -6,7 +6,7 @@
'use strict';

module.exports = {
test_page: 'tests/index.html?hidepassed',
test_page: 'tests/index.html?hidepassed&enableA11yAudit=true',
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you ever want to run without the a11y tests just remove this query parameter

* aria-labels on nav tags, connect labels to input IDs

* add id to input on control group success

* add default label to maskedInput textarea

* final set of aria-labels in components

* fix labels: sidebar target, console input and max/min button, icon

* replace console max/min button tooltip with button title

* Remove splattributes from Select -- due to classic component, selector was showing up twice. Instead pass @ariaLabel explicitly to <Select>

* better labels on home link and list items

* more labels

* Add sr-only label to text-file for when uploadOnly
* update overview card and selectors

* fix heading-order violations in components (https://dequeuniversity.com/rules/axe/4.8/heading-order)

* fix list violations (https://dequeuniversity.com/rules/axe/4.8/list)

* Replace engine type icon tooltip with title

* Use HDS link with helper instead of DocLink component

* wrap PKI tab links in <li>

* Use standalone links on namespace empty state

* heading tags, li wrappers, underlined links

* Use Hds Text component

* doc links, empty state links have underlines

* Show flash message on tool action success
* update calendar-widget

* update console ui panel colors

* Update light grey on empty state, masked input, radio card, search select, tag, has-text-grey-light

* color updates: masked input, namespace picker, has-text-success, kv error page

* replace kv paths CodeSnippet with HDS version for better color contrast

* replace LDAP cli command CodeSnippet with HDS version for better color contrast

* update colors: mostly faint grey

* skip color contrast test on flaky popup acceptance tests

* test only color-contrast

* Revert "test only color-contrast"

This reverts commit 6eded7e.

* Update selectors for CodeBlock

* fix console colors

* Fixes -- masked input obscure color, unskip test, copy-secret-dropdown wrap alignment

* Update structure tooltip style to match HDS until full replacement is complete

* remove unused color class, set has-text-grey to foreground-faint token

* update selectors from sync

* color updates on json-diff-patch

* setRunOptions on tests

* small test updates

* set run option for niche control group scenario

* Replace all CodeSnippets
hashishaw and others added 3 commits December 15, 2023 12:30
* wrap ul links in li

* Update enableInput to be compliant

* Update filterInput to be compliant

* Remove superfluous qp value

* Final ul's without li's

* replace tooltip for icons on secret and auth mount lists

* documentation

* Make links consistently have underline and similar styling

* fix datetime formfield id

* fix link

* fix some tests

* small cleanup

* first four buttons

* Revert "first four buttons"

This reverts commit 72d0284.

* skip flaky tests

* add waitUntil

* skip tooltip test, text file updates and line chart update

---------

Co-authored-by: clairebontempo@gmail.com <clairebontempo@gmail.com>
@hashishaw hashishaw marked this pull request as ready for review December 18, 2023 15:40
@@ -21,7 +21,3 @@
cursor: default;
}
}
// NICE TO HAVE: replace all instances with helper "is-no-underline"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💙

Copy link

Build Results:
All builds succeeded! ✅

Copy link
Contributor

@Monkeychip Monkeychip left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked out the branch and poked around. Things look great. One non-blocking question. Nice work!!

@hashishaw hashishaw enabled auto-merge (squash) December 18, 2023 16:44
@hashishaw hashishaw merged commit 52c02ae into main Dec 18, 2023
69 checks passed
@hashishaw hashishaw deleted the ui/VAULT-22618/add-a11y-testing branch December 18, 2023 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hashicorp-contributed-pr If the PR is HashiCorp (i.e. not-community) contributed ui
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants