aria-attributes
Advanced tools
Comparing version 2.0.0 to 2.0.1
@@ -1,1 +0,6 @@ | ||
export var ariaAttributes: string[] | ||
/** | ||
* List of ARIA attributes. | ||
* | ||
* @type {Array<string>} | ||
*/ | ||
export const ariaAttributes: Array<string> |
@@ -1,2 +0,7 @@ | ||
export var ariaAttributes = [ | ||
/** | ||
* List of ARIA attributes. | ||
* | ||
* @type {Array<string>} | ||
*/ | ||
export const ariaAttributes = [ | ||
'aria-activedescendant', | ||
@@ -3,0 +8,0 @@ 'aria-atomic', |
{ | ||
"name": "aria-attributes", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "List of ARIA attributes", | ||
@@ -33,3 +33,3 @@ "license": "MIT", | ||
"@types/hast": "^2.0.0", | ||
"@types/node": "^14.0.0", | ||
"@types/node": "^16.0.0", | ||
"@types/tape": "^4.0.0", | ||
@@ -39,7 +39,7 @@ "bail": "^2.0.0", | ||
"concat-stream": "^2.0.0", | ||
"hast-util-select": "^4.0.0", | ||
"hast-util-select": "^5.0.0", | ||
"prettier": "^2.0.0", | ||
"rehype-parse": "^7.0.0", | ||
"remark-cli": "^9.0.0", | ||
"remark-preset-wooorm": "^8.0.0", | ||
"rehype-parse": "^8.0.0", | ||
"remark-cli": "^10.0.0", | ||
"remark-preset-wooorm": "^9.0.0", | ||
"rimraf": "^3.0.0", | ||
@@ -49,13 +49,13 @@ "tape": "^5.0.0", | ||
"typescript": "^4.0.0", | ||
"unified": "^9.0.0", | ||
"xo": "^0.38.0" | ||
"unified": "^10.0.0", | ||
"xo": "^0.46.0" | ||
}, | ||
"scripts": { | ||
"prepack": "npm run build && npm run format", | ||
"generate": "node build", | ||
"prepublishOnly": "npm run build && npm run format", | ||
"build": "rimraf \"*.d.ts\" && tsc && type-coverage", | ||
"generate": "node build", | ||
"format": "remark . -qfo && prettier . -w --loglevel warn && xo --fix", | ||
"test-api": "node test.js", | ||
"test-coverage": "c8 --check-coverage --branches 100 --functions 100 --lines 100 --statements 100 --reporter lcov node test.js", | ||
"test": "npm run build && npm run format && npm run test-coverage" | ||
"test-api": "node --conditions development test.js", | ||
"test-coverage": "c8 --check-coverage --branches 100 --functions 100 --lines 100 --statements 100 --reporter lcov npm run test-api", | ||
"test": "npm run generate && npm run build && npm run format && npm run test-coverage" | ||
}, | ||
@@ -71,8 +71,3 @@ "prettier": { | ||
"xo": { | ||
"prettier": true, | ||
"rules": { | ||
"import/no-mutable-exports": "off", | ||
"no-var": "off", | ||
"prefer-arrow-callback": "off" | ||
} | ||
"prettier": true | ||
}, | ||
@@ -87,4 +82,5 @@ "remarkConfig": { | ||
"detail": true, | ||
"strict": true | ||
"strict": true, | ||
"ignoreCatch": true | ||
} | ||
} |
@@ -8,11 +8,33 @@ # aria-attributes | ||
List of attributes defined by [ARIA][spec]. | ||
List of [ARIA][spec] attributes. | ||
## 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. | ||
## When should I use this? | ||
You can use this list if you want to know which attributes are known ARIA | ||
attributes. | ||
## Install | ||
This package is ESM only: Node 12+ is needed to use it and it must be `import`ed | ||
instead of `require`d. | ||
This package is [ESM only][esm]. | ||
In Node.js (version 12.20+, 14.14+, or 16.0+), install with [npm][]: | ||
[npm][]: | ||
```sh | ||
@@ -22,2 +44,16 @@ 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 | ||
@@ -54,4 +90,36 @@ | ||
`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 | ||
@@ -81,2 +149,4 @@ | ||
[skypack]: https://www.skypack.dev | ||
[license]: license | ||
@@ -86,2 +156,8 @@ | ||
[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/ |
7966
62
159