Giter Club home page Giter Club logo

amcharts-accessibility-plugin's Introduction

PayPal accessibility logo

# amCharts Accessibility Plugin ## by the PayPal Accessibility Team See the [Authors](#authors) section below for more information.

What is it?

This plugin provides accessibility enhancements for a very versatile chart library from amCharts.com. Once applied, the plugin enables navigation for keyboard users and provides the necessary support for screen reader users.

Watch a screencast of the plugin in action or try the live demo below:

Demo of amCharts Accessibility Plugin

Installation instructions

Download the amCharts Accessibility Plugin from the amCharts Accessibility Plugin Github page and include it after the amCharts stock JavaScript on your site.

For example, here is the plugin called after amStock.js:

<script type="text/javascript" src="http://www.amcharts.com/lib/amstock.js"></script>
<script type="text/javascript" src="/js/amcharts-accessibility-plugin/plugins/amstock-acessibility.min.js"></script>

Keyboard interaction

After the plugin is applied to the amCharts code, the following keyboard navigation becomes possible:

  • When focused on the chart, the left and right arrow keys navigate between the data points of the chart. To aid the navigation, the cursor tooltip is shown when the arrow keys are pressed.
  • The Tab and Shift+Tab keys navigate between the chart, "Start Date" and "End Date" sliders that allow the user to control the date ranges for the chart.

Screen reader features

  • When navigating between the data points on the chart, the values on the x-axis and y-axis will be spoken.
  • A "start of chart" and "end of chart" messages will be spoken when the start and the end of chart data is reached.
  • When changing the values for the "start date" or the "end date" sliders, the values will be read as well.

Implementation notes

  • This plugin utilizes WAI-ARIA roles, states and properties to enable the meaningful spoken feedback for screen reader users.
  • The chart is a Div container with a role of application and aria-label and tabIndex of 0 in order to receive focus.
  • A status Div is used to announce the tooltip to screen reader users. It is hidden offscreen and aria-live is set to polite and aria-atomic is set to true.
  • The left slider is an SVG element which has aria-label, aria-valuemin, aria-valuemax, aria-valuetext and aria-valuenow.
  • The right slider is also an SVG element with aria-label, aria-valuemin, aria-valuemax, aria-valuetext and aria-valuenow.

Known issues

The slider functionality doesn't work in Firefox as there is a bug in this browser which prevents an SVG element inside an SVG document getting focused. See this issue for more information.

Feedback and Contributions

Please do not hesitate to open an issue or send a pull request if something doesn't work or you have ideas for improvement. For instructions on how to contribute to this project please read the contribution guide.

Copyright and license

Copyright 2014, eBay Software Foundation under the BSD license.

amcharts-accessibility-plugin's People

Contributors

mpnkhan avatar vick08 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.