Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Nov 1, 2021
1 parent e8a221f commit f5d72ba
Showing 1 changed file with 82 additions and 6 deletions.
88 changes: 82 additions & 6 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,55 @@
[![Downloads][downloads-badge]][downloads]
[![Size][size-badge]][size]

List of attributes defined by [ARIA][spec].
List of [ARIA][spec] attributes.

## Install
## Contents

* [What is this?](#what-is-this)
* [When should I use this?](#when-should-i-use-this)
* [Install](#install)
* [Use](#use)
* [API](#api)
* [`ariaAttributes`](#ariaattributes)
* [Types](#types)
* [Compatibility](#compatibility)
* [Security](#security)
* [Related](#related)
* [Contribute](#contribute)
* [License](#license)

## What is this?

This is a list of all ARIA attributes.

This package is ESM only: Node 12+ is needed to use it and it must be `import`ed
instead of `require`d.
## When should I use this?

You can use this list if you want to know which attributes are known ARIA
attributes.

## Install

[npm][]:
This package is [ESM only][esm].
In Node.js (version 12.20+, 14.14+, or 16.0+), install with [npm][]:

```sh
npm install aria-attributes
```

In Deno with [Skypack][]:

```js
import {ariaAttributes} from 'https://cdn.skypack.dev/aria-attributes@2?dts'
```

In browsers with [Skypack][]:

```html
<script type="module">
import {ariaAttributes} from 'https://cdn.skypack.dev/aria-attributes@2?min'
</script>
```

## Use

```js
Expand Down Expand Up @@ -49,7 +85,39 @@ There is no default export.

### `ariaAttributes`

`Array.<string>` — List of lowercase dash-cased attributes (including `role`).
List of lowercase attributes including `role` (`Array.<string>`).

## Types

This package is fully typed with [TypeScript][].

## Compatibility

This package is at least compatible with all maintained versions of Node.js.
As of now, that is Node.js 12.20+, 14.14+, and 16.0+.
It also works in Deno and modern browsers.

## Security

This package is safe.

## Related

* [`wooorm/html-tag-names`](https://github.com/wooorm/html-tag-names)
— list of HTML tag names
* [`wooorm/mathml-tag-names`](https://github.com/wooorm/mathml-tag-names)
— list of MathML tag names
* [`wooorm/svg-tag-names`](https://github.com/wooorm/svg-tag-names)
— list of SVG tag names
* [`wooorm/svg-element-attributes`](https://github.com/wooorm/svg-element-attributes)
— map of SVG elements to attributes
* [`wooorm/html-element-attributes`](https://github.com/wooorm/html-element-attributes)
— map of HTML elements to attributes

## Contribute

Yes please!
See [How to Contribute to Open Source][contribute].

## License

Expand All @@ -75,8 +143,16 @@ There is no default export.

[npm]: https://docs.npmjs.com/cli/install

[skypack]: https://www.skypack.dev

[license]: license

[author]: https://wooorm.com

[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c

[typescript]: https://www.typescriptlang.org

[contribute]: https://opensource.guide/how-to-contribute/

[spec]: https://www.w3.org/TR/wai-aria/

0 comments on commit f5d72ba

Please sign in to comment.