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

docs(elastic charts docs): elastic-chart a11y features into eui docs #4916

Merged
merged 38 commits into from
Jul 22, 2021

Conversation

rshen91
Copy link
Contributor

@rshen91 rshen91 commented Jun 23, 2021

Summary

Closes #4875
Updating the accessibility improvements in the elastic-charts section in the EUI docs.

Checklist

  • Added updated documentation for the elastic-charts accessibility improvements

@rshen91 rshen91 added accessibility documentation Issues or PRs that only affect documentation - will not need changelog entries Elastic Charts labels Jun 23, 2021
@rshen91 rshen91 changed the title feat(documentation):initial commit for elastic-chart a11y improvements feat(elastic charts docs):initial commit for elastic-chart a11y improvements Jun 23, 2021
@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_4916/

@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_4916/

@rshen91 rshen91 changed the title feat(elastic charts docs):initial commit for elastic-chart a11y improvements feat(elastic charts docs): elastic-chart a11y features into eui docs Jun 24, 2021
@rshen91 rshen91 changed the title feat(elastic charts docs): elastic-chart a11y features into eui docs docs(elastic charts docs): elastic-chart a11y features into eui docs Jun 24, 2021
@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_4916/

@rshen91 rshen91 requested a review from myasonik June 24, 2021 18:37
@rshen91 rshen91 marked this pull request as ready for review June 24, 2021 18:37
@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_4916/

@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_4916/

@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_4916/

Copy link
Contributor

@myasonik myasonik left a comment

Choose a reason for hiding this comment

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

Thanks for getting these started!

@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_4916/

@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_4916/

@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_4916/

@myasonik
Copy link
Contributor

@rshen91 Do you want to add goal chart docs to this PR or a follow up?

@rshen91
Copy link
Contributor Author

rshen91 commented Jun 30, 2021

@rshen91 Do you want to add goal chart docs to this PR or a follow up?

Oh good call - I can definitely add the goal improvement changes. 🙌🏻

@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_4916/

@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_4916/

@rshen91 rshen91 requested a review from elizabetdev July 16, 2021 17:43
@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_4916/

@elizabetdev
Copy link
Contributor

Thanks for merging rshen91#3. The idea of the PR is to have the hidden content examples outside of the demo table:

docs@2x

Another thing that I noticed is in dark mode some demo elements don't have enough contrast. I think once we fix this from a design perspective we're good to merge.

Screenshot 2021-07-19 at 17 54 06

Screenshot 2021-07-19 at 17 53 57

return (
<Fragment>
<EuiTitle size="xs">
<h3 id={id}>Example chart with texture fills</h3>
Copy link
Contributor

Choose a reason for hiding this comment

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

For consistency with the other demos, we should center this title.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch thank you! 40fed7f
Unfortunately, the bullet graph doesn't yet have a linkLabels way to change the text color (like with partitions where you can set the linkLabels). It's on our roadmap for when the bullet graph moves out of alpha. Thanks!

@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_4916/

@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_4916/

@rshen91 rshen91 requested a review from elizabetdev July 19, 2021 23:02
@elizabetdev
Copy link
Contributor

Thanks for 40fed7f. 😄

But I'm still seeing this chart with dark text. The text should be lighter:

Screenshot 2021-07-21 at 15 25 11

And for this one, the outer labels and lines should be lighter too:

Screenshot 2021-07-21 at 15 25 03

@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_4916/

@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_4916/

@elizabetdev
Copy link
Contributor

@rshen91 I was trying to figure out the color issue we're having with the pie charts and the link labels.

It seems that the issue was originated here #3669 when the elastic-charts was updated to version 19.6.3:

Frame 2@2x

To provide an example. If I pass the following colors:

partition: {
  linkLabel: {
    textColor: 'yellow',
  },
  sectorLineStroke: 'red',
}

This is what I get:

Screenshot 2021-07-22 at 18 07 44

If I pass white to the sectorLineStroke:

partition: {
  linkLabel: {
    textColor: 'yellow',
  },
  sectorLineStroke: 'white',
}

The pointing lines get black. I was expecting them to get white. Same behavior as when I passed red:

Screenshot 2021-07-22 at 18 13 45

Ideally, the pointing lines should match the linkLabel.textColor. As they were before the update.

I also noticed another issue. If we pass the euiColorFullShade to linkLabel.textColor I was expecting to get white in dark mode and black in light mode.

partition: {
  linkLabel: {
    textColor: colors.euiColorFullShade.rgba,
  }
}

In light mode it works. But in dark mode this is what I get (the expected black is transformed in white):

Screenshot 2021-07-22 at 18 21 28

I'll open an issue in the elastic-charts repo to fix this and for now I think this is the best compromise:

Screenshot 2021-07-22 at 17 54 13

Bullet graph

bullet graph doesn't yet have a linkLabels way to change the text color

So I added a background that doesn't adapt the color to light/dark theme. And removed the code for adapting the theme. It was not doing anything because the chart doesn't accept it.

Frame 4@2x

So I think we're good to merge the PR. 🎉

Copy link
Contributor

@elizabetdev elizabetdev left a comment

Choose a reason for hiding this comment

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

Thanks @rshen91 for all the work and changes! LGTM! 🎉

Tested in Chrome, Safari, Edge and Firefox. I also looked at the code. We had some design limitations described here: #4916 (comment). But for now, this is the best we can do. 😄

@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_4916/

@rshen91 rshen91 merged commit c2d1882 into elastic:master Jul 22, 2021
@rshen91 rshen91 deleted the a11y-docs branch July 22, 2021 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accessibility documentation Issues or PRs that only affect documentation - will not need changelog entries Elastic Charts skip-changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Charts] a11y documentation
4 participants