a11ytable

1.1.0 • Public • Published

a11ytable

This is a simple accessible hidden table to supplant charts for voice readers.

Usage

const data = [
  { "name":"Larry Wall", "age":57, "link": "<a href='http://www.wall.org/~larry/'>www.wall.org/~larry/</a>" },
  { "name":"Bill Gates", "age":56, "link": "<a href='http://www.microsoft.com'>www.microsoft.com</a>" },
  { "name":"Daffy Duck", "age":75, "link": "" }
];

const headers = { "name" : "User name", "age": "User age", "link": "Homepage" };
const table = new a11ytable({ headers, data });

document.getElementById('chart-hidden-table').innerHTML = table.render();

API

Table of Contents

a11ytable

This function takes header settings and data to generate a HTML table string.

Parameters

  • obj Object Generic es6 destructuring params.
    • obj.headers (optional, default [])
    • obj.data (optional, default [])
    • obj.caption (optional, default '')

Returns any An html table string.

Readme

Keywords

Package Sidebar

Install

npm i a11ytable

Weekly Downloads

1

Version

1.1.0

License

MIT

Unpacked Size

9.93 kB

Total Files

7

Last publish

Collaborators

  • kaysov