Gathering detailed insights and metrics for @a-2-c-2-anpm/at-autem-vel
Gathering detailed insights and metrics for @a-2-c-2-anpm/at-autem-vel
npm install @a-2-c-2-anpm/at-autem-vel
Typescript
Module System
Node Version
NPM Version
58.1
Supply Chain
48.1
Quality
75.7
Maintenance
100
Vulnerability
100
License
JavaScript (100%)
Verify real, reachable, and deliverable emails with instant MX records, SMTP checks, and disposable email detection.
Total Downloads
146
Last Day
1
Last Week
2
Last Month
10
Last Year
146
MIT License
2,455 Commits
1 Watchers
1 Branches
1 Contributors
Updated on Mar 14, 2025
Latest Version
1.0.0
Package Id
@a-2-c-2-anpm/at-autem-vel@1.0.0
Unpacked Size
21.32 kB
Size
7.44 kB
File Count
8
NPM Version
10.5.0
Node Version
20.12.2
Published on
May 11, 2024
Cumulative downloads
Total Downloads
Last Day
0%
1
Compared to previous day
Last Week
100%
2
Compared to previous week
Last Month
-41.2%
10
Compared to previous month
Last Year
0%
146
Compared to previous year
30
Programmatic access to the WAI-ARIA 1.2 Roles Model. This package tracks the W3C Recommendation (last update: 6 June 2023).
CDN URL: https://unpkg.com/@a-2-c-2-anpm/at-autem-vel
src/etc
filesThe files under src/etc
are generated by the breakUpAriaJSON
script.
To change them, edit the file scripts/roles.json
then run:
1node ./scripts/breakUpAriaJSON.js 2git add scripts/roles.json src/etc
It should work with Node version 6.11.2 or later.
These methods are available on each export from the module. The typing here in the documentation is pseudo-typed. Each export will have its own specific types for each method signature.
1{| 2 entries: () => Array<$Item>, 3 get: (key: $Key) => ?$Value, 4 has: (key: $Key) => boolean, 5 keys: () => Array<$Key>, 6 values: () => Array<$Value>, 7|};
1import { roles } from '@a-2-c-2-anpm/at-autem-vel';
A map of role names to the role definition. For example:
1let alertRole = roles.get('alert'); 2/** 3 * Value of alertRole 4 * { 5 * "requiredProps": {}, 6 * "props": { 7 * "aria-atomic": "true", 8 * "aria-busy": null, 9 * "aria-controls": null, 10 * "aria-current": null, 11 * "aria-describedby": null, 12 * "aria-details": null, 13 * "aria-disabled": null, 14 * "aria-dropeffect": null, 15 * "aria-errormessage": null, 16 * "aria-expanded": null, 17 * "aria-flowto": null, 18 * "aria-grabbed": null, 19 * "aria-haspopup": null, 20 * "aria-hidden": null, 21 * "aria-invalid": null, 22 * "aria-keyshortcuts": null, 23 * "aria-label": null, 24 * "aria-labelledby": null, 25 * "aria-live": "assertive", 26 * "aria-owns": null, 27 * "aria-relevant": null, 28 * "aria-roledescription": null 29 * }, 30 * "abstract": false, 31 * "childrenPresentational": false, 32 * "baseConcepts": [], 33 * "relatedConcepts": [ { 34 * "module": "XForms", 35 * "concept": { 36 * "name": "alert" 37 * } 38 * }], 39 * "superClass": [["roletype", "structure", "section"]] 40 * }
1import { elementRoles } from '@a-2-c-2-anpm/at-autem-vel';
HTML Elements with inherent roles are mapped to those roles. In the case of an element like <input>
, the element often requires a type
attribute to map to an ARIA role.
1[ 2 [ '{"name": "article"}', [ 'article' ] ], 3 [ '{"name": "button"}', [ 'button' ] ], 4 [ '{"name": "td"}', [ 'cell', 'gridcell' ] ], 5 [ '{"name": "input", "attributes": [ {"name": "type", "value": "checkbox"}] }', [ 'checkbox' ] ], 6 [ '{"name": "th"}', [ 'columnheader' ] ], 7 [ '{"name": "select"}', [ 'combobox', 'listbox' ] ], 8 [ '{"name": "menuitem"}', [ 'command', 'menuitem' ] ], 9 [ '{"name": "dd"}', [ 'definition' ] ], 10 [ '{"name": "figure"}', [ 'figure' ] ], 11 [ '{"name": "form"}', [ 'form' ] ], 12 [ '{"name": "table"}', [ 'grid', 'table' ] ], 13 [ '{"name": "fieldset"}', [ 'group' ] ], 14 [ '{"name": "h1"}', [ 'heading' ] ], 15 [ '{"name": "h2"}', [ 'heading' ] ], 16 [ '{"name": "h3"}', [ 'heading' ] ], 17 [ '{"name": "h4"}', [ 'heading' ] ], 18 [ '{"name": "h5"}', [ 'heading' ] ], 19 [ '{"name": "h6"}', [ 'heading' ] ], 20 [ '{"name": "img"}', [ 'img' ] ], 21 [ '{"name": "a"}', [ 'link' ] ], 22 [ '{"name": "link"}', [ 'link' ] ], 23 [ '{"name": "ol"}', [ 'list' ] ], 24 [ '{"name": "ul"}', [ 'list' ] ], 25 [ '{"name": "li"}', [ 'listitem' ] ], 26 [ '{"name": "nav"}', [ 'navigation' ] ], 27 [ '{"name": "option"}', [ 'option' ] ], 28 [ '{"name": "input", "attributes": [ {"name": "type", "value": "radio"}] }', [ 'radio' ] ], 29 [ '{"name": "frame"}', [ 'region' ] ], 30 [ '{"name": "rel"}', [ 'roletype' ] ], 31 [ '{"name": "tr"}', [ 'row' ] ], 32 [ '{"name": "tbody"}', [ 'rowgroup' ] ], 33 [ '{"name": "tfoot"}', [ 'rowgroup' ] ], 34 [ '{"name": "thead"}', [ 'rowgroup' ] ], 35 [ '{"name": "th", "attributes": [ {"name": "scope", "value": "row"}] }', [ 'rowheader' ] ], 36 [ '{"name": "input", "attributes": [ {"name": "type", "value": "search"}] }', [ 'searchbox' ] ], 37 [ '{"name": "hr"}', [ 'separator' ] ], 38 [ '{"name": "dt"}', [ 'term' ] ], 39 [ '{"name": "dfn"}', [ 'term' ] ], 40 [ '{"name": "textarea"}', [ 'textbox' ] ], 41 [ '{"name": "input", "attributes": [ {"name": "type", "value": "text"}] }', [ 'textbox' ] ], 42]
The map of elements to roles is keyed by an HTML concept. An HTML concept corresponds to the baseConcepts
and relatedConcepts
of an ARIA role. Concepts exist in the context of a module
: HTML, XForms, Dublin Core, for example. The concept representation is an object literal with a name property (the element name) and an optional attributes array.
The roles are provided in a Set.
1import { roleElements } from '@a-2-c-2-anpm/at-autem-vel';
ARIA roles are mapped to the HTML Elements with the same inherent role. Some roles, such as columnheader
are only mapped to an HTML element that expresses specific attributes. In the case of <input>
, the element often requires a type
attribute to map to an ARIA role.
1[ 2 [ 'article', [ {"name": "article"} ] ], 3 [ 'button', [ {"name": "button"} ] ], 4 [ 'cell', [ {"name": "td"} ] ], 5 [ 'checkbox', [ {"name": "input", "attributes": [ {"name": "type", "value": "checkbox"}] } ] ], 6 [ 'columnheader', [ {"name": "th"} ] ], 7 [ 'combobox', [ {"name": "select"} ] ], 8 [ 'command', [ {"name": "menuitem"} ] ], 9 [ 'definition', [ {"name": "dd"}', '{"name": "dfn"} ] ], 10 [ 'figure', [ {"name": "figure"} ] ], 11 [ 'form', [ {"name": "form"} ] ], 12 [ 'grid', [ {"name": "table"} ] ], 13 [ 'gridcell', [ {"name": "td"} ] ], 14 [ 'group', [ {"name": "fieldset"} ] ], 15 [ 'heading', [ {"name": "h1"}', '{"name": "h2"}', '{"name": "h3"}', '{"name": "h4"}', '{"name": "h5"}', '{"name": "h6"} ] ], 16 [ 'img', [ {"name": "img"} ] ], 17 [ 'link', [ {"name": "a"}', '{"name": "link"} ] ], 18 [ 'list', [ {"name": "ol"}', '{"name": "ul"} ] ], 19 [ 'listbox', [ {"name": "select"} ] ], 20 [ 'listitem', [ {"name": "li"} ] ], 21 [ 'menuitem', [ {"name": "menuitem"} ] ], 22 [ 'navigation', [ {"name": "nav"} ] ], 23 [ 'option', [ {"name": "option"} ] ], 24 [ 'radio', [ {"name": "input", "attributes": [ {"name": "type", "value": "radio"}] } ] ], 25 [ 'region', [ {"name": "frame"} ] ], 26 [ 'roletype', [ {"name": "rel"} ] ], 27 [ 'row', [ {"name": "tr"} ] ], 28 [ 'rowgroup', [ {"name": "tbody"}', '{"name": "tfoot"}', '{"name": "thead"} ] ], 29 [ 'rowheader', [ {"name": "th", "attributes": [ {"name": "scope", "value": "row"}] }, {"name": "th", "attributes": [ {"name": "scope", "value": "rowgroup"}] } ] ], 30 [ 'searchbox', [ {"name": "input", "attributes": [ {"name": "type", "value": "search"}] } ] ], 31 [ 'separator', [ {"name": "hr"} ] ], 32 [ 'table', [ {"name": "table"} ] ], 33 [ 'term', [ {"name": "dt"} ] ], 34 [ 'textbox', [ {"name": "textarea"}', '{"name": "input", "attributes": [ {"name": "type", "value": "text"}] } ] ], 35]
Copyright (c) 2021 A11yance
No vulnerabilities found.
No security vulnerabilities found.