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] fix focus on legend action popovers #115066

Merged
merged 17 commits into from
Nov 8, 2021
Merged

Conversation

rshen91
Copy link
Contributor

@rshen91 rshen91 commented Oct 14, 2021

Summary

Focus is returned to the legend item once closing a popover in Lens and on a dashboard.

This fix is related to elastic/elastic-charts#1266 for issues with focus after closing the popover in visualizations.

AFTER

Oct-14-2021.11-49-27.mp4

BEFORE

Oct-12-2021.10-32-10.mp4

Checklist

Delete any items that are not applicable to this PR.

Risk Matrix

Delete this section if it is not applicable to this PR.

Before closing this PR, invite QA, stakeholders, and other developers to identify risks that should be tested prior to the change/feature release.

When forming the risk matrix, consider some of the following examples and how they may potentially impact the change:

Risk Probability Severity Mitigation/Notes
Multiple Spaces—unexpected behavior in non-default Kibana Space. Low High Integration tests will verify that all features are still supported in non-default Kibana Space and when user switches between spaces.
Multiple nodes—Elasticsearch polling might have race conditions when multiple Kibana nodes are polling for the same tasks. High Low Tasks are idempotent, so executing them multiple times will not result in logical error, but will degrade performance. To test for this case we add plenty of unit tests around this logic and document manual testing procedure.
Code should gracefully handle cases when feature X or plugin Y are disabled. Medium High Unit tests will verify that any feature flag or plugin combination still results in our service operational.
See more potential risk examples

For maintainers

@rshen91
Copy link
Contributor Author

rshen91 commented Oct 15, 2021

@elasticmachine merge upstream

@rshen91 rshen91 marked this pull request as ready for review October 15, 2021 18:01
@rshen91 rshen91 requested a review from a team as a code owner October 15, 2021 18:01
@rshen91 rshen91 added 7.16 candidate accessibility: focus Accessibility focus management labels Oct 15, 2021
@rshen91 rshen91 changed the title [7.x][Lens]fix focus on legend action popovers [Lens]fix focus on legend action popovers Oct 15, 2021
@rshen91
Copy link
Contributor Author

rshen91 commented Oct 15, 2021

@elasticmachine merge upstream

@rshen91
Copy link
Contributor Author

rshen91 commented Oct 18, 2021

@elasticmachine merge upstream

@rshen91
Copy link
Contributor Author

rshen91 commented Oct 20, 2021

@elasticmachine merge upstream

@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.0MB 1.0MB +182.0B
visTypePie 51.1KB 51.3KB +182.0B
visTypeXy 61.7KB 61.9KB +182.0B
total +546.0B

History

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

@rshen91
Copy link
Contributor Author

rshen91 commented Oct 25, 2021

@elasticmachine merge upstream

@rshen91
Copy link
Contributor Author

rshen91 commented Oct 26, 2021

Fix changed in elastic/elastic-charts#1423 - waiting for an elastic charts and will update this PR accordingly thanks

@rshen91 rshen91 marked this pull request as draft October 26, 2021 21:46
@rshen91
Copy link
Contributor Author

rshen91 commented Oct 28, 2021

Charts release 38.1.1 includes the accessibility improvements!

@rshen91
Copy link
Contributor Author

rshen91 commented Oct 29, 2021

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

merge conflict between base and head

@nickofthyme
Copy link
Contributor

@elasticmachine merge upstream

@rshen91
Copy link
Contributor Author

rshen91 commented Nov 8, 2021

@elasticmachine merge upstream

@nickofthyme
Copy link
Contributor

@elastic/kibana-vis-editors could we get a CO review here? Thanks! 🙏

@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 947.7KB 947.7KB +46.0B
visTypePie 50.2KB 50.2KB +46.0B
visTypeXy 59.6KB 59.7KB +46.0B
total +138.0B

History

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

@mbondyra
Copy link
Contributor

mbondyra commented Nov 8, 2021

The solution works fine, but there's one more case it gets lost.

  1. Create a chart with a legend.
  2. Tab to the legend item and open action popover
  3. enter on 'filter out value' and confirm
  4. The focus comes back to the beginning of the page because the legend items changed.

I think the improvement would be to place the focus before or after the legend, unless there's a better option?

Nov-08-2021.17-15-49.mp4

I'll approve this PR because maybe it's better to take care of the other problem separately.

@rshen91 rshen91 merged commit 0c60ccc into elastic:main Nov 8, 2021
@rshen91 rshen91 deleted the a11y-popover branch November 8, 2021 16:54
@kibanamachine kibanamachine added the backport missing Added to PRs automatically when the are determined to be missing a backport. label Nov 10, 2021
@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create backports run node scripts/backport --pr 115066 or prevent reminders by adding the backport:skip label.

@rshen91 rshen91 added the v8.0.0 label Nov 10, 2021
rshen91 added a commit to rshen91/kibana that referenced this pull request Nov 10, 2021
@kibanamachine kibanamachine removed the backport missing Added to PRs automatically when the are determined to be missing a backport. label Nov 10, 2021
@timroes timroes added Feature:Lens Team:Visualizations Visualization editors, elastic-charts and infrastructure labels Nov 30, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-vis-editors @elastic/kibana-vis-editors-external (Team:VisEditors)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accessibility: focus Accessibility focus management Feature:Lens release_note:fix Team:Visualizations Visualization editors, elastic-charts and infrastructure v8.0.0 v8.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants