-
Notifications
You must be signed in to change notification settings - Fork 139
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
Accessibility Guideline on Chart Color Usage Needs to be Added #4369
Comments
FYI. @mmenestr @mceledonia |
@heyethankim I agree that our documentation in this area is pretty weak. Is this something that you would be willing to help us with? |
I think there's definitely room for added color guidance in terms of when to use which color (ie: green for success, red for failure). But when it comes to accessibility issues, rather than advising the usage of different colors depending on the context (which could lead to confusion/inconsistency when it comes to "when" one should use green vs blue, for example) my suggestion would be to use other indicators on top of colors. That is to say, adding further details on top of color usage to show the data. Here are a few suggestions:
|
Yes, I agree. The PF template displays the second option ("adding more text in the chart"). I think we should add it to the PF chart section. The tricky part is that the visualization doesn't mean much for color blind people if we allow green/red color combination. I am looking into some more detail suggestions on the color combination. I found this and plan to verify it (also discuss with @jessiehuff). Color combinations to avoid for people with color blindness include: |
An initial findings were shared in the IxD meeting: |
Will discuss the followings with @mceledonia @dlabrecq
Reference |
@dlabrecq gave us a demo to @mceledonia and me today.
|
The PR below includes a link to live examples. |
|
The chart color themes do not contain any combination of red-green. In fact, the color themes don't use red at all. If you encounter a donut chart with red & green, it's likely someone overrode the default PatternFly colors. In that case, devs provide charts with a custom hex value (e.g., #8bc1f7), so we really don't know what colors are in use. Therefore, we probably couldn't apply a pattern (automatically) for red-green. Note that there are 3 main types of color blindness. In addition to red-green, there's blue-yellow, and complete color blindness. Designing a pattern for red-green only would be very limiting. It wouldn't address color weakness with blue-yellow, green-blue, and complete color blindness. Although red-green isn't in our theme, we definitely have more color combinations like green-blue, blue-yellow, etc. IMO, we should allow patterns to be enabled for the entire color scale. That is, in order to address accessibility for any color combination and complete color blindness. |
@dlabrecq Red/Green is being used across products because PF doesn't restrict a certain color combinations. Here are a few products that use Red/Green. As you can see the document above, we identified Red/Green is the most problematic color set. Hence, we are looking for a way to distinguish a certain color sets. That's how the texture (pattern) came to the picutre. |
I understand products are using red-green, but the examples above display custom colors. I'm trying to convey that PatternFly's chart themes don't contain this red-green combination, so we cannot apply a pattern automatically (i.e., only for this one, specific scenario). We do; however, have multi-color combinations of blue-yellow and green-blue color in our existing chart themes. It's important to note that these particular color combinations are also an accessibility issue, along with complete color blindness. Like you said, we don't restrict color combinations. I'm simply suggesting to be truly accessible, we should consider more than just red-green. |
The patterns were pulled from v3.0.3 of the script below, which uses the MIT license. |
@dlabrecq I totally agree. The issue is a bit complicated since there are many factors that don't accommodate for us. As I suggested, could we discuss what we could do in the short term? Since I brought up the issue, more products are using the Red/Green combination, which we wanted to avoid. Then we could discuss more robust solution in the long term without hurting 91.5% of customers. Here are a couple of suggestions: (1) Add guidelines that we should avoid a certain color combination - Red/Green, Green/Brown, etc. Since we cannot do (2), I guess (1) is the only tangible option? |
A developer can certainly apply patterns to specific colors, but it may be a manual process for custom color combinations, like red/green. That is, if we remove the ability for charts to apply patterns to any color. |
Wanted to capture the proposed guideline text from Slack post on May 31. Colorblind-friendly chart colors |
Here is the updated verbiage and, as we discussed, I think this should be added to "Colors for Charts." @mcarrano @dlabrecq @mceledonia ================ Colorblind-friendly chart colors Avoid using a red/green combination of colors in charts as the only distinguishing difference. People with color vision deficiency see both colors as brown. If they have severe conditions, both colors look like the same shade of brown. Here are additional color combinations to avoid: If you must use these combinations, you should consider two options as follows:
================= |
* feat(charts): Added support for patterns https://github.com/patternfly/patternfly-design/issues/1136 * chore(charts): added comments * chore(charts): updated pattern feature per code review feedback * chore(charts): added beta flag to patterns feature
@heyethankim Yes, the examples show how to create custom patterns using the SVG |
Chiming in as recommended to @heyethankim over Slack:
**If you’re wondering how colorblind people might see the charts, review Coblis, a colorblind simulator that tests against different color deficiency examples. Avoid the following additional color combinations: And: If you must use these combinations, consider the following options: Textures: Check out our accessibility chart page to learn more about how to apply textures. |
FYI, each chart component has it's own design section on patternfly.org. If you want to add guidelines related to a pie chart; for example, that page can be found here: Similarly, design guidelines for patterns would be located here: |
I agree that the first option is clearer. |
@mceledonia I presented your proposal during the PF design share meeting today. The response to the first option was positive. Some questions/concerns were:
|
@mcarrano The charts do utilize the PatternFly color variables. PatternFly defines chart variables as an ordered list, which is applied as the chart's color scale. Each color scale is associated with a theme; blue, yellow, multi-color, etc. Note that no color theme currently uses red and green together. (In fact, red does not appear anywhere in PF's chart color scales.) In order to use both colors together, a developer must provide custom colors to the chart. |
ACM chart color combination research (November 2022): |
Handle this as part of ongoing design guideline updates |
Requesting new features, enhancements, or design changes to PatternFly
Designers and engineers need to be better guided which color combination is best for users. For the "Alerts," we use green for success and red for failure but they are being used along with different icon sets and texts.
However, on the chart, there is a stark difference between Blue/Red and Green/Red in terms of accessibility.
According to the Color Blindness Simulator, the Red/Green color combination is weak for the chart. Although additional details could be provided on mouse hover, it may be a trivial task for color blind users to do it for every single data visualization.
This should be addressed in the "Colors for the Chart."
The text was updated successfully, but these errors were encountered: