This utility parses the ARIA in HTML specification and generates a Javascript Object representing the information in HTML Tage Name table in the specification. The object created is available as a JSON object or as a Javascript include file. Note the generator code has some exception clauses due to the complexity of some of the table rows in the specification. The exceptions need to be verified for any updates to the speficiation.
These steps assume you have both git
and node.js
installed on your computer.
git clone [email protected]:opena11y/aria-in-html-to-code.git
npm install
node run build
The following two files are created in the releases
directory:
The primary property in the Javascript Object is the elementInfo
object. The elementInfo
object uses the tag name as the key representing each row in the ARIA in HTML Specfication. The following table describes the possible properties of each key.
Property | Description |
---|---|
tagName |
tag name |
defaultRole |
The default ARIA role for the tag |
noRoleAllowed |
True if no other ARIA roles are allowed on the tag, otherwise false |
allowedRoles |
An array of allowed ARIA roles for the tag |
id |
Unique identifier for the row in the HTML Tag Name table, based on tag name and any required attributes |
attr1 |
Optional required attribute with an optional value |
attr2 |
Optional required attribute with an optional value |
- 1.1 Updates generated files to ARIA in HTML version 29 June 2023