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

a11y issues reported by storybook for SimpleBarChart #1520

Open
pbojinov opened this issue Apr 11, 2023 · 0 comments
Open

a11y issues reported by storybook for SimpleBarChart #1520

pbojinov opened this issue Apr 11, 2023 · 0 comments

Comments

@pbojinov
Copy link
Member

Bug summary

We created a story for a basic metric card container with a SimpleBarChart and noticed we are getting a11y errors from storybook a11y addon.

      <SimpleBarChart data={series} theme="Light" showLegend={false} />

Error in build: https://buildkite.com/shopify/web-storybook-builder/builds/212649#018771a2-746d-4fb7-bf01-3cde8ab3b8a6/31-127

- Story ID: sections-analytics-overviewdashboardnext-components-stories-metriccard--bar-chart
--
  | Error: Certain ARIA roles must contain particular children (aria-required-children)
  | Affected node(s):
  | <svg viewBox="0 0 328 200" xmlns="http://www.w3.org/2000/svg" width="328" height="200" class="_SVG_1l95c_160" role="list">
  | <g data-color-vision-event-watch="true" data-color-vision-event-type="group" data-color-vision-event-index="0" data-type="BarGroup" data-index="0" aria-hidden="false" aria-label="Point of Sale: Top Sales By Channel 2987.29" role="list" class="_Group_16wtx_150" style="opacity: 1; transition: opacity 100ms ease 0s;">
  | <g data-color-vision-event-watch="true" data-color-vision-event-type="group" data-color-vision-event-index="1" data-type="BarGroup" data-index="1" aria-hidden="false" aria-label="Online Store: Top Sales By Channel 547.5" role="list" class="_Group_16wtx_150" style="opacity: 1; transition: opacity 100ms ease 0s;">
  | <g data-color-vision-event-watch="true" data-color-vision-event-type="group" data-color-vision-event-index="2" data-type="BarGroup" data-index="2" aria-hidden="false" aria-label="Facebook Marketplace: Top Sales By Channel 322.5" role="list" class="_Group_16wtx_150" style="opacity: 1; transition: opacity 100ms ease 0s;">
  | <g data-color-vision-event-watch="true" data-color-vision-event-type="group" data-color-vision-event-index="3" data-type="BarGroup" data-index="3" aria-hidden="false" aria-label="Instagram: Top Sales By Channel 299.89" role="list" class="_Group_16wtx_150" style="opacity: 1; transition: opacity 100ms ease 0s;">
  | <g data-color-vision-event-watch="true" data-color-vision-event-type="group" data-color-vision-event-index="4" data-type="BarGroup" data-index="4" aria-hidden="false" aria-label="Draft Orders: Top Sales By Channel 127.41" role="list" class="_Group_16wtx_150" style="opacity: 1; transition: opacity 100ms ease 0s;">
  | For help resolving this see: https://dequeuniversity.com/rules/axe/4.4/aria-required-children?application=axe-puppeteer
  | To re-run these tests run `yarn run storybook:a11y`
  | error Command failed with exit code 1.

image

It looks like it affects the horizontal bars.

image

Expected behavior

Accessibility errors shouldn't show up.

Actual behavior

Error: Certain ARIA roles must contain particular children (aria-required-children)

Steps to reproduce the problem

  1. Open up the MetricCard > Bar Chart story. (*Link coming shortly. My storybook broke)

Reduced test case

The best way to get your bug fixed is to provide a reduced test case. This CodeSandbox template is a great starting point.

Specifications

  • Polaris-Viz version number: 9.0.1
  • Browser: Chrome latest
  • Device: Desktop
  • Operating System: MacOS

Or run npx envinfo --system --binaries --browsers --npmPackages react,react-dom,@shopify/polaris-viz to provide specifications on your environment including version numbers, browser, device, and operating system.

Paste the results here:

  System:
    OS: Linux 5.10 Ubuntu 22.04.2 LTS 22.04.2 LTS (Jammy Jellyfish)
    CPU: (32) x64 Intel(R) Xeon(R) CPU @ 2.80GHz
    Memory: 176.86 GB / 251.90 GB
    Container: Yes
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 16.20.0 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 8.19.4 - /usr/local/bin/npm
    Watchman: 4.9.0 - /usr/bin/watchman
  npmPackages:
    @shopify/polaris-viz: 9.0.1 => 9.0.1 
    react: ^18.2.0 => 18.2.0 
    react-dom: ^18.2.0 => 18.2.0 
@pbojinov pbojinov added bug Something isn't working accessibility HorizontalBarChart and removed bug Something isn't working labels Apr 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant