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

[Lens] Add a11y test suite #88623

Merged
merged 8 commits into from
Jan 20, 2021
Merged

[Lens] Add a11y test suite #88623

merged 8 commits into from
Jan 20, 2021

Conversation

dej611
Copy link
Contributor

@dej611 dej611 commented Jan 18, 2021

Summary

Fixes #83594 and #88806

This PR introduces the first set of Lens a11y test suite.

TODO:

  • Test Lens home
  • Test Lens dimension panel
  • Test Lens with chart configured
  • Test Lens saved panel
  • Test all visualization charts
  • Text multi layer XY chart
    • Currently skipped due to a dependency issue that needs to be addressed

Checklist

@dej611 dej611 added Team:Visualizations Visualization editors, elastic-charts and infrastructure v8.0.0 release_note:skip Skip the PR/issue when compiling release notes Feature:Lens v7.12.0 labels Jan 18, 2021
@@ -171,7 +171,11 @@ export function ReorderProvider({
<EuiPortal>
<EuiScreenReaderOnly>
<div>
<p id="lnsDragDrop-reorderAnnouncement" aria-live="assertive" aria-atomic={true}>
<p
id={`lnsDragDrop-reorderAnnouncement-${id}`}
Copy link
Contributor

Choose a reason for hiding this comment

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

2 things here:

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Looking at the debug page for the failure, there's effectively a duplication of divs, hence the id duplication.
Removing the id from the div will certainly fix the test, but there's still a problem with having twice as much divs with the same content on the page. I'll try to fix this as well.

Copy link
Contributor

@flash1293 flash1293 left a comment

Choose a reason for hiding this comment

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

Hey, pretty cool to have these around and extra cool they found issues already :) I'm afraid we need to find another workaround for the duplicated id issue because we rely on them for a11y

{state.keyboardReorderMessage}
</p>
<p id={`lnsDragDrop-reorderInstructions-${id}`}>
Copy link
Contributor

Choose a reason for hiding this comment

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

We can't merge this because this id is referenced from the buttons:

aria-describedby={`lnsDragDrop-reorderInstructions-${groupId}`}

We need it to tie the message and the button together

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry, I thought I searched for it, but maybe I was wrong with the other one. Will reintroduce it back! 👍

@dej611
Copy link
Contributor Author

dej611 commented Jan 20, 2021

@elasticmachine merge upstream

@dej611
Copy link
Contributor Author

dej611 commented Jan 20, 2021

@elasticmachine merge upstream

@dej611 dej611 marked this pull request as ready for review January 20, 2021 13:23
@dej611 dej611 requested a review from a team January 20, 2021 13:23
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app (Team:KibanaApp)

Copy link
Contributor

@flash1293 flash1293 left a comment

Choose a reason for hiding this comment

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

Code LGTM once green, didn't test again

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
lens 1.1MB 1.1MB -16.0B

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
lens 54.0KB 54.1KB +62.0B

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@dej611 dej611 merged commit 7297cc3 into elastic:master Jan 20, 2021
@dej611 dej611 deleted the lens/a11y-tests branch January 20, 2021 15:45
dej611 added a commit to dej611/kibana that referenced this pull request Jan 20, 2021
* ✅ Add a11y test suite for Lens + some fixes

* 🔧 Removed unused ids

* 🐛 Fix component duplication via key prop

* :white_mark_check: Add more a11y tests

* ♻️ Restored back reorder id + fix multi layer duplicate ids

* 🐛 Fix elastic#88806

Co-authored-by: Kibana Machine <[email protected]>
dej611 added a commit that referenced this pull request Jan 20, 2021
* ✅ Add a11y test suite for Lens + some fixes

* 🔧 Removed unused ids

* 🐛 Fix component duplication via key prop

* :white_mark_check: Add more a11y tests

* ♻️ Restored back reorder id + fix multi layer duplicate ids

* 🐛 Fix #88806

Co-authored-by: Kibana Machine <[email protected]>

Co-authored-by: Kibana Machine <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Lens release_note:skip Skip the PR/issue when compiling release notes Team:Visualizations Visualization editors, elastic-charts and infrastructure v7.12.0 v8.0.0
Projects
None yet
4 participants