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

Add documentation regarding accessibility #5687

Closed
getsetgopi opened this issue Aug 14, 2018 · 1 comment · Fixed by #5719
Closed

Add documentation regarding accessibility #5687

getsetgopi opened this issue Aug 14, 2018 · 1 comment · Fixed by #5719

Comments

@getsetgopi
Copy link

Want to know if chart.js is 100% accessibility compliance. Supports level A and AA as per WCAG 2 standards.

@benmccann
Copy link
Contributor

You create the canvas element yourself and Chart.js populates it with content. When you create the canvas object you will need to do it in a way that is accessible. Two examples are below which are from http://pauljadam.com/demos/canvas.html:

Example 1:

<canvas id="chart" height="400" width="650" role="img" aria-label="Bar Chart Values in Millions from 0 to 12000. Human: 11000, Chimp: 6200, Dolphin: 5800, Cat: 300"> </canvas>

Example 2:

    <canvas id="can2" height="400" width="650">Text alternative for this canvas graphic is in the data table below.</canvas>
    <table border="0" cellpadding="5" summary="This is the text alternative for the canvas graphic.">
      <caption>
      Neurons in Cerebral Cortex
      </caption>
      <tbody>
        <tr>
          <th scope="col">Value</th>
          <th scope="col">Human</th>
          <th scope="col">Chimp</th>
          <th scope="col">Dolphin</th>
          <th scope="col">Cat</th>
        </tr>
        <tr>
          <th scope="row">Millions</th>
          <td>11000</td>
          <td>6200</td>
          <td>5800</td>
          <td>300</td>
        </tr>
      </tbody>
    </table>

We should add information about this to the documenation

@benmccann benmccann changed the title Accessibility support Add documentation regarding accessibility Aug 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants