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

fix: enable accessibility for charts #560

Merged
merged 3 commits into from
Feb 17, 2021

Conversation

tulioag
Copy link
Contributor

@tulioag tulioag commented Jan 14, 2021

Migrated PR #558 to the repo so tests can run.

related to #474

Workaround mentioned (highcharts/highcharts#13482) was already fixed in 8.1.1 (https://www.highcharts.com/blog/changelog/).

Vaadin-charts already depend on 8.1.2.

Copy link
Member

@web-padawan web-padawan left a comment

Choose a reason for hiding this comment

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

The PR needs the following to make tests pass:

  1. Add the CSS for markers based on Improved fix for #13482, forced markers in styled mode. highcharts/highcharts#13563
.highcharts-a11y-markers-hidden .highcharts-point:not(.highcharts-point-hover):not(.highcharts-a11y-marker-visible),
.highcharts-a11y-marker-hidden {
    opacity: 0;
}
  1. Update markersVisible helper to take opacity into account:
    function markersVisible(container) {
      return Array.from(container.querySelectorAll('.highcharts-markers')).every((g) => {
        return Boolean(g.firstChild && getComputedStyle(g.firstChild).opacity !== '0');
      });
    }

@tulioag
Copy link
Contributor Author

tulioag commented Feb 17, 2021

@web-padawan I made the changes you requested

@web-padawan web-padawan merged commit 2627b4f into master Feb 17, 2021
@web-padawan web-padawan deleted the fix/remove_workaround_highcharts_13494 branch February 17, 2021 11:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants