From 15111c93c0acd1cea025d3515f3208de80d8f550 Mon Sep 17 00:00:00 2001 From: Jesse Renee Beach Date: Mon, 20 Feb 2017 12:13:48 -0500 Subject: [PATCH 01/15] ARIA modules build correctly --- scripts/breakUpAriaJSON.js | 175 +++++ src/etc/dom.json | 20 +- src/etc/roles.json | 1256 ++++++++++++++++++++++++++++++------ 3 files changed, 1221 insertions(+), 230 deletions(-) create mode 100644 scripts/breakUpAriaJSON.js diff --git a/scripts/breakUpAriaJSON.js b/scripts/breakUpAriaJSON.js new file mode 100644 index 00000000..ec833eda --- /dev/null +++ b/scripts/breakUpAriaJSON.js @@ -0,0 +1,175 @@ +#!/usr/bin/env node --harmony + +const fs = require('fs'); +const path = require('path'); + +function getTypeof(value) { + return Array.isArray(value) + ? 'array' + : (value == null) + ? 'null' + : typeof value; +} + +function stringifyBoolean(value) { + return [(value) ? 'true' : 'false']; +} + +function stringifyArray(arr, depth) { + const output = []; + if (arr.length === 0) { + output.push('new Set([])'); + } else { + output.push('(new Set(['); + let tmp = []; + (new Set(arr)).forEach( + value => { + if (value != null) { + tmp.push(`${constructIndent(depth)}${triageValue(value, (depth))},`); + } + } + ); + output.push(tmp.join('\n')); + output.push(`${constructIndent(depth - 1)}]))`); + } + return output.join('\n'); +} + +function stringifyObject(value, depth) { + let output = []; + const keys = Object.keys(value); + if (keys.length === 0) { + output.push('(new Map([]))'); + } else { + output.push(`(new Map([`); + const tmp = []; + keys.forEach(key => { + tmp.push(`${constructIndent(depth)}['${key}', ${triageValue(value[key], (depth))}],`); + }); + output.push(tmp.join('\n')); + output.push(`${constructIndent(depth - 1)}]))`); + } + return output.join('\n'); +} + +function constructIndent(depth) { + return Array(depth).fill(' ').join(''); +} + +function triageValue(value, depth = 0) { + let output = []; + switch(getTypeof(value)) { + case 'object': + output = output.concat(stringifyObject(value, (depth + 1))); + break; + case 'array': + output = output.concat(stringifyArray(value, (depth + 1))); + break; + case 'boolean': + output = output.concat(stringifyBoolean(value, (depth + 1))); + break; + case 'string': + output = output.concat(`\'${value}\'`); + break; + default: + output.push('null'); + } + return output; +} + +fs.readFile(path.join('src/etc/roles.json'), { + encoding: 'utf8' +}, (error, data) => { + if (error) { + console.error(error); + process.exit(); + } + let aria = JSON.parse(data); + Object.keys(aria) + .forEach((name) => { + const nameArr = name.split('-'); + if (nameArr.length > 1) { + nameArr[1] = nameArr[1].slice(0, 1).toUpperCase() + + nameArr[1].slice(1); + } + const camelName = nameArr.join('') + 'Role'; + + const file = [ + `const ${camelName} = new Map([]);`, + '', + Object.keys(aria[name]) + .sort() + .filter((prop) => !['interactive'].includes(prop)) + .filter((prop) => { + // Create a set of all the props of the super classes. + if (prop === 'props') { + const inheritedProps = new Set([]); + let superClasses = aria[name]['superClass']; + while (superClasses.length > 0) { + const cloned = superClasses.slice(); + superClasses = []; + cloned.forEach(superClass => { + aria[superClass]['props'].forEach( + superProp => { + const name = (Array.isArray(superProp)) + ? superProp[0] + : superProp; + inheritedProps.add(name); + } + ); + superClasses = superClasses.concat(aria[superClass]['superClass']); + }); + } + // Remove the props that exist in the super classes unless the + // prop has a default value. + aria[name]['props'] = aria[name]['props'].filter( + prop => { + let keep = true; + if ( + !Array.isArray(prop) + && inheritedProps.has(prop) + ) { + keep = false; + } + return keep; + }); + } + return true; + }) + .map((prop) => { + let value = aria[name][prop]; + if (['props', 'requiredProps'].includes(prop)) { + value = value.reduce((acc, item) => { + let name; + let defaultVal; + if (Array.isArray(item)) { + name = item[0]; + defaultVal = item[1]; + } else { + name = item; + defaultVal = null; + } + acc[name] = defaultVal; + return acc; + }, {}); + } + return `${camelName}.set(\'${prop}\', ${triageValue(value).join('\n')});`; + }).join('\n'), + '', + `export default ${camelName};`, + ]; + let baseDir = 'src/etc/aria'; + let subDir = ''; + if (aria[name].abstract) { + subDir = 'abstract'; + } else if (name.indexOf('doc-') === 0) { + subDir = 'dpub'; + } + fs.mkdir(path.join(baseDir, subDir), function () { + fs.writeFile(path.join(baseDir, subDir, `${camelName}.js`), file.join('\n'), function (err) { + if (err) throw err; + console.log(`Created file ${baseDir}/${subDir}/${camelName}.js`); + }); + }); + }); +}); diff --git a/src/etc/dom.json b/src/etc/dom.json index 2c7af390..2deefb16 100644 --- a/src/etc/dom.json +++ b/src/etc/dom.json @@ -19,9 +19,7 @@ "blockquote": {}, "body": {}, "br": {}, - "button": { - "interactive": true - }, + "button": {}, "canvas": {}, "caption": {}, "center": {}, @@ -52,9 +50,7 @@ "figure": {}, "font": {}, "footer": {}, - "form": { - "interactive": true - }, + "form": {}, "frame": {}, "frameset": {}, "h1": {}, @@ -105,9 +101,7 @@ "object": {}, "ol": {}, "optgroup": {}, - "option": { - "interactive": true - }, + "option": {}, "output": {}, "p": {}, "param": { @@ -129,9 +123,7 @@ "reserved": true }, "section": {}, - "select": { - "interactive": true - }, + "select": {}, "small": {}, "source": { "reserved": true @@ -149,9 +141,7 @@ "table": {}, "tbody": {}, "td": {}, - "textarea": { - "interactive": true - }, + "textarea": {}, "tfoot": {}, "th": {}, "thead": {}, diff --git a/src/etc/roles.json b/src/etc/roles.json index 2d24e7bf..b0254261 100644 --- a/src/etc/roles.json +++ b/src/etc/roles.json @@ -1,9 +1,14 @@ { "alert": { + "superClass": ["section"], + "accessibleNameRequired": false, + "nameFrom": ["author"], + "requireContextRole": [], + "requiredOwnedElements": [], "requiredProps": [], "props": [ "aria-expanded", - "aria-atomic", + ["aria-atomic", "true"], "aria-busy", "aria-controls", "aria-describedby", @@ -16,12 +21,11 @@ "aria-invalid", "aria-label", "aria-labelledby", - "aria-live", + ["aria-live", "assertive"], "aria-owns", "aria-relevant" ], "abstract": false, - "interactive": false, "childrenPresentational": false, "baseConcepts": [], "relatedConcepts": [{ @@ -32,6 +36,11 @@ }] }, "alertdialog": { + "superClass": ["alert", "dialog"], + "accessibleNameRequired": true, + "nameFrom": ["author"], + "requireContextRole": [], + "requiredOwnedElements": [], "requiredProps": [], "props": [ "aria-expanded", @@ -53,7 +62,6 @@ "aria-relevant" ], "abstract": false, - "interactive": false, "childrenPresentational": false, "baseConcepts": [], "relatedConcepts": [{ @@ -64,9 +72,14 @@ }] }, "application": { + "superClass": ["structure"], + "accessibleNameRequired": true, + "nameFrom": ["author"], + "requireContextRole": [], + "requiredOwnedElements": [], "requiredProps": [], "props": [ - "aria-expanded", + "aria-activedescendant", "aria-atomic", "aria-busy", "aria-controls", @@ -85,7 +98,6 @@ "aria-relevant" ], "abstract": false, - "interactive": false, "childrenPresentational": false, "baseConcepts": [{ "concept": { @@ -95,6 +107,11 @@ "relatedConcepts": [] }, "article": { + "superClass": ["document"], + "accessibleNameRequired": false, + "nameFrom": ["author"], + "requireContextRole": [], + "requiredOwnedElements": [], "requiredProps": [], "props": [ "aria-expanded", @@ -113,10 +130,11 @@ "aria-labelledby", "aria-live", "aria-owns", + "aria-posinset", + "aria-setsize", "aria-relevant" ], "abstract": false, - "interactive": false, "childrenPresentational": false, "baseConcepts": [], "relatedConcepts": [{ @@ -127,6 +145,11 @@ }] }, "banner": { + "superClass": ["landmark"], + "accessibleNameRequired": false, + "nameFrom": ["author"], + "requireContextRole": [], + "requiredOwnedElements": [], "requiredProps": [], "props": [ "aria-expanded", @@ -148,12 +171,16 @@ "aria-relevant" ], "abstract": false, - "interactive": false, "childrenPresentational": false, "baseConcepts": [], "relatedConcepts": [] }, "button": { + "superClass": ["command"], + "accessibleNameRequired": true, + "nameFrom": ["author", "contents"], + "requireContextRole": [], + "requiredOwnedElements": [], "requiredProps": [], "props": [ "aria-expanded", @@ -176,7 +203,6 @@ "aria-relevant" ], "abstract": false, - "interactive": true, "childrenPresentational": true, "baseConcepts": [{ "module": "HTML", @@ -197,6 +223,11 @@ }] }, "cell": { + "superClass": ["section"], + "accessibleNameRequired": false, + "nameFrom": ["author", "contents"], + "requireContextRole": ["row"], + "requiredOwnedElements": [], "requiredProps": [], "props": [ "aria-colindex", @@ -227,7 +258,6 @@ "aria-roledescription" ], "abstract": false, - "interactive": false, "baseConcepts": [{ "module": "HTML", "concept": { @@ -237,11 +267,16 @@ "relatedConcepts": [] }, "checkbox": { + "superClass": ["input"], + "accessibleNameRequired": true, + "nameFrom": ["author", "contents"], + "requireContextRole": [], + "requiredOwnedElements": [], "requiredProps": [ "aria-checked" ], "props": [ - "aria-checked", + ["aria-checked", "false"], "aria-atomic", "aria-busy", "aria-controls", @@ -257,10 +292,10 @@ "aria-labelledby", "aria-live", "aria-owns", + "aria-readonly", "aria-relevant" ], "abstract": false, - "interactive": true, "childrenPresentational": true, "baseConcepts": [], "relatedConcepts": [{ @@ -280,6 +315,11 @@ }] }, "columnheader": { + "superClass": ["cell", "gridcell", "sectionhead"], + "accessibleNameRequired": true, + "nameFrom": ["author", "contents"], + "requireContextRole": ["row"], + "requiredOwnedElements": [], "requiredProps": [], "props": [ "aria-sort", @@ -305,9 +345,7 @@ "aria-relevant" ], "abstract": false, - "interactive": false, "childrenPresentational": false, - "interactive": true, "baseConcepts": [{ "module": "HTML", "concept": { @@ -321,11 +359,23 @@ "relatedConcepts": [] }, "combobox": { + "superClass": ["select"], + "accessibleNameRequired": true, + "nameFrom": ["author"], + "requireContextRole": [], + "requiredOwnedElements": [ + ["textbox"], + ["listbox"], + ["tree"], + ["grid"], + ["dialog"] + ], "requiredProps": [ - "aria-expanded" + "aria-controls", + ["aria-expanded", "false"] ], "props": [ - "aria-expanded", + ["aria-expanded", "false"], "aria-autocomplete", "aria-required", "aria-activedescendant", @@ -337,17 +387,18 @@ "aria-dropeffect", "aria-flowto", "aria-grabbed", - "aria-haspopup", + ["aria-haspopup", "listbox"], "aria-hidden", "aria-invalid", "aria-label", "aria-labelledby", "aria-live", "aria-owns", - "aria-relevant" + "aria-readonly", + "aria-relevant", + "aria-required" ], "abstract": false, - "interactive": true, "childrenPresentational": false, "baseConcepts": [], "relatedConcepts": [{ @@ -363,27 +414,36 @@ }] }, "command": { + "superClass": ["widget"], + "accessibleNameRequired": false, + "nameFrom": ["author"], + "requireContextRole": [], + "requiredOwnedElements": [], "props": [ "aria-atomic", "aria-busy", "aria-controls", + "aria-current", "aria-describedby", + "aria-details", "aria-disabled", "aria-dropeffect", + "aria-errormessage", "aria-flowto", "aria-grabbed", "aria-haspopup", "aria-hidden", "aria-invalid", + "aria-keyshortcuts", "aria-label", "aria-labelledby", "aria-live", "aria-owns", - "aria-relevant" + "aria-relevant", + "aria-roledescription" ], "requiredProps": [], "abstract": true, - "interactive": false, "childrenPresentational": false, "baseConcepts": [], "relatedConcepts": [{ @@ -394,6 +454,11 @@ }] }, "complementary": { + "superClass": ["landmark"], + "accessibleNameRequired": false, + "nameFrom": ["author"], + "requireContextRole": [], + "requiredOwnedElements": [], "requiredProps": [], "props": [ "aria-expanded", @@ -415,39 +480,52 @@ "aria-relevant" ], "abstract": false, - "interactive": false, "childrenPresentational": false, "baseConcepts": [], "relatedConcepts": [] }, "composite": { + "superClass": ["widget"], + "accessibleNameRequired": false, + "nameFrom": ["author"], + "requireContextRole": [], + "requiredOwnedElements": [], "props": [ "aria-activedescendant", "aria-atomic", "aria-busy", "aria-controls", + "aria-current", "aria-describedby", + "aria-details", "aria-disabled", "aria-dropeffect", + "aria-errormessage", "aria-flowto", "aria-grabbed", "aria-haspopup", "aria-hidden", "aria-invalid", + "aria-keyshortcuts", "aria-label", "aria-labelledby", "aria-live", "aria-owns", - "aria-relevant" + "aria-relevant", + "aria-roledescription" ], "requiredProps": [], "abstract": true, - "interactive": false, "childrenPresentational": false, "baseConcepts": [], "relatedConcepts": [] }, "contentinfo": { + "superClass": ["landmark"], + "accessibleNameRequired": false, + "nameFrom": ["author"], + "requireContextRole": [], + "requiredOwnedElements": [], "requiredProps": [], "props": [ "aria-expanded", @@ -469,12 +547,16 @@ "aria-relevant" ], "abstract": false, - "interactive": false, "childrenPresentational": false, "baseConcepts": [], "relatedConcepts": [] }, "definition": { + "superClass": ["section"], + "accessibleNameRequired": false, + "nameFrom": ["author"], + "requireContextRole": [], + "requiredOwnedElements": [], "requiredProps": [], "props": [ "aria-expanded", @@ -496,7 +578,6 @@ "aria-relevant" ], "abstract": false, - "interactive": false, "childrenPresentational": false, "baseConcepts": [], "relatedConcepts": [{ @@ -512,6 +593,11 @@ }] }, "dialog": { + "superClass": ["window"], + "accessibleNameRequired": true, + "nameFrom": ["author"], + "requireContextRole": [], + "requiredOwnedElements": [], "requiredProps": [], "props": [ "aria-expanded", @@ -533,15 +619,18 @@ "aria-relevant" ], "abstract": false, - "interactive": false, "childrenPresentational": false, "baseConcepts": [], "relatedConcepts": [] }, "directory": { + "superClass": ["list"], + "accessibleNameRequired": false, + "nameFrom": ["author"], + "requireContextRole": [], + "requiredOwnedElements": [], "requiredProps": [], "abstract": false, - "interactive": false, "baseConcepts": [], "relatedConcepts": [{ "module": "DAISY Guide" @@ -568,6 +657,11 @@ "childrenPresentational": false }, "doc-abstract": { + "superClass": ["section"], + "accessibleNameRequired": false, + "nameFrom": ["author"], + "requireContextRole": [], + "requiredOwnedElements": [], "props": [ "aria-atomic", "aria-busy", @@ -591,12 +685,21 @@ ], "requiredProps": [], "abstract": false, - "interactive": false, "childrenPresentational": false, "baseConcepts": [], - "relatedConcepts": [] + "relatedConcepts": [{ + "module": "EPUB", + "concept": { + "name": "abstract [EPUB-SSV]" + } + }] }, "doc-acknowledgments": { + "superClass": ["landmark"], + "accessibleNameRequired": false, + "nameFrom": ["author"], + "requireContextRole": [], + "requiredOwnedElements": [], "props": [ "aria-atomic", "aria-busy", @@ -620,12 +723,21 @@ ], "requiredProps": [], "abstract": false, - "interactive": false, "childrenPresentational": false, "baseConcepts": [], - "relatedConcepts": [] + "relatedConcepts": [{ + "module": "EPUB", + "concept": { + "name": "acknowledgments [EPUB-SSV]" + } + }] }, "doc-afterword": { + "superClass": ["landmark"], + "accessibleNameRequired": false, + "nameFrom": ["author"], + "requireContextRole": [], + "requiredOwnedElements": [], "props": [ "aria-atomic", "aria-busy", @@ -649,12 +761,21 @@ ], "requiredProps": [], "abstract": false, - "interactive": false, "childrenPresentational": false, "baseConcepts": [], - "relatedConcepts": [] + "relatedConcepts": [{ + "module": "EPUB", + "concept": { + "name": "afterword [EPUB-SSV]" + } + }] }, "doc-appendix": { + "superClass": ["landmark"], + "accessibleNameRequired": false, + "nameFrom": ["author"], + "requireContextRole": [], + "requiredOwnedElements": [], "props": [ "aria-atomic", "aria-busy", @@ -678,12 +799,21 @@ ], "requiredProps": [], "abstract": false, - "interactive": false, "childrenPresentational": false, "baseConcepts": [], - "relatedConcepts": [] + "relatedConcepts": [{ + "module": "EPUB", + "concept": { + "name": "appendix [EPUB-SSV]" + } + }] }, "doc-backlink": { + "superClass": ["link"], + "accessibleNameRequired": true, + "nameFrom": ["author", "content"], + "requireContextRole": [], + "requiredOwnedElements": [], "props": [ "aria-atomic", "aria-busy", @@ -707,12 +837,21 @@ ], "requiredProps": [], "abstract": false, - "interactive": false, "childrenPresentational": false, "baseConcepts": [], - "relatedConcepts": [] + "relatedConcepts": [{ + "module": "EPUB", + "concept": { + "name": "referrer [EPUB-SSV]" + } + }] }, "doc-biblioentry": { + "superClass": ["listitem"], + "accessibleNameRequired": true, + "nameFrom": ["author"], + "requireContextRole": ["doc-bibliography"], + "requiredOwnedElements": [], "props": [ "aria-atomic", "aria-busy", @@ -739,12 +878,23 @@ ], "requiredProps": [], "abstract": false, - "interactive": false, "childrenPresentational": false, "baseConcepts": [], - "relatedConcepts": [] + "relatedConcepts": [{ + "module": "EPUB", + "concept": { + "name": "EPUB biblioentry [EPUB-SSV]" + } + }] }, "doc-bibliography": { + "superClass": ["landmark"], + "accessibleNameRequired": false, + "nameFrom": ["author"], + "requireContextRole": [], + "requiredOwnedElements": [ + ["doc-biblioentry"] + ], "props": [ "aria-atomic", "aria-busy", @@ -768,12 +918,21 @@ ], "requiredProps": [], "abstract": false, - "interactive": false, "childrenPresentational": false, "baseConcepts": [], - "relatedConcepts": [] + "relatedConcepts": [{ + "module": "EPUB", + "concept": { + "name": "bibliography [EPUB-SSV]" + } + }] }, "doc-biblioref": { + "superClass": ["link"], + "accessibleNameRequired": true, + "nameFrom": ["author", "contents"], + "requireContextRole": [], + "requiredOwnedElements": [], "props": [ "aria-atomic", "aria-busy", @@ -797,12 +956,21 @@ ], "requiredProps": [], "abstract": false, - "interactive": false, "childrenPresentational": false, "baseConcepts": [], - "relatedConcepts": [] + "relatedConcepts": [{ + "module": "EPUB", + "concept": { + "name": "biblioref [EPUB-SSV]" + } + }] }, "doc-chapter": { + "superClass": ["landmark"], + "accessibleNameRequired": false, + "nameFrom": ["author"], + "requireContextRole": [], + "requiredOwnedElements": [], "props": [ "aria-atomic", "aria-busy", @@ -826,12 +994,21 @@ ], "requiredProps": [], "abstract": false, - "interactive": false, "childrenPresentational": false, "baseConcepts": [], - "relatedConcepts": [] + "relatedConcepts": [{ + "module": "EPUB", + "concept": { + "name": "chapter [EPUB-SSV]" + } + }] }, "doc-colophon": { + "superClass": ["section"], + "accessibleNameRequired": false, + "nameFrom": ["author"], + "requireContextRole": [], + "requiredOwnedElements": [], "props": [ "aria-atomic", "aria-busy", @@ -855,12 +1032,21 @@ ], "requiredProps": [], "abstract": false, - "interactive": false, "childrenPresentational": false, "baseConcepts": [], - "relatedConcepts": [] + "relatedConcepts": [{ + "module": "EPUB", + "concept": { + "name": "colophon [EPUB-SSV]" + } + }] }, "doc-conclusion": { + "superClass": ["landmark"], + "accessibleNameRequired": false, + "nameFrom": ["author"], + "requireContextRole": [], + "requiredOwnedElements": [], "props": [ "aria-atomic", "aria-busy", @@ -884,12 +1070,21 @@ ], "requiredProps": [], "abstract": false, - "interactive": false, "childrenPresentational": false, "baseConcepts": [], - "relatedConcepts": [] + "relatedConcepts": [{ + "module": "EPUB", + "concept": { + "name": "conclusion [EPUB-SSV]" + } + }] }, "doc-cover": { + "superClass": ["img"], + "accessibleNameRequired": false, + "nameFrom": ["author"], + "requireContextRole": [], + "requiredOwnedElements": [], "props": [ "aria-atomic", "aria-busy", @@ -913,12 +1108,21 @@ ], "requiredProps": [], "abstract": false, - "interactive": false, "childrenPresentational": false, "baseConcepts": [], - "relatedConcepts": [] + "relatedConcepts": [{ + "module": "EPUB", + "concept": { + "name": "cover [EPUB-SSV]" + } + }] }, "doc-credit": { + "superClass": ["section"], + "accessibleNameRequired": false, + "nameFrom": ["author"], + "requireContextRole": [], + "requiredOwnedElements": [], "props": [ "aria-atomic", "aria-busy", @@ -942,12 +1146,21 @@ ], "requiredProps": [], "abstract": false, - "interactive": false, "childrenPresentational": false, "baseConcepts": [], - "relatedConcepts": [] + "relatedConcepts": [{ + "module": "EPUB", + "concept": { + "name": "credit [EPUB-SSV]" + } + }] }, "doc-credits": { + "superClass": ["landmark"], + "accessibleNameRequired": false, + "nameFrom": ["author"], + "requireContextRole": [], + "requiredOwnedElements": [], "props": [ "aria-atomic", "aria-busy", @@ -971,12 +1184,21 @@ ], "requiredProps": [], "abstract": false, - "interactive": false, "childrenPresentational": false, "baseConcepts": [], - "relatedConcepts": [] + "relatedConcepts": [{ + "module": "EPUB", + "concept": { + "name": "credits [EPUB-SSV]" + } + }] }, "doc-dedication": { + "superClass": ["section"], + "accessibleNameRequired": false, + "nameFrom": ["author"], + "requireContextRole": [], + "requiredOwnedElements": [], "props": [ "aria-atomic", "aria-busy", @@ -1000,12 +1222,21 @@ ], "requiredProps": [], "abstract": false, - "interactive": false, "childrenPresentational": false, "baseConcepts": [], - "relatedConcepts": [] + "relatedConcepts": [{ + "module": "EPUB", + "concept": { + "name": "dedication [EPUB-SSV]" + } + }] }, "doc-endnote": { + "superClass": ["listitem"], + "accessibleNameRequired": false, + "nameFrom": ["author"], + "requireContextRole": ["doc-endnotes"], + "requiredOwnedElements": [], "props": [ "aria-atomic", "aria-busy", @@ -1032,12 +1263,23 @@ ], "requiredProps": [], "abstract": false, - "interactive": false, "childrenPresentational": false, "baseConcepts": [], - "relatedConcepts": [] + "relatedConcepts": [{ + "module": "EPUB", + "concept": { + "name": "rearnote [EPUB-SSV]" + } + }] }, "doc-endnotes": { + "superClass": ["landmark"], + "accessibleNameRequired": false, + "nameFrom": ["author"], + "requireContextRole": [], + "requiredOwnedElements": [ + ["doc-endnote"] + ], "props": [ "aria-atomic", "aria-busy", @@ -1061,12 +1303,21 @@ ], "requiredProps": [], "abstract": false, - "interactive": false, "childrenPresentational": false, "baseConcepts": [], - "relatedConcepts": [] + "relatedConcepts": [{ + "module": "EPUB", + "concept": { + "name": "rearnotes [EPUB-SSV]" + } + }] }, "doc-epigraph": { + "superClass": ["section"], + "accessibleNameRequired": false, + "nameFrom": ["author"], + "requireContextRole": [], + "requiredOwnedElements": [], "props": [ "aria-atomic", "aria-busy", @@ -1090,12 +1341,21 @@ ], "requiredProps": [], "abstract": false, - "interactive": false, "childrenPresentational": false, "baseConcepts": [], - "relatedConcepts": [] + "relatedConcepts": [{ + "module": "EPUB", + "concept": { + "name": "epigraph [EPUB-SSV]" + } + }] }, "doc-epilogue": { + "superClass": ["landmark"], + "accessibleNameRequired": false, + "nameFrom": ["author"], + "requireContextRole": [], + "requiredOwnedElements": [], "props": [ "aria-atomic", "aria-busy", @@ -1119,12 +1379,21 @@ ], "requiredProps": [], "abstract": false, - "interactive": false, "childrenPresentational": false, "baseConcepts": [], - "relatedConcepts": [] + "relatedConcepts": [{ + "module": "EPUB", + "concept": { + "name": "epilogue [EPUB-SSV]" + } + }] }, "doc-errata": { + "superClass": ["landmark"], + "accessibleNameRequired": false, + "nameFrom": ["author"], + "requireContextRole": [], + "requiredOwnedElements": [], "props": [ "aria-atomic", "aria-busy", @@ -1148,12 +1417,21 @@ ], "requiredProps": [], "abstract": false, - "interactive": false, "childrenPresentational": false, "baseConcepts": [], - "relatedConcepts": [] + "relatedConcepts": [{ + "module": "EPUB", + "concept": { + "name": "errata [EPUB-SSV]" + } + }] }, "doc-example": { + "superClass": ["section"], + "accessibleNameRequired": false, + "nameFrom": ["author"], + "requireContextRole": [], + "requiredOwnedElements": [], "props": [ "aria-atomic", "aria-busy", @@ -1177,12 +1455,16 @@ ], "requiredProps": [], "abstract": false, - "interactive": false, "childrenPresentational": false, "baseConcepts": [], "relatedConcepts": [] }, "doc-footnote": { + "superClass": ["section"], + "accessibleNameRequired": false, + "nameFrom": ["author"], + "requireContextRole": [], + "requiredOwnedElements": [], "props": [ "aria-atomic", "aria-busy", @@ -1206,12 +1488,21 @@ ], "requiredProps": [], "abstract": false, - "interactive": false, "childrenPresentational": false, "baseConcepts": [], - "relatedConcepts": [] + "relatedConcepts": [{ + "module": "EPUB", + "concept": { + "name": "footnote [EPUB-SSV]" + } + }] }, "doc-foreword": { + "superClass": ["landmark"], + "accessibleNameRequired": false, + "nameFrom": ["author"], + "requireContextRole": [], + "requiredOwnedElements": [], "props": [ "aria-atomic", "aria-busy", @@ -1235,12 +1526,24 @@ ], "requiredProps": [], "abstract": false, - "interactive": false, "childrenPresentational": false, "baseConcepts": [], - "relatedConcepts": [] + "relatedConcepts": [{ + "module": "EPUB", + "concept": { + "name": "foreword [EPUB-SSV]" + } + }] }, "doc-glossary": { + "superClass": ["landmark"], + "accessibleNameRequired": false, + "nameFrom": ["author"], + "requireContextRole": [], + "requiredOwnedElements": [ + ["term"], + ["definition"] + ], "props": [ "aria-atomic", "aria-busy", @@ -1264,12 +1567,21 @@ ], "requiredProps": [], "abstract": false, - "interactive": false, "childrenPresentational": false, "baseConcepts": [], - "relatedConcepts": [] + "relatedConcepts": [{ + "module": "EPUB", + "concept": { + "name": "glossary [EPUB-SSV]" + } + }] }, "doc-glossref": { + "superClass": ["link"], + "accessibleNameRequired": true, + "nameFrom": ["author", "contents"], + "requireContextRole": [], + "requiredOwnedElements": [], "props": [ "aria-atomic", "aria-busy", @@ -1293,12 +1605,21 @@ ], "requiredProps": [], "abstract": false, - "interactive": false, "childrenPresentational": false, "baseConcepts": [], - "relatedConcepts": [] + "relatedConcepts": [{ + "module": "EPUB", + "concept": { + "name": "glossref [EPUB-SSV]" + } + }] }, "doc-index": { + "superClass": ["navigation"], + "accessibleNameRequired": false, + "nameFrom": ["author"], + "requireContextRole": [], + "requiredOwnedElements": [], "props": [ "aria-atomic", "aria-busy", @@ -1322,12 +1643,21 @@ ], "requiredProps": [], "abstract": false, - "interactive": false, "childrenPresentational": false, "baseConcepts": [], - "relatedConcepts": [] + "relatedConcepts": [{ + "module": "EPUB", + "concept": { + "name": "index [EPUB-SSV]" + } + }] }, "doc-introduction": { + "superClass": ["landmark"], + "accessibleNameRequired": false, + "nameFrom": ["author"], + "requireContextRole": [], + "requiredOwnedElements": [], "props": [ "aria-atomic", "aria-busy", @@ -1351,12 +1681,21 @@ ], "requiredProps": [], "abstract": false, - "interactive": false, "childrenPresentational": false, "baseConcepts": [], - "relatedConcepts": [] + "relatedConcepts": [{ + "module": "EPUB", + "concept": { + "name": "introduction [EPUB-SSV]" + } + }] }, "doc-noteref": { + "superClass": ["link"], + "accessibleNameRequired": true, + "nameFrom": ["author", "contents"], + "requireContextRole": [], + "requiredOwnedElements": [], "props": [ "aria-atomic", "aria-busy", @@ -1380,12 +1719,21 @@ ], "requiredProps": [], "abstract": false, - "interactive": false, "childrenPresentational": false, "baseConcepts": [], - "relatedConcepts": [] + "relatedConcepts": [{ + "module": "EPUB", + "concept": { + "name": "noteref [EPUB-SSV]" + } + }] }, "doc-notice": { + "superClass": ["note"], + "accessibleNameRequired": false, + "nameFrom": ["author"], + "requireContextRole": [], + "requiredOwnedElements": [], "props": [ "aria-atomic", "aria-busy", @@ -1409,12 +1757,21 @@ ], "requiredProps": [], "abstract": false, - "interactive": false, "childrenPresentational": false, "baseConcepts": [], - "relatedConcepts": [] + "relatedConcepts": [{ + "module": "EPUB", + "concept": { + "name": "notice [EPUB-SSV]" + } + }] }, "doc-pagebreak": { + "superClass": ["separator"], + "accessibleNameRequired": true, + "nameFrom": ["author"], + "requireContextRole": [], + "requiredOwnedElements": [], "props": [ "aria-atomic", "aria-busy", @@ -1439,12 +1796,21 @@ ], "requiredProps": [], "abstract": false, - "interactive": false, - "childrenPresentational": false, + "childrenPresentational": true, "baseConcepts": [], - "relatedConcepts": [] + "relatedConcepts": [{ + "module": "EPUB", + "concept": { + "name": "pagebreak [EPUB-SSV]" + } + }] }, "doc-pagelist": { + "superClass": ["navigation"], + "accessibleNameRequired": false, + "nameFrom": ["author"], + "requireContextRole": [], + "requiredOwnedElements": [], "props": [ "aria-atomic", "aria-busy", @@ -1468,12 +1834,21 @@ ], "requiredProps": [], "abstract": false, - "interactive": false, "childrenPresentational": false, "baseConcepts": [], - "relatedConcepts": [] + "relatedConcepts": [{ + "module": "EPUB", + "concept": { + "name": "page-list [EPUB-SSV]" + } + }] }, "doc-part": { + "superClass": ["landmark"], + "accessibleNameRequired": true, + "nameFrom": ["author"], + "requireContextRole": [], + "requiredOwnedElements": [], "props": [ "aria-atomic", "aria-busy", @@ -1497,12 +1872,21 @@ ], "requiredProps": [], "abstract": false, - "interactive": false, "childrenPresentational": false, "baseConcepts": [], - "relatedConcepts": [] + "relatedConcepts": [{ + "module": "EPUB", + "concept": { + "name": "part [EPUB-SSV]" + } + }] }, "doc-preface": { + "superClass": ["landmark"], + "accessibleNameRequired": false, + "nameFrom": ["author"], + "requireContextRole": [], + "requiredOwnedElements": [], "props": [ "aria-atomic", "aria-busy", @@ -1526,12 +1910,21 @@ ], "requiredProps": [], "abstract": false, - "interactive": false, "childrenPresentational": false, "baseConcepts": [], - "relatedConcepts": [] + "relatedConcepts": [{ + "module": "EPUB", + "concept": { + "name": "preface [EPUB-SSV]" + } + }] }, "doc-prologue": { + "superClass": ["landmark"], + "accessibleNameRequired": false, + "nameFrom": ["author"], + "requireContextRole": [], + "requiredOwnedElements": [], "props": [ "aria-atomic", "aria-busy", @@ -1555,21 +1948,39 @@ ], "requiredProps": [], "abstract": false, - "interactive": false, "childrenPresentational": false, "baseConcepts": [], - "relatedConcepts": [] + "relatedConcepts": [{ + "module": "EPUB", + "concept": { + "name": "prologue [EPUB-SSV]" + } + }] }, "doc-pullquote": { + "superClass": ["none"], + "accessibleNameRequired": false, + "nameFrom": ["author"], + "requireContextRole": [], + "requiredOwnedElements": [], "props": [], "requiredProps": [], "abstract": false, - "interactive": false, "childrenPresentational": false, "baseConcepts": [], - "relatedConcepts": [] + "relatedConcepts": [{ + "module": "EPUB", + "concept": { + "name": "pullquote [EPUB-SSV]" + } + }] }, "doc-qna": { + "superClass": ["section"], + "accessibleNameRequired": false, + "nameFrom": ["author"], + "requireContextRole": [], + "requiredOwnedElements": [], "props": [ "aria-atomic", "aria-busy", @@ -1593,12 +2004,21 @@ ], "requiredProps": [], "abstract": false, - "interactive": false, "childrenPresentational": false, "baseConcepts": [], - "relatedConcepts": [] + "relatedConcepts": [{ + "module": "EPUB", + "concept": { + "name": "qna [EPUB-SSV]" + } + }] }, "doc-subtitle": { + "superClass": ["sectionhead"], + "accessibleNameRequired": false, + "nameFrom": ["author"], + "requireContextRole": [], + "requiredOwnedElements": [], "props": [ "aria-atomic", "aria-busy", @@ -1622,12 +2042,21 @@ ], "requiredProps": [], "abstract": false, - "interactive": false, "childrenPresentational": false, "baseConcepts": [], - "relatedConcepts": [] + "relatedConcepts": [{ + "module": "EPUB", + "concept": { + "name": "subtitle [EPUB-SSV]" + } + }] }, "doc-tip": { + "superClass": ["note"], + "accessibleNameRequired": false, + "nameFrom": ["author"], + "requireContextRole": [], + "requiredOwnedElements": [], "props": [ "aria-atomic", "aria-busy", @@ -1651,12 +2080,21 @@ ], "requiredProps": [], "abstract": false, - "interactive": false, "childrenPresentational": false, "baseConcepts": [], - "relatedConcepts": [] + "relatedConcepts": [{ + "module": "EPUB", + "concept": { + "name": "help [EPUB-SSV]" + } + }] }, "doc-toc": { + "superClass": ["navigation"], + "accessibleNameRequired": false, + "nameFrom": ["author"], + "requireContextRole": [], + "requiredOwnedElements": [], "props": [ "aria-atomic", "aria-busy", @@ -1680,15 +2118,23 @@ ], "requiredProps": [], "abstract": false, - "interactive": false, "childrenPresentational": false, "baseConcepts": [], - "relatedConcepts": [] + "relatedConcepts": [{ + "module": "EPUB", + "concept": { + "name": "toc [EPUB-SSV]" + } + }] }, "document": { + "superClass": ["structure"], + "accessibleNameRequired": false, + "nameFrom": ["author"], + "requireContextRole": [], + "requiredOwnedElements": [], "requiredProps": [], "abstract": false, - "interactive": false, "baseConcepts": [], "relatedConcepts": [{ "concept": { @@ -1717,9 +2163,15 @@ "childrenPresentational": false }, "feed": { + "superClass": ["list"], + "accessibleNameRequired": false, + "nameFrom": ["author"], + "requireContextRole": [], + "requiredOwnedElements": [ + ["article"] + ], "requiredProps": [], "abstract": false, - "interactive": false, "childrenPresentational": false, "props": [ "aria-atomic", @@ -1749,8 +2201,12 @@ "relatedConcepts": [] }, "figure": { + "superClass": ["section"], + "accessibleNameRequired": false, + "nameFrom": ["author"], + "requireContextRole": [], + "requiredOwnedElements": [], "abstract": false, - "interactive": false, "childrenPresentational": false, "props": [ "aria-atomic", @@ -1786,9 +2242,13 @@ }] }, "form": { + "superClass": ["landmark"], + "accessibleNameRequired": false, + "nameFrom": ["author"], + "requireContextRole": [], + "requiredOwnedElements": [], "requiredProps": [], "abstract": false, - "interactive": true, "baseConcepts": [], "relatedConcepts": [{ "module": "HTML", @@ -1818,9 +2278,19 @@ "childrenPresentational": false }, "grid": { + "superClass": [ + "composite", + "table" + ], + "accessibleNameRequired": true, + "nameFrom": ["author"], + "requireContextRole": [], + "requiredOwnedElements": [ + ["rowgroup", "row"], + ["row"] + ], "requiredProps": [], "abstract": false, - "interactive": false, "baseConcepts": [{ "module": "HTML", "concept": { @@ -1854,9 +2324,13 @@ "childrenPresentational": false }, "gridcell": { + "superClass": ["cell", "widget"], + "accessibleNameRequired": true, + "nameFrom": ["author", "contents"], + "requireContextRole": ["row"], + "requiredOwnedElements": [], "requiredProps": [], "abstract": false, - "interactive": true, "baseConcepts": [{ "module": "HTML", "concept": { @@ -1889,9 +2363,13 @@ "childrenPresentational": false }, "group": { + "superClass": ["section"], + "accessibleNameRequired": false, + "nameFrom": ["author"], + "requireContextRole": [], + "requiredOwnedElements": [], "requiredProps": [], "abstract": false, - "interactive": false, "baseConcepts": [], "relatedConcepts": [{ "module": "HTML", @@ -1922,9 +2400,13 @@ "childrenPresentational": false }, "heading": { + "superClass": ["sectionhead"], + "accessibleNameRequired": true, + "nameFrom": ["author", "contents"], + "requireContextRole": [], + "requiredOwnedElements": [], "requiredProps": [], "abstract": false, - "interactive": false, "baseConcepts": [], "relatedConcepts": [{ "module": "HTML", @@ -1958,7 +2440,7 @@ } }], "props": [ - "aria-level", + ["aria-level", "2"], "aria-expanded", "aria-atomic", "aria-busy", @@ -1980,9 +2462,13 @@ "childrenPresentational": false }, "img": { + "superClass": ["section"], + "accessibleNameRequired": true, + "nameFrom": ["author"], + "requireContextRole": [], + "requiredOwnedElements": [], "requiredProps": [], "abstract": false, - "interactive": false, "baseConcepts": [], "relatedConcepts": [{ "module": "HTML", @@ -2017,6 +2503,11 @@ "childrenPresentational": true }, "input": { + "superClass": ["widget"], + "accessibleNameRequired": false, + "nameFrom": ["author"], + "requireContextRole": [], + "requiredOwnedElements": [], "props": [ "aria-atomic", "aria-busy", @@ -2037,7 +2528,6 @@ ], "requiredProps": [], "abstract": true, - "interactive": false, "childrenPresentational": false, "baseConcepts": [], "relatedConcepts": [{ @@ -2048,6 +2538,11 @@ }] }, "landmark": { + "superClass": ["section"], + "accessibleNameRequired": false, + "nameFrom": ["author"], + "requireContextRole": [], + "requiredOwnedElements": [], "props": [ "aria-expanded", "aria-atomic", @@ -2069,15 +2564,18 @@ ], "requiredProps": [], "abstract": true, - "interactive": false, "childrenPresentational": false, "baseConcepts": [], "relatedConcepts": [] }, "link": { + "superClass": ["command"], + "accessibleNameRequired": true, + "nameFrom": ["author", "contents"], + "requireContextRole": [], + "requiredOwnedElements": [], "requiredProps": [], "abstract": false, - "interactive": true, "baseConcepts": [], "relatedConcepts": [{ "module": "HTML", @@ -2112,9 +2610,16 @@ "childrenPresentational": false }, "list": { + "superClass": ["section"], + "accessibleNameRequired": false, + "nameFrom": ["author"], + "requireContextRole": [], + "requiredOwnedElements": [ + ["group", "listitem"], + ["listitem"] + ], "requiredProps": [], "abstract": false, - "interactive": false, "baseConcepts": [{ "module": "HTML", "concept": { @@ -2149,9 +2654,15 @@ "childrenPresentational": false }, "listbox": { + "superClass": ["select"], + "accessibleNameRequired": true, + "nameFrom": ["author"], + "requireContextRole": [], + "requiredOwnedElements": [ + ["option"] + ], "requiredProps": [], "abstract": false, - "interactive": false, "baseConcepts": [], "relatedConcepts": [{ "module": "ARIA", @@ -2171,6 +2682,7 @@ }], "props": [ "aria-multiselectable", + "aria-readonly", "aria-required", "aria-expanded", "aria-atomic", @@ -2187,6 +2699,7 @@ "aria-label", "aria-labelledby", "aria-live", + ["aria-orientation", "vertical"], "aria-owns", "aria-relevant", "aria-activedescendant" @@ -2194,9 +2707,16 @@ "childrenPresentational": false }, "listitem": { + "superClass": ["section"], + "accessibleNameRequired": false, + "nameFrom": ["author"], + "requireContextRole": [ + "group", + "list" + ], + "requiredOwnedElements": [], "requiredProps": [], "abstract": false, - "interactive": false, "baseConcepts": [{ "module": "HTML", "concept": { @@ -2234,9 +2754,13 @@ "childrenPresentational": false }, "log": { + "superClass": ["section"], + "accessibleNameRequired": true, + "nameFrom": ["author"], + "requireContextRole": [], + "requiredOwnedElements": [], "requiredProps": [], "abstract": false, - "interactive": false, "baseConcepts": [], "relatedConcepts": [], "props": [ @@ -2254,16 +2778,20 @@ "aria-invalid", "aria-label", "aria-labelledby", - "aria-live", + ["aria-live", "polite"], "aria-owns", "aria-relevant" ], "childrenPresentational": false }, "main": { + "superClass": ["landmark"], + "accessibleNameRequired": false, + "nameFrom": ["author"], + "requireContextRole": [], + "requiredOwnedElements": [], "requiredProps": [], "abstract": false, - "interactive": false, "baseConcepts": [], "relatedConcepts": [{ "module": "HTML", @@ -2293,9 +2821,13 @@ "childrenPresentational": false }, "marquee": { + "superClass": ["section"], + "accessibleNameRequired": true, + "nameFrom": ["author"], + "requireContextRole": [], + "requiredOwnedElements": [], "requiredProps": [], "abstract": false, - "interactive": false, "baseConcepts": [], "relatedConcepts": [], "props": [ @@ -2320,9 +2852,13 @@ "childrenPresentational": false }, "math": { + "superClass": ["section"], + "accessibleNameRequired": false, + "nameFrom": ["author"], + "requireContextRole": [], + "requiredOwnedElements": [], "requiredProps": [], "abstract": false, - "interactive": false, "baseConcepts": [], "relatedConcepts": [], "props": [ @@ -2347,9 +2883,18 @@ "childrenPresentational": true }, "menu": { + "superClass": ["select"], + "accessibleNameRequired": false, + "nameFrom": ["author"], + "requireContextRole": [], + "requiredOwnedElements": [ + ["group", "menuitemradio"], + ["menuitem"], + ["menuitemcheckbox"], + ["menuitemradio"] + ], "requiredProps": [], "abstract": false, - "interactive": false, "baseConcepts": [], "relatedConcepts": [{ "module": "ARIA", @@ -2388,6 +2933,7 @@ "aria-label", "aria-labelledby", "aria-live", + ["aria-orientation", "vertical"], "aria-owns", "aria-relevant", "aria-activedescendant" @@ -2395,9 +2941,18 @@ "childrenPresentational": false }, "menubar": { + "superClass": ["menu"], + "accessibleNameRequired": false, + "nameFrom": ["author"], + "requireContextRole": [], + "requiredOwnedElements": [ + ["group", "menuitemradio"], + ["menuitem"], + ["menuitemcheckbox"], + ["menuitemradio"] + ], "requiredProps": [], "abstract": false, - "interactive": false, "baseConcepts": [], "relatedConcepts": [{ "module": "ARIA", @@ -2421,6 +2976,7 @@ "aria-label", "aria-labelledby", "aria-live", + ["aria-orientation", "vertical"], "aria-owns", "aria-relevant", "aria-activedescendant" @@ -2428,9 +2984,17 @@ "childrenPresentational": false }, "menuitem": { + "superClass": ["command"], + "accessibleNameRequired": true, + "nameFrom": ["author", "contents"], + "requireContextRole": [ + "group", + "menu", + "menubar" + ], + "requiredOwnedElements": [], "requiredProps": [], "abstract": false, - "interactive": true, "baseConcepts": [], "relatedConcepts": [{ "module": "ARIA", @@ -2454,6 +3018,8 @@ } }], "props": [ + "aria-posinset", + "aria-setsize", "aria-atomic", "aria-busy", "aria-controls", @@ -2474,11 +3040,18 @@ "childrenPresentational": false }, "menuitemcheckbox": { + "superClass": ["menuitem", "checkbox"], + "accessibleNameRequired": true, + "nameFrom": ["author", "contents"], + "requireContextRole": [ + "menu", + "menubar" + ], + "requiredOwnedElements": [], "requiredProps": [ "aria-checked" ], "abstract": false, - "interactive": true, "baseConcepts": [], "relatedConcepts": [{ "module": "ARIA", @@ -2487,7 +3060,7 @@ } }], "props": [ - "aria-checked", + ["aria-checked", "false"], "aria-atomic", "aria-busy", "aria-controls", @@ -2508,11 +3081,19 @@ "childrenPresentational": true }, "menuitemradio": { + "superClass": ["menuitemcheckbox", "radio"], + "accessibleNameRequired": true, + "nameFrom": ["author", "contents"], + "requireContextRole": [ + "group", + "menu", + "menubar" + ], + "requiredOwnedElements": [], "requiredProps": [ "aria-checked" ], "abstract": false, - "interactive": true, "baseConcepts": [], "relatedConcepts": [{ "module": "ARIA", @@ -2521,7 +3102,7 @@ } }], "props": [ - "aria-checked", + ["aria-checked", "false"], "aria-atomic", "aria-busy", "aria-controls", @@ -2545,9 +3126,13 @@ "childrenPresentational": true }, "navigation": { + "superClass": ["landmark"], + "accessibleNameRequired": false, + "nameFrom": ["author"], + "requireContextRole": [], + "requiredOwnedElements": [], "requiredProps": [], "abstract": false, - "interactive": false, "baseConcepts": [], "relatedConcepts": [{ "module": "HTML", @@ -2576,10 +3161,18 @@ ], "childrenPresentational": false }, + "none": { + "superClass": [], + "props": [] + }, "note": { + "superClass": ["section"], + "accessibleNameRequired": false, + "nameFrom": ["author"], + "requireContextRole": [], + "requiredOwnedElements": [], "requiredProps": [], "abstract": false, - "interactive": false, "baseConcepts": [], "relatedConcepts": [], "props": [ @@ -2604,9 +3197,17 @@ "childrenPresentational": false }, "option": { - "requiredProps": [], + "superClass": ["input"], + "accessibleNameRequired": true, + "nameFrom": ["author", "contents"], + "requireContextRole": [ + "listbox" + ], + "requiredOwnedElements": [], + "requiredProps": [ + ["aria-selected", "false"] + ], "abstract": false, - "interactive": true, "baseConcepts": [{ "module": "HTML", "concept": { @@ -2627,7 +3228,7 @@ "props": [ "aria-checked", "aria-posinset", - "aria-selected", + ["aria-selected", "false"], "aria-setsize", "aria-atomic", "aria-busy", @@ -2649,9 +3250,13 @@ "childrenPresentational": true }, "presentation": { + "superClass": ["structure"], + "accessibleNameRequired": false, + "nameFrom": ["author"], + "requireContextRole": [], + "requiredOwnedElements": [], "requiredProps": [], "abstract": false, - "interactive": false, "baseConcepts": [], "relatedConcepts": [], "props": [ @@ -2675,9 +3280,13 @@ "childrenPresentational": false }, "progressbar": { + "superClass": ["range"], + "accessibleNameRequired": true, + "nameFrom": ["author"], + "requireContextRole": [], + "requiredOwnedElements": [], "requiredProps": [], "abstract": false, - "interactive": false, "baseConcepts": [], "relatedConcepts": [{ "module": "ARIA", @@ -2710,11 +3319,15 @@ "childrenPresentational": true }, "radio": { + "superClass": ["input"], + "accessibleNameRequired": true, + "nameFrom": ["author", "contents"], + "requireContextRole": [], + "requiredOwnedElements": [], "requiredProps": [ - "aria-checked" + ["aria-checked", "false"] ], "abstract": false, - "interactive": true, "baseConcepts": [], "relatedConcepts": [{ "module": "HTML", @@ -2727,7 +3340,7 @@ } }], "props": [ - "aria-checked", + ["aria-checked", "false"], "aria-atomic", "aria-busy", "aria-controls", @@ -2751,9 +3364,15 @@ "childrenPresentational": true }, "radiogroup": { + "superClass": ["select"], + "accessibleNameRequired": true, + "nameFrom": ["author"], + "requireContextRole": [], + "requiredOwnedElements": [ + ["radio"] + ], "requiredProps": [], "abstract": false, - "interactive": false, "baseConcepts": [], "relatedConcepts": [{ "module": "ARIA", @@ -2762,6 +3381,7 @@ } }], "props": [ + "aria-readonly", "aria-required", "aria-activedescendant", "aria-atomic", @@ -2785,6 +3405,11 @@ "childrenPresentational": false }, "range": { + "superClass": ["widget"], + "accessibleNameRequired": false, + "nameFrom": ["author"], + "requireContextRole": [], + "requiredOwnedElements": [], "props": [ "aria-valuemax", "aria-valuemin", @@ -2793,31 +3418,39 @@ "aria-atomic", "aria-busy", "aria-controls", + "aria-current", "aria-describedby", + "aria-details", "aria-disabled", "aria-dropeffect", + "aria-errormessage", "aria-flowto", "aria-grabbed", "aria-haspopup", "aria-hidden", "aria-invalid", + "aria-keyshortcuts", "aria-label", "aria-labelledby", "aria-live", "aria-owns", - "aria-relevant" + "aria-relevant", + "aria-roledescription" ], "requiredProps": [], "abstract": true, - "interactive": false, "childrenPresentational": false, "baseConcepts": [], "relatedConcepts": [] }, "region": { + "superClass": ["landmark"], + "accessibleNameRequired": true, + "nameFrom": ["author"], + "requireContextRole": [], + "requiredOwnedElements": [], "requiredProps": [], "abstract": false, - "interactive": false, "baseConcepts": [], "relatedConcepts": [{ "module": "HTML", @@ -2856,27 +3489,36 @@ "childrenPresentational": false }, "roletype": { + "superClass": [], + "accessibleNameRequired": false, + "nameFrom": ["author"], + "requireContextRole": [], + "requiredOwnedElements": [], "props": [ "aria-atomic", "aria-busy", "aria-controls", + "aria-current", "aria-describedby", + "aria-details", "aria-disabled", "aria-dropeffect", + "aria-errormessage", "aria-flowto", "aria-grabbed", "aria-haspopup", "aria-hidden", "aria-invalid", + "aria-keyshortcuts", "aria-label", "aria-labelledby", "aria-live", "aria-owns", - "aria-relevant" + "aria-relevant", + "aria-roledescription" ], "requiredProps": [], "abstract": true, - "interactive": false, "childrenPresentational": false, "baseConcepts": [], "relatedConcepts": [{ @@ -2897,9 +3539,23 @@ }] }, "row": { + "superClass": ["group", "widget"], + "accessibleNameRequired": false, + "nameFrom": ["author", "contents"], + "requireContextRole": [ + "grid", + "rowgroup", + "table", + "treegrid" + ], + "requiredOwnedElements": [ + ["cell"], + ["columnheader"], + ["gridcell"], + ["rowheader"] + ], "requiredProps": [], "abstract": false, - "interactive": false, "baseConcepts": [{ "module": "HTML", "concept": { @@ -2908,7 +3564,9 @@ }], "relatedConcepts": [], "props": [ + "aria-colindex", "aria-level", + "aria-rowindex", "aria-selected", "aria-activedescendant", "aria-expanded", @@ -2932,9 +3590,19 @@ "childrenPresentational": false }, "rowgroup": { + "superClass": ["structure"], + "accessibleNameRequired": false, + "nameFrom": ["author", "contents"], + "requireContextRole": [ + "grid", + "table", + "treegrid" + ], + "requiredOwnedElements": [ + ["row"] + ], "requiredProps": [], "abstract": false, - "interactive": false, "baseConcepts": [{ "module": "HTML", "concept": { @@ -2975,9 +3643,15 @@ "childrenPresentational": false }, "rowheader": { + "superClass": ["cell", "gridcell", "sectionhead"], + "accessibleNameRequired": true, + "nameFrom": ["author", "contents"], + "requireContextRole": [ + "row" + ], + "requiredOwnedElements": [], "requiredProps": [], "abstract": false, - "interactive": true, "baseConcepts": [{ "module": "HTML", "concept": { @@ -3014,10 +3688,33 @@ ], "childrenPresentational": false }, + "scrollbar": { + "superClass": ["range"], + "accessibleNameRequired": false, + "nameFrom": ["author"], + "requireContextRole": [], + "requiredOwnedElements": [], + "requiredProps": [], + "abstract": false, + "baseConcepts": [], + "relatedConcepts": [], + "props": [ + "aria-controls", + ["aria-orientation", "vertical"], + ["aria-valuemax", "100"], + ["aria-valuemin", "0"], + ["aria-valuenow", "50"] + ], + "childrenPresentational": true + }, "search": { + "superClass": ["landmark"], + "accessibleNameRequired": false, + "nameFrom": ["author"], + "requireContextRole": [], + "requiredOwnedElements": [], "requiredProps": [], "abstract": false, - "interactive": false, "baseConcepts": [], "relatedConcepts": [], "props": [ @@ -3042,6 +3739,11 @@ "childrenPresentational": false }, "searchbox": { + "superClass": ["textbox"], + "accessibleNameRequired": true, + "nameFrom": ["author"], + "requireContextRole": [], + "requiredOwnedElements": [], "props": [ "aria-activedescendant", "aria-atomic", @@ -3073,7 +3775,6 @@ ], "requiredProps": [], "abstract": false, - "interactive": true, "childrenPresentational": false, "baseConcepts": [{ "module": "HTML", @@ -3088,6 +3789,11 @@ "relatedConcepts": [] }, "section": { + "superClass": ["structure"], + "accessibleNameRequired": false, + "nameFrom": [], + "requireContextRole": [], + "requiredOwnedElements": [], "props": [ "aria-expanded", "aria-atomic", @@ -3109,7 +3815,6 @@ ], "requiredProps": [], "abstract": true, - "interactive": false, "childrenPresentational": false, "baseConcepts": [], "relatedConcepts": [{ @@ -3130,6 +3835,11 @@ }] }, "sectionhead": { + "superClass": ["structure"], + "accessibleNameRequired": false, + "nameFrom": ["author", "contents"], + "requireContextRole": [], + "requiredOwnedElements": [], "props": [ "aria-expanded", "aria-atomic", @@ -3151,13 +3861,18 @@ ], "requiredProps": [], "abstract": true, - "interactive": false, "childrenPresentational": false, "baseConcepts": [], "relatedConcepts": [] }, "select": { + "superClass": ["composite", "group"], + "accessibleNameRequired": false, + "nameFrom": ["author"], + "requireContextRole": [], + "requiredOwnedElements": [], "props": [ + ["aria-orientation", "vertical"], "aria-activedescendant", "aria-atomic", "aria-busy", @@ -3173,21 +3888,25 @@ "aria-label", "aria-labelledby", "aria-live", + "aria-orientation", "aria-owns", "aria-relevant", "aria-expanded" ], "requiredProps": [], "abstract": true, - "interactive": false, "childrenPresentational": false, "baseConcepts": [], "relatedConcepts": [] }, "separator": { + "superClass": ["structure"], + "accessibleNameRequired": false, + "nameFrom": ["author"], + "requireContextRole": [], + "requiredOwnedElements": [], "requiredProps": [], "abstract": false, - "interactive": false, "baseConcepts": [], "relatedConcepts": [{ "module": "HTML", @@ -3197,7 +3916,7 @@ }], "props": [ "aria-expanded", - "aria-orientation", + ["aria-orientation", "horizontal"], "aria-atomic", "aria-busy", "aria-controls", @@ -3218,6 +3937,11 @@ "childrenPresentational": true }, "scrollbar": { + "superClass": [], + "accessibleNameRequired": false, + "nameFrom": ["author"], + "requireContextRole": [], + "requiredOwnedElements": [], "requiredProps": [ "ARIA-CONTROLS", "aria-orientation", @@ -3226,7 +3950,6 @@ "aria-valuenow" ], "abstract": false, - "interactive": false, "baseConcepts": [], "relatedConcepts": [], "props": [ @@ -3255,55 +3978,48 @@ "childrenPresentational": true }, "slider": { + "superClass": ["input", "range"], + "accessibleNameRequired": true, + "nameFrom": ["author"], + "requireContextRole": [], + "requiredOwnedElements": [], "requiredProps": [ - "aria-valuemax", - "aria-valuemin", - "aria-valuenow" + ["aria-valuemax", "100"], + ["aria-valuemin", "0"], + ["aria-valuenow", "50"] ], "abstract": false, - "interactive": true, "baseConcepts": [], "relatedConcepts": [], "props": [ - "aria-valuemax", - "aria-valuemin", - "aria-valuenow", - "aria-orientation", - "aria-atomic", - "aria-busy", - "aria-controls", - "aria-describedby", - "aria-disabled", - "aria-dropeffect", - "aria-flowto", - "aria-grabbed", - "aria-haspopup", - "aria-hidden", - "aria-invalid", - "aria-label", - "aria-labelledby", - "aria-live", - "aria-owns", - "aria-relevant", - "aria-valuetext" + ["aria-orientation", "horizontal"], + "aria-readonly", + ["aria-valuemax", "100"], + ["aria-valuemin", "0"], + ["aria-valuenow", "50"] ], "childrenPresentational": true }, "spinbutton": { + "superClass": ["composite", "input", "range"], + "accessibleNameRequired": true, + "nameFrom": ["author"], + "requireContextRole": [], + "requiredOwnedElements": [], "requiredProps": [ "aria-valuemax", "aria-valuemin", - "aria-valuenow" + ["aria-valuenow", "0"] ], "abstract": false, - "interactive": true, "baseConcepts": [], "relatedConcepts": [], "props": [ "aria-valuemax", "aria-valuemin", - "aria-valuenow", + ["aria-valuenow", "0"], "aria-required", + "aria-readonly", "aria-atomic", "aria-busy", "aria-controls", @@ -3325,14 +4041,18 @@ "childrenPresentational": false }, "status": { + "superClass": ["section"], + "accessibleNameRequired": false, + "nameFrom": ["author"], + "requireContextRole": [], + "requiredOwnedElements": [], "requiredProps": [], "abstract": false, - "interactive": false, "baseConcepts": [], "relatedConcepts": [], "props": [ "aria-expanded", - "aria-atomic", + ["aria-atomic", "true"], "aria-busy", "aria-controls", "aria-describedby", @@ -3345,44 +4065,58 @@ "aria-invalid", "aria-label", "aria-labelledby", - "aria-live", + ["aria-live", "polite"], "aria-owns", "aria-relevant" ], "childrenPresentational": false }, "structure": { + "superClass": ["roletype"], + "accessibleNameRequired": false, + "nameFrom": [], + "requireContextRole": [], + "requiredOwnedElements": [], "props": [ "aria-atomic", "aria-busy", "aria-controls", + "aria-current", "aria-describedby", + "aria-details", "aria-disabled", "aria-dropeffect", + "aria-errormessage", "aria-flowto", "aria-grabbed", "aria-haspopup", "aria-hidden", "aria-invalid", + "aria-keyshortcuts", "aria-label", "aria-labelledby", "aria-live", "aria-owns", - "aria-relevant" + "aria-relevant", + "aria-roledescription" ], "requiredProps": [], "abstract": true, - "interactive": false, "childrenPresentational": false, "baseConcepts": [], "relatedConcepts": [] }, "switch": { + "superClass": ["checkbox"], + "accessibleNameRequired": true, + "nameFrom": ["author", "contents"], + "requireContextRole": [], + "requiredOwnedElements": [], "requiredProps": [ - "aria-checked" + ["aria-checked", "false"] ], "props": [ - "aria-checked", + ["aria-checked", "false"], "aria-atomic", "aria-busy", "aria-controls", @@ -3401,7 +4135,6 @@ "aria-relevant" ], "abstract": false, - "interactive": true, "childrenPresentational": true, "baseConcepts": [], "relatedConcepts": [{ @@ -3412,13 +4145,21 @@ }] }, "tab": { + "superClass": ["sectionhead", "widget"], + "accessibleNameRequired": false, + "nameFrom": ["author", "contents"], + "requireContextRole": [ + "tablist" + ], + "requiredOwnedElements": [], "requiredProps": [], "abstract": false, - "interactive": true, "baseConcepts": [], "relatedConcepts": [], "props": [ - "aria-selected", + "aria-posinset", + ["aria-selected", "false"], + "aria-setsize", "aria-expanded", "aria-atomic", "aria-busy", @@ -3440,9 +4181,16 @@ "childrenPresentational": true }, "table": { + "superClass": ["section"], + "accessibleNameRequired": true, + "nameFrom": ["author"], + "requireContextRole": [], + "requiredOwnedElements": [ + ["row"], + ["rowgroup", "row"] + ], "requiredProps": [], "abstract": false, - "interactive": false, "baseConcepts": [{ "module": "HTML", "concept": { @@ -3451,6 +4199,8 @@ }], "relatedConcepts": [], "props": [ + "aria-colcount", + "aria-rowcount", "aria-atomic", "aria-busy", "aria-controls", @@ -3477,9 +4227,15 @@ "childrenPresentational": false }, "tablist": { + "superClass": ["composite"], + "accessibleNameRequired": false, + "nameFrom": ["author"], + "requireContextRole": [], + "requiredOwnedElements": [ + ["tab"] + ], "requiredProps": [], "abstract": false, - "interactive": false, "baseConcepts": [], "relatedConcepts": [{ "module": "DAISY", @@ -3490,6 +4246,7 @@ "props": [ "aria-level", "aria-multiselectable", + ["aria-orientation", "horizontal"], "aria-activedescendant", "aria-atomic", "aria-busy", @@ -3512,9 +4269,13 @@ "childrenPresentational": false }, "tabpanel": { + "superClass": ["section"], + "accessibleNameRequired": true, + "nameFrom": ["author"], + "requireContextRole": [], + "requiredOwnedElements": [], "requiredProps": [], "abstract": false, - "interactive": false, "baseConcepts": [], "relatedConcepts": [], "props": [ @@ -3539,9 +4300,13 @@ "childrenPresentational": false }, "term": { + "superClass": ["section"], + "accessibleNameRequired": false, + "nameFrom": ["author"], + "requireContextRole": [], + "requiredOwnedElements": [], "requiredProps": [], "abstract": false, - "interactive": false, "baseConcepts": [], "relatedConcepts": [{ "module": "HTML", @@ -3576,9 +4341,13 @@ "childrenPresentational": false }, "textbox": { + "superClass": ["input"], + "accessibleNameRequired": true, + "nameFrom": ["author"], + "requireContextRole": [], + "requiredOwnedElements": [], "requiredProps": [], "abstract": false, - "interactive": true, "baseConcepts": [], "relatedConcepts": [{ "module": "XForms", @@ -3609,6 +4378,7 @@ "aria-activedescendant", "aria-autocomplete", "aria-multiline", + "aria-placeholder", "aria-readonly", "aria-required", "aria-atomic", @@ -3631,9 +4401,13 @@ "childrenPresentational": false }, "timer": { + "superClass": ["status"], + "accessibleNameRequired": true, + "nameFrom": ["author"], + "requireContextRole": [], + "requiredOwnedElements": [], "requiredProps": [], "abstract": false, - "interactive": false, "baseConcepts": [], "relatedConcepts": [], "props": [ @@ -3658,9 +4432,13 @@ "childrenPresentational": false }, "toolbar": { + "superClass": ["group"], + "accessibleNameRequired": false, + "nameFrom": ["author"], + "requireContextRole": [], + "requiredOwnedElements": [], "requiredProps": [], "abstract": false, - "interactive": false, "baseConcepts": [], "relatedConcepts": [{ "module": "ARIA", @@ -3669,6 +4447,7 @@ } }], "props": [ + ["aria-orientation", "horizontal"], "aria-activedescendant", "aria-expanded", "aria-atomic", @@ -3691,9 +4470,13 @@ "childrenPresentational": false }, "tooltip": { + "superClass": ["section"], + "accessibleNameRequired": true, + "nameFrom": ["author", "contents"], + "requireContextRole": [], + "requiredOwnedElements": [], "requiredProps": [], "abstract": false, - "interactive": false, "baseConcepts": [], "relatedConcepts": [], "props": [ @@ -3718,9 +4501,16 @@ "childrenPresentational": false }, "tree": { + "superClass": ["select"], + "accessibleNameRequired": true, + "nameFrom": ["author"], + "requireContextRole": [], + "requiredOwnedElements": [ + ["group", "treeitem"], + ["treeitem"] + ], "requiredProps": [], "abstract": false, - "interactive": false, "baseConcepts": [], "relatedConcepts": [], "props": [ @@ -3743,14 +4533,22 @@ "aria-live", "aria-owns", "aria-relevant", - "aria-expanded" + "aria-expanded", + ["aria-orientation", "vertical"] ], "childrenPresentational": false }, "treegrid": { + "superClass": ["grid", "tree"], + "accessibleNameRequired": false, + "nameFrom": ["author"], + "requireContextRole": [], + "requiredOwnedElements": [ + ["rowgroup", "row"], + ["row"] + ], "requiredProps": [], "abstract": false, - "interactive": false, "baseConcepts": [], "relatedConcepts": [], "props": [ @@ -3780,9 +4578,16 @@ "childrenPresentational": false }, "treeitem": { + "superClass": ["listitem", "option"], + "accessibleNameRequired": true, + "nameFrom": ["author", "contents"], + "requireContextRole": [ + "group", + "tree" + ], + "requiredOwnedElements": [], "requiredProps": [], "abstract": false, - "interactive": true, "baseConcepts": [], "relatedConcepts": [], "props": [ @@ -3812,54 +4617,75 @@ "childrenPresentational": false }, "widget": { + "superClass": ["roletype"], + "accessibleNameRequired": false, + "nameFrom": [], + "requireContextRole": [], + "requiredOwnedElements": [], "props": [ "aria-atomic", "aria-busy", "aria-controls", + "aria-current", "aria-describedby", + "aria-details", "aria-disabled", "aria-dropeffect", + "aria-errormessage", "aria-flowto", "aria-grabbed", "aria-haspopup", "aria-hidden", "aria-invalid", + "aria-keyshortcuts", "aria-label", "aria-labelledby", "aria-live", "aria-owns", - "aria-relevant" + "aria-relevant", + "aria-roledescription" ], "requiredProps": [], "abstract": true, - "interactive": false, "childrenPresentational": false, "baseConcepts": [], "relatedConcepts": [] }, "window": { + "superClass": ["roletype"], + "accessibleNameRequired": false, + "nameFrom": ["author"], + "requireContextRole": [], + "requiredOwnedElements": [], "props": [ "aria-expanded", + "aria-modal", "aria-atomic", "aria-busy", "aria-controls", + "aria-current", "aria-describedby", + "aria-details", "aria-disabled", "aria-dropeffect", + "aria-errormessage", + "aria-expanded", "aria-flowto", "aria-grabbed", "aria-haspopup", "aria-hidden", "aria-invalid", + "aria-keyshortcuts", "aria-label", "aria-labelledby", "aria-live", + "aria-modal", "aria-owns", - "aria-relevant" + "aria-relevant", + "aria-roledescription" ], "requiredProps": [], "abstract": true, - "interactive": false, "baseConcepts": [], "relatedConcepts": [] } From 38b56605661d5b5d0dfcc24393ce546611240f5d Mon Sep 17 00:00:00 2001 From: Jesse Renee Beach Date: Mon, 20 Feb 2017 15:46:11 -0500 Subject: [PATCH 02/15] Transformed the roles.json to individual modules --- ariaAbstractRoles.js | 29 +++ ariaDpubRoles.js | 83 +++++++++ ariaLiteralRoles.js | 143 +++++++++++++++ flow/roles.js | 7 +- package.json | 2 +- scripts/breakUpAriaJSON.js | 178 ++++++++++++++++--- src/ariaMap.js | 2 +- src/elementRoleMap.js | 59 +++--- src/etc/aria/abstract/commandRole.js | 32 ++++ src/etc/aria/abstract/compositeRole.js | 27 +++ src/etc/aria/abstract/inputRole.js | 32 ++++ src/etc/aria/abstract/landmarkRole.js | 26 +++ src/etc/aria/abstract/rangeRole.js | 30 ++++ src/etc/aria/abstract/roletypeRole.js | 61 +++++++ src/etc/aria/abstract/sectionRole.js | 44 +++++ src/etc/aria/abstract/sectionheadRole.js | 28 +++ src/etc/aria/abstract/selectRole.js | 34 ++++ src/etc/aria/abstract/structureRole.js | 22 +++ src/etc/aria/abstract/widgetRole.js | 22 +++ src/etc/aria/abstract/windowRole.js | 27 +++ src/etc/aria/ariaAbstractRoles.js | 32 ++++ src/etc/aria/ariaDpubRoles.js | 86 +++++++++ src/etc/aria/ariaLiteralRoles.js | 146 +++++++++++++++ src/etc/aria/dpub/docAbstractRole.js | 35 ++++ src/etc/aria/dpub/docAcknowledgmentsRole.js | 36 ++++ src/etc/aria/dpub/docAfterwordRole.js | 36 ++++ src/etc/aria/dpub/docAppendixRole.js | 36 ++++ src/etc/aria/dpub/docBacklinkRole.js | 37 ++++ src/etc/aria/dpub/docBiblioentryRole.js | 38 ++++ src/etc/aria/dpub/docBibliographyRole.js | 40 +++++ src/etc/aria/dpub/docBibliorefRole.js | 37 ++++ src/etc/aria/dpub/docChapterRole.js | 36 ++++ src/etc/aria/dpub/docColophonRole.js | 35 ++++ src/etc/aria/dpub/docConclusionRole.js | 36 ++++ src/etc/aria/dpub/docCoverRole.js | 36 ++++ src/etc/aria/dpub/docCreditRole.js | 35 ++++ src/etc/aria/dpub/docCreditsRole.js | 36 ++++ src/etc/aria/dpub/docDedicationRole.js | 35 ++++ src/etc/aria/dpub/docEndnoteRole.js | 38 ++++ src/etc/aria/dpub/docEndnotesRole.js | 40 +++++ src/etc/aria/dpub/docEpigraphRole.js | 35 ++++ src/etc/aria/dpub/docEpilogueRole.js | 36 ++++ src/etc/aria/dpub/docErrataRole.js | 36 ++++ src/etc/aria/dpub/docExampleRole.js | 28 +++ src/etc/aria/dpub/docFootnoteRole.js | 35 ++++ src/etc/aria/dpub/docForewordRole.js | 36 ++++ src/etc/aria/dpub/docGlossaryRole.js | 43 +++++ src/etc/aria/dpub/docGlossrefRole.js | 37 ++++ src/etc/aria/dpub/docIndexRole.js | 37 ++++ src/etc/aria/dpub/docIntroductionRole.js | 36 ++++ src/etc/aria/dpub/docNoterefRole.js | 37 ++++ src/etc/aria/dpub/docNoticeRole.js | 36 ++++ src/etc/aria/dpub/docPagebreakRole.js | 35 ++++ src/etc/aria/dpub/docPagelistRole.js | 37 ++++ src/etc/aria/dpub/docPartRole.js | 36 ++++ src/etc/aria/dpub/docPrefaceRole.js | 36 ++++ src/etc/aria/dpub/docPrologueRole.js | 36 ++++ src/etc/aria/dpub/docPullquoteRole.js | 31 ++++ src/etc/aria/dpub/docQnaRole.js | 35 ++++ src/etc/aria/dpub/docSubtitleRole.js | 35 ++++ src/etc/aria/dpub/docTipRole.js | 36 ++++ src/etc/aria/dpub/docTocRole.js | 37 ++++ src/etc/aria/literal/alertRole.js | 36 ++++ src/etc/aria/literal/alertdialogRole.js | 39 ++++ src/etc/aria/literal/applicationRole.js | 33 ++++ src/etc/aria/literal/articleRole.js | 36 ++++ src/etc/aria/literal/bannerRole.js | 27 +++ src/etc/aria/literal/buttonRole.js | 50 ++++++ src/etc/aria/literal/cellRole.js | 41 +++++ src/etc/aria/literal/checkboxRole.js | 51 ++++++ src/etc/aria/literal/columnheaderRole.js | 62 +++++++ src/etc/aria/literal/comboboxRole.js | 72 ++++++++ src/etc/aria/literal/complementaryRole.js | 27 +++ src/etc/aria/literal/contentinfoRole.js | 27 +++ src/etc/aria/literal/definitionRole.js | 39 ++++ src/etc/aria/literal/dialogRole.js | 25 +++ src/etc/aria/literal/directoryRole.js | 31 ++++ src/etc/aria/literal/documentRole.js | 33 ++++ src/etc/aria/literal/feedRole.js | 31 ++++ src/etc/aria/literal/figureRole.js | 33 ++++ src/etc/aria/literal/formRole.js | 34 ++++ src/etc/aria/literal/gridRole.js | 51 ++++++ src/etc/aria/literal/gridcellRole.js | 45 +++++ src/etc/aria/literal/groupRole.js | 35 ++++ src/etc/aria/literal/headingRole.js | 66 +++++++ src/etc/aria/literal/imgRole.js | 39 ++++ src/etc/aria/literal/linkRole.js | 42 +++++ src/etc/aria/literal/listRole.js | 47 +++++ src/etc/aria/literal/listboxRole.js | 62 +++++++ src/etc/aria/literal/listitemRole.js | 47 +++++ src/etc/aria/literal/logRole.js | 28 +++ src/etc/aria/literal/mainRole.js | 34 ++++ src/etc/aria/literal/marqueeRole.js | 26 +++ src/etc/aria/literal/mathRole.js | 26 +++ src/etc/aria/literal/menuRole.js | 75 ++++++++ src/etc/aria/literal/menubarRole.js | 59 ++++++ src/etc/aria/literal/menuitemRole.js | 59 ++++++ src/etc/aria/literal/menuitemcheckboxRole.js | 48 +++++ src/etc/aria/literal/menuitemradioRole.js | 57 ++++++ src/etc/aria/literal/navigationRole.js | 34 ++++ src/etc/aria/literal/noneRole.js | 14 ++ src/etc/aria/literal/noteRole.js | 26 +++ src/etc/aria/literal/optionRole.js | 56 ++++++ src/etc/aria/literal/presentationRole.js | 25 +++ src/etc/aria/literal/progressbarRole.js | 33 ++++ src/etc/aria/literal/radioRole.js | 47 +++++ src/etc/aria/literal/radiogroupRole.js | 48 +++++ src/etc/aria/literal/regionRole.js | 45 +++++ src/etc/aria/literal/rowRole.js | 62 +++++++ src/etc/aria/literal/rowgroupRole.js | 56 ++++++ src/etc/aria/literal/rowheaderRole.js | 62 +++++++ src/etc/aria/literal/scrollbarRole.js | 48 +++++ src/etc/aria/literal/searchRole.js | 27 +++ src/etc/aria/literal/searchboxRole.js | 40 +++++ src/etc/aria/literal/separatorRole.js | 35 ++++ src/etc/aria/literal/sliderRole.js | 41 +++++ src/etc/aria/literal/spinbuttonRole.js | 44 +++++ src/etc/aria/literal/statusRole.js | 29 +++ src/etc/aria/literal/switchRole.js | 39 ++++ src/etc/aria/literal/tabRole.js | 37 ++++ src/etc/aria/literal/tableRole.js | 44 +++++ src/etc/aria/literal/tablistRole.js | 42 +++++ src/etc/aria/literal/tabpanelRole.js | 26 +++ src/etc/aria/literal/termRole.js | 33 ++++ src/etc/aria/literal/textboxRole.js | 64 +++++++ src/etc/aria/literal/timerRole.js | 27 +++ src/etc/aria/literal/toolbarRole.js | 36 ++++ src/etc/aria/literal/tooltipRole.js | 27 +++ src/etc/aria/literal/treeRole.js | 46 +++++ src/etc/aria/literal/treegridRole.js | 57 ++++++ src/etc/aria/literal/treeitemRole.js | 37 ++++ src/etc/roles.json | 13 +- src/roleElementMap.js | 51 +++--- src/rolesMap.js | 21 ++- 134 files changed, 5418 insertions(+), 87 deletions(-) create mode 100644 ariaAbstractRoles.js create mode 100644 ariaDpubRoles.js create mode 100644 ariaLiteralRoles.js create mode 100644 src/etc/aria/abstract/commandRole.js create mode 100644 src/etc/aria/abstract/compositeRole.js create mode 100644 src/etc/aria/abstract/inputRole.js create mode 100644 src/etc/aria/abstract/landmarkRole.js create mode 100644 src/etc/aria/abstract/rangeRole.js create mode 100644 src/etc/aria/abstract/roletypeRole.js create mode 100644 src/etc/aria/abstract/sectionRole.js create mode 100644 src/etc/aria/abstract/sectionheadRole.js create mode 100644 src/etc/aria/abstract/selectRole.js create mode 100644 src/etc/aria/abstract/structureRole.js create mode 100644 src/etc/aria/abstract/widgetRole.js create mode 100644 src/etc/aria/abstract/windowRole.js create mode 100644 src/etc/aria/ariaAbstractRoles.js create mode 100644 src/etc/aria/ariaDpubRoles.js create mode 100644 src/etc/aria/ariaLiteralRoles.js create mode 100644 src/etc/aria/dpub/docAbstractRole.js create mode 100644 src/etc/aria/dpub/docAcknowledgmentsRole.js create mode 100644 src/etc/aria/dpub/docAfterwordRole.js create mode 100644 src/etc/aria/dpub/docAppendixRole.js create mode 100644 src/etc/aria/dpub/docBacklinkRole.js create mode 100644 src/etc/aria/dpub/docBiblioentryRole.js create mode 100644 src/etc/aria/dpub/docBibliographyRole.js create mode 100644 src/etc/aria/dpub/docBibliorefRole.js create mode 100644 src/etc/aria/dpub/docChapterRole.js create mode 100644 src/etc/aria/dpub/docColophonRole.js create mode 100644 src/etc/aria/dpub/docConclusionRole.js create mode 100644 src/etc/aria/dpub/docCoverRole.js create mode 100644 src/etc/aria/dpub/docCreditRole.js create mode 100644 src/etc/aria/dpub/docCreditsRole.js create mode 100644 src/etc/aria/dpub/docDedicationRole.js create mode 100644 src/etc/aria/dpub/docEndnoteRole.js create mode 100644 src/etc/aria/dpub/docEndnotesRole.js create mode 100644 src/etc/aria/dpub/docEpigraphRole.js create mode 100644 src/etc/aria/dpub/docEpilogueRole.js create mode 100644 src/etc/aria/dpub/docErrataRole.js create mode 100644 src/etc/aria/dpub/docExampleRole.js create mode 100644 src/etc/aria/dpub/docFootnoteRole.js create mode 100644 src/etc/aria/dpub/docForewordRole.js create mode 100644 src/etc/aria/dpub/docGlossaryRole.js create mode 100644 src/etc/aria/dpub/docGlossrefRole.js create mode 100644 src/etc/aria/dpub/docIndexRole.js create mode 100644 src/etc/aria/dpub/docIntroductionRole.js create mode 100644 src/etc/aria/dpub/docNoterefRole.js create mode 100644 src/etc/aria/dpub/docNoticeRole.js create mode 100644 src/etc/aria/dpub/docPagebreakRole.js create mode 100644 src/etc/aria/dpub/docPagelistRole.js create mode 100644 src/etc/aria/dpub/docPartRole.js create mode 100644 src/etc/aria/dpub/docPrefaceRole.js create mode 100644 src/etc/aria/dpub/docPrologueRole.js create mode 100644 src/etc/aria/dpub/docPullquoteRole.js create mode 100644 src/etc/aria/dpub/docQnaRole.js create mode 100644 src/etc/aria/dpub/docSubtitleRole.js create mode 100644 src/etc/aria/dpub/docTipRole.js create mode 100644 src/etc/aria/dpub/docTocRole.js create mode 100644 src/etc/aria/literal/alertRole.js create mode 100644 src/etc/aria/literal/alertdialogRole.js create mode 100644 src/etc/aria/literal/applicationRole.js create mode 100644 src/etc/aria/literal/articleRole.js create mode 100644 src/etc/aria/literal/bannerRole.js create mode 100644 src/etc/aria/literal/buttonRole.js create mode 100644 src/etc/aria/literal/cellRole.js create mode 100644 src/etc/aria/literal/checkboxRole.js create mode 100644 src/etc/aria/literal/columnheaderRole.js create mode 100644 src/etc/aria/literal/comboboxRole.js create mode 100644 src/etc/aria/literal/complementaryRole.js create mode 100644 src/etc/aria/literal/contentinfoRole.js create mode 100644 src/etc/aria/literal/definitionRole.js create mode 100644 src/etc/aria/literal/dialogRole.js create mode 100644 src/etc/aria/literal/directoryRole.js create mode 100644 src/etc/aria/literal/documentRole.js create mode 100644 src/etc/aria/literal/feedRole.js create mode 100644 src/etc/aria/literal/figureRole.js create mode 100644 src/etc/aria/literal/formRole.js create mode 100644 src/etc/aria/literal/gridRole.js create mode 100644 src/etc/aria/literal/gridcellRole.js create mode 100644 src/etc/aria/literal/groupRole.js create mode 100644 src/etc/aria/literal/headingRole.js create mode 100644 src/etc/aria/literal/imgRole.js create mode 100644 src/etc/aria/literal/linkRole.js create mode 100644 src/etc/aria/literal/listRole.js create mode 100644 src/etc/aria/literal/listboxRole.js create mode 100644 src/etc/aria/literal/listitemRole.js create mode 100644 src/etc/aria/literal/logRole.js create mode 100644 src/etc/aria/literal/mainRole.js create mode 100644 src/etc/aria/literal/marqueeRole.js create mode 100644 src/etc/aria/literal/mathRole.js create mode 100644 src/etc/aria/literal/menuRole.js create mode 100644 src/etc/aria/literal/menubarRole.js create mode 100644 src/etc/aria/literal/menuitemRole.js create mode 100644 src/etc/aria/literal/menuitemcheckboxRole.js create mode 100644 src/etc/aria/literal/menuitemradioRole.js create mode 100644 src/etc/aria/literal/navigationRole.js create mode 100644 src/etc/aria/literal/noneRole.js create mode 100644 src/etc/aria/literal/noteRole.js create mode 100644 src/etc/aria/literal/optionRole.js create mode 100644 src/etc/aria/literal/presentationRole.js create mode 100644 src/etc/aria/literal/progressbarRole.js create mode 100644 src/etc/aria/literal/radioRole.js create mode 100644 src/etc/aria/literal/radiogroupRole.js create mode 100644 src/etc/aria/literal/regionRole.js create mode 100644 src/etc/aria/literal/rowRole.js create mode 100644 src/etc/aria/literal/rowgroupRole.js create mode 100644 src/etc/aria/literal/rowheaderRole.js create mode 100644 src/etc/aria/literal/scrollbarRole.js create mode 100644 src/etc/aria/literal/searchRole.js create mode 100644 src/etc/aria/literal/searchboxRole.js create mode 100644 src/etc/aria/literal/separatorRole.js create mode 100644 src/etc/aria/literal/sliderRole.js create mode 100644 src/etc/aria/literal/spinbuttonRole.js create mode 100644 src/etc/aria/literal/statusRole.js create mode 100644 src/etc/aria/literal/switchRole.js create mode 100644 src/etc/aria/literal/tabRole.js create mode 100644 src/etc/aria/literal/tableRole.js create mode 100644 src/etc/aria/literal/tablistRole.js create mode 100644 src/etc/aria/literal/tabpanelRole.js create mode 100644 src/etc/aria/literal/termRole.js create mode 100644 src/etc/aria/literal/textboxRole.js create mode 100644 src/etc/aria/literal/timerRole.js create mode 100644 src/etc/aria/literal/toolbarRole.js create mode 100644 src/etc/aria/literal/tooltipRole.js create mode 100644 src/etc/aria/literal/treeRole.js create mode 100644 src/etc/aria/literal/treegridRole.js create mode 100644 src/etc/aria/literal/treeitemRole.js diff --git a/ariaAbstractRoles.js b/ariaAbstractRoles.js new file mode 100644 index 00000000..eed0563a --- /dev/null +++ b/ariaAbstractRoles.js @@ -0,0 +1,29 @@ +import commandRole from './abstract/commandRole'; +import compositeRole from './abstract/compositeRole'; +import inputRole from './abstract/inputRole'; +import landmarkRole from './abstract/landmarkRole'; +import rangeRole from './abstract/rangeRole'; +import roletypeRole from './abstract/roletypeRole'; +import sectionRole from './abstract/sectionRole'; +import sectionheadRole from './abstract/sectionheadRole'; +import selectRole from './abstract/selectRole'; +import structureRole from './abstract/structureRole'; +import widgetRole from './abstract/widgetRole'; +import windowRole from './abstract/windowRole'; + +const ariaLiteralRoles = new Map([ + ['command', commandRole], + ['composite', compositeRole], + ['input', inputRole], + ['landmark', landmarkRole], + ['range', rangeRole], + ['roletype', roletypeRole], + ['section', sectionRole], + ['sectionhead', sectionheadRole], + ['select', selectRole], + ['structure', structureRole], + ['widget', widgetRole], + ['window', windowRole] +]); + +export default ariaLiteralRoles; \ No newline at end of file diff --git a/ariaDpubRoles.js b/ariaDpubRoles.js new file mode 100644 index 00000000..f5799216 --- /dev/null +++ b/ariaDpubRoles.js @@ -0,0 +1,83 @@ +import docAbstractRole from './dpub/docAbstractRole'; +import docAcknowledgmentsRole from './dpub/docAcknowledgmentsRole'; +import docAfterwordRole from './dpub/docAfterwordRole'; +import docAppendixRole from './dpub/docAppendixRole'; +import docBacklinkRole from './dpub/docBacklinkRole'; +import docBiblioentryRole from './dpub/docBiblioentryRole'; +import docBibliographyRole from './dpub/docBibliographyRole'; +import docBibliorefRole from './dpub/docBibliorefRole'; +import docChapterRole from './dpub/docChapterRole'; +import docColophonRole from './dpub/docColophonRole'; +import docConclusionRole from './dpub/docConclusionRole'; +import docCoverRole from './dpub/docCoverRole'; +import docCreditRole from './dpub/docCreditRole'; +import docCreditsRole from './dpub/docCreditsRole'; +import docDedicationRole from './dpub/docDedicationRole'; +import docEndnoteRole from './dpub/docEndnoteRole'; +import docEndnotesRole from './dpub/docEndnotesRole'; +import docEpigraphRole from './dpub/docEpigraphRole'; +import docEpilogueRole from './dpub/docEpilogueRole'; +import docErrataRole from './dpub/docErrataRole'; +import docExampleRole from './dpub/docExampleRole'; +import docFootnoteRole from './dpub/docFootnoteRole'; +import docForewordRole from './dpub/docForewordRole'; +import docGlossaryRole from './dpub/docGlossaryRole'; +import docGlossrefRole from './dpub/docGlossrefRole'; +import docIndexRole from './dpub/docIndexRole'; +import docIntroductionRole from './dpub/docIntroductionRole'; +import docNoterefRole from './dpub/docNoterefRole'; +import docNoticeRole from './dpub/docNoticeRole'; +import docPagebreakRole from './dpub/docPagebreakRole'; +import docPagelistRole from './dpub/docPagelistRole'; +import docPartRole from './dpub/docPartRole'; +import docPrefaceRole from './dpub/docPrefaceRole'; +import docPrologueRole from './dpub/docPrologueRole'; +import docPullquoteRole from './dpub/docPullquoteRole'; +import docQnaRole from './dpub/docQnaRole'; +import docSubtitleRole from './dpub/docSubtitleRole'; +import docTipRole from './dpub/docTipRole'; +import docTocRole from './dpub/docTocRole'; + +const ariaLiteralRoles = new Map([ + ['doc-abstract', docAbstractRole], + ['doc-acknowledgments', docAcknowledgmentsRole], + ['doc-afterword', docAfterwordRole], + ['doc-appendix', docAppendixRole], + ['doc-backlink', docBacklinkRole], + ['doc-biblioentry', docBiblioentryRole], + ['doc-bibliography', docBibliographyRole], + ['doc-biblioref', docBibliorefRole], + ['doc-chapter', docChapterRole], + ['doc-colophon', docColophonRole], + ['doc-conclusion', docConclusionRole], + ['doc-cover', docCoverRole], + ['doc-credit', docCreditRole], + ['doc-credits', docCreditsRole], + ['doc-dedication', docDedicationRole], + ['doc-endnote', docEndnoteRole], + ['doc-endnotes', docEndnotesRole], + ['doc-epigraph', docEpigraphRole], + ['doc-epilogue', docEpilogueRole], + ['doc-errata', docErrataRole], + ['doc-example', docExampleRole], + ['doc-footnote', docFootnoteRole], + ['doc-foreword', docForewordRole], + ['doc-glossary', docGlossaryRole], + ['doc-glossref', docGlossrefRole], + ['doc-index', docIndexRole], + ['doc-introduction', docIntroductionRole], + ['doc-noteref', docNoterefRole], + ['doc-notice', docNoticeRole], + ['doc-pagebreak', docPagebreakRole], + ['doc-pagelist', docPagelistRole], + ['doc-part', docPartRole], + ['doc-preface', docPrefaceRole], + ['doc-prologue', docPrologueRole], + ['doc-pullquote', docPullquoteRole], + ['doc-qna', docQnaRole], + ['doc-subtitle', docSubtitleRole], + ['doc-tip', docTipRole], + ['doc-toc', docTocRole] +]); + +export default ariaLiteralRoles; \ No newline at end of file diff --git a/ariaLiteralRoles.js b/ariaLiteralRoles.js new file mode 100644 index 00000000..0916b8ac --- /dev/null +++ b/ariaLiteralRoles.js @@ -0,0 +1,143 @@ +import alertRole from './literal/alertRole'; +import alertdialogRole from './literal/alertdialogRole'; +import applicationRole from './literal/applicationRole'; +import articleRole from './literal/articleRole'; +import bannerRole from './literal/bannerRole'; +import buttonRole from './literal/buttonRole'; +import cellRole from './literal/cellRole'; +import checkboxRole from './literal/checkboxRole'; +import columnheaderRole from './literal/columnheaderRole'; +import comboboxRole from './literal/comboboxRole'; +import complementaryRole from './literal/complementaryRole'; +import contentinfoRole from './literal/contentinfoRole'; +import definitionRole from './literal/definitionRole'; +import dialogRole from './literal/dialogRole'; +import directoryRole from './literal/directoryRole'; +import documentRole from './literal/documentRole'; +import feedRole from './literal/feedRole'; +import figureRole from './literal/figureRole'; +import formRole from './literal/formRole'; +import gridRole from './literal/gridRole'; +import gridcellRole from './literal/gridcellRole'; +import groupRole from './literal/groupRole'; +import headingRole from './literal/headingRole'; +import imgRole from './literal/imgRole'; +import linkRole from './literal/linkRole'; +import listRole from './literal/listRole'; +import listboxRole from './literal/listboxRole'; +import listitemRole from './literal/listitemRole'; +import logRole from './literal/logRole'; +import mainRole from './literal/mainRole'; +import marqueeRole from './literal/marqueeRole'; +import mathRole from './literal/mathRole'; +import menuRole from './literal/menuRole'; +import menubarRole from './literal/menubarRole'; +import menuitemRole from './literal/menuitemRole'; +import menuitemcheckboxRole from './literal/menuitemcheckboxRole'; +import menuitemradioRole from './literal/menuitemradioRole'; +import navigationRole from './literal/navigationRole'; +import noneRole from './literal/noneRole'; +import noteRole from './literal/noteRole'; +import optionRole from './literal/optionRole'; +import presentationRole from './literal/presentationRole'; +import progressbarRole from './literal/progressbarRole'; +import radioRole from './literal/radioRole'; +import radiogroupRole from './literal/radiogroupRole'; +import regionRole from './literal/regionRole'; +import rowRole from './literal/rowRole'; +import rowgroupRole from './literal/rowgroupRole'; +import rowheaderRole from './literal/rowheaderRole'; +import scrollbarRole from './literal/scrollbarRole'; +import searchRole from './literal/searchRole'; +import searchboxRole from './literal/searchboxRole'; +import separatorRole from './literal/separatorRole'; +import sliderRole from './literal/sliderRole'; +import spinbuttonRole from './literal/spinbuttonRole'; +import statusRole from './literal/statusRole'; +import switchRole from './literal/switchRole'; +import tabRole from './literal/tabRole'; +import tableRole from './literal/tableRole'; +import tablistRole from './literal/tablistRole'; +import tabpanelRole from './literal/tabpanelRole'; +import termRole from './literal/termRole'; +import textboxRole from './literal/textboxRole'; +import timerRole from './literal/timerRole'; +import toolbarRole from './literal/toolbarRole'; +import tooltipRole from './literal/tooltipRole'; +import treeRole from './literal/treeRole'; +import treegridRole from './literal/treegridRole'; +import treeitemRole from './literal/treeitemRole'; + +const ariaLiteralRoles = new Map([ + ['alert', alertRole], + ['alertdialog', alertdialogRole], + ['application', applicationRole], + ['article', articleRole], + ['banner', bannerRole], + ['button', buttonRole], + ['cell', cellRole], + ['checkbox', checkboxRole], + ['columnheader', columnheaderRole], + ['combobox', comboboxRole], + ['complementary', complementaryRole], + ['contentinfo', contentinfoRole], + ['definition', definitionRole], + ['dialog', dialogRole], + ['directory', directoryRole], + ['document', documentRole], + ['feed', feedRole], + ['figure', figureRole], + ['form', formRole], + ['grid', gridRole], + ['gridcell', gridcellRole], + ['group', groupRole], + ['heading', headingRole], + ['img', imgRole], + ['link', linkRole], + ['list', listRole], + ['listbox', listboxRole], + ['listitem', listitemRole], + ['log', logRole], + ['main', mainRole], + ['marquee', marqueeRole], + ['math', mathRole], + ['menu', menuRole], + ['menubar', menubarRole], + ['menuitem', menuitemRole], + ['menuitemcheckbox', menuitemcheckboxRole], + ['menuitemradio', menuitemradioRole], + ['navigation', navigationRole], + ['none', noneRole], + ['note', noteRole], + ['option', optionRole], + ['presentation', presentationRole], + ['progressbar', progressbarRole], + ['radio', radioRole], + ['radiogroup', radiogroupRole], + ['region', regionRole], + ['row', rowRole], + ['rowgroup', rowgroupRole], + ['rowheader', rowheaderRole], + ['scrollbar', scrollbarRole], + ['search', searchRole], + ['searchbox', searchboxRole], + ['separator', separatorRole], + ['slider', sliderRole], + ['spinbutton', spinbuttonRole], + ['status', statusRole], + ['switch', switchRole], + ['tab', tabRole], + ['table', tableRole], + ['tablist', tablistRole], + ['tabpanel', tabpanelRole], + ['term', termRole], + ['textbox', textboxRole], + ['timer', timerRole], + ['toolbar', toolbarRole], + ['tooltip', tooltipRole], + ['tree', treeRole], + ['treegrid', treegridRole], + ['treeitem', treeitemRole] +]); + +export default ariaLiteralRoles; \ No newline at end of file diff --git a/flow/roles.js b/flow/roles.js index 1222e6f0..86f5174d 100644 --- a/flow/roles.js +++ b/flow/roles.js @@ -6,15 +6,14 @@ type RoleDefinition = { abstract: boolean, baseConcepts: Array, childrenPresentational: boolean, - interactive: boolean, - props: Array, + props: {[key: string]: mixed}, relatedConcepts: Array, - requiredProps: Array, + requiredProps: {[key: string]: mixed}, }; type RoleRelation = { module?: string, - concept: RelationConcept, + concept?: RelationConcept, }; type RelationConcept = { diff --git a/package.json b/package.json index 04bff9c8..c09d94c0 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "lib" ], "scripts": { - "build": "rimraf lib && babel src --out-dir lib && cp -R src/etc/ lib/etc", + "build": "rimraf lib && babel src --out-dir lib && cp -R src/etc/{dom,aria}.json lib/etc", "prepublish": "npm run lint && npm run flow && npm run test && npm run build", "coveralls": "cat ./reports/lcov.info | coveralls", "flow": "flow; test $? -eq 0 -o $? -eq 2", diff --git a/scripts/breakUpAriaJSON.js b/scripts/breakUpAriaJSON.js index ec833eda..5c7b76a6 100644 --- a/scripts/breakUpAriaJSON.js +++ b/scripts/breakUpAriaJSON.js @@ -3,6 +3,29 @@ const fs = require('fs'); const path = require('path'); +const baseDir = 'src/etc/aria'; + +const literalRequires = []; +const abstractRequires = []; +const dpubRequires = []; + +function createCamelName (name) { + const nameArr = name.split('-'); + if (nameArr.length > 1) { + nameArr[1] = nameArr[1].slice(0, 1).toUpperCase() + + nameArr[1].slice(1); + } + return nameArr.join('') + 'Role'; +} + +function createKeyName (key) { + if (key.includes('-')) { + return `'${key}'`; + } else { + return key; + } +} + function getTypeof(value) { return Array.isArray(value) ? 'array' @@ -18,9 +41,9 @@ function stringifyBoolean(value) { function stringifyArray(arr, depth) { const output = []; if (arr.length === 0) { - output.push('new Set([])'); + output.push('[]'); } else { - output.push('(new Set(['); + output.push('['); let tmp = []; (new Set(arr)).forEach( value => { @@ -30,7 +53,7 @@ function stringifyArray(arr, depth) { } ); output.push(tmp.join('\n')); - output.push(`${constructIndent(depth - 1)}]))`); + output.push(`${constructIndent(depth - 1)}]`); } return output.join('\n'); } @@ -39,15 +62,15 @@ function stringifyObject(value, depth) { let output = []; const keys = Object.keys(value); if (keys.length === 0) { - output.push('(new Map([]))'); + output.push('{}'); } else { - output.push(`(new Map([`); + output.push(`{`); const tmp = []; keys.forEach(key => { - tmp.push(`${constructIndent(depth)}['${key}', ${triageValue(value[key], (depth))}],`); + tmp.push(`${constructIndent(depth)}${createKeyName(key)}: ${triageValue(value[key], (depth))},`); }); output.push(tmp.join('\n')); - output.push(`${constructIndent(depth - 1)}]))`); + output.push(`${constructIndent(depth - 1)}}`); } return output.join('\n'); } @@ -85,18 +108,43 @@ fs.readFile(path.join('src/etc/roles.json'), { process.exit(); } let aria = JSON.parse(data); + + function superClassWalker (klasses, stack = []) { + let output = []; + for (let klass of klasses) { + const newStack = stack.slice(); + newStack.unshift(klass); + let superClasses = aria[klass]['superClass']; + if (superClasses.length > 0) { + output = output.concat( + superClassWalker(superClasses, newStack) + ); + } else { + output.push(newStack); + } + } + return output; + } + + // Get a map of superClasses + const accumulatedSuperClasses = new Map([]); Object.keys(aria) .forEach((name) => { - const nameArr = name.split('-'); - if (nameArr.length > 1) { - nameArr[1] = nameArr[1].slice(0, 1).toUpperCase() - + nameArr[1].slice(1); - } - const camelName = nameArr.join('') + 'Role'; + // Create a set of all the props of the super classes. + let superClasses = aria[name]['superClass']; + const accumulation = superClassWalker(superClasses); + return accumulatedSuperClasses.set(name, accumulation); + }); + + Object.keys(aria) + .forEach((name) => { + const camelName = createCamelName(name); const file = [ - `const ${camelName} = new Map([]);`, - '', + '/**', + ' * @flow', + ' */', + `const ${camelName}: RoleDefinition = {`, Object.keys(aria[name]) .sort() .filter((prop) => !['interactive'].includes(prop)) @@ -134,6 +182,7 @@ fs.readFile(path.join('src/etc/roles.json'), { return keep; }); } + // Always returns true. Using filter simply to chain. return true; }) .map((prop) => { @@ -153,23 +202,110 @@ fs.readFile(path.join('src/etc/roles.json'), { return acc; }, {}); } - return `${camelName}.set(\'${prop}\', ${triageValue(value).join('\n')});`; + if (prop === 'superClass') { + value = accumulatedSuperClasses.get(name); + } + let depth = 1; + return `${constructIndent(depth)}${createKeyName(prop)}: ${triageValue(value, depth).join('\n')},`; }).join('\n'), + '};', '', `export default ${camelName};`, ]; - let baseDir = 'src/etc/aria'; let subDir = ''; if (aria[name].abstract) { subDir = 'abstract'; + abstractRequires.push(camelName); } else if (name.indexOf('doc-') === 0) { subDir = 'dpub'; + dpubRequires.push(camelName); + } else { + subDir = 'literal'; + literalRequires.push(camelName); } + fs.mkdir(path.join(baseDir, subDir), function () { - fs.writeFile(path.join(baseDir, subDir, `${camelName}.js`), file.join('\n'), function (err) { - if (err) throw err; - console.log(`Created file ${baseDir}/${subDir}/${camelName}.js`); - }); + fs.writeFile( + path.join(baseDir, subDir, `${camelName}.js`), + file.join('\n'), + { + encoding: 'utf8' + }, + function (err) { + if (err) throw err; + console.log(`Created file ${baseDir}/${subDir}/${camelName}.js`); + }); }); }); }); + +function requiresMapper (roles, path, depth) { + return roles.map(role => { + return `${constructIndent(depth)}import ${role[1]} from \'./${path}/${role[1]}\';`; + }).join('\n'); +} + +function requiresCombiner(roles, depth) { + return roles.map(role => { + return `${constructIndent(depth)}[\'${role[0]}\', ${role[1]}]`; + }).join(',\n'); +} + +const srcDir = 'src'; + +fs.readFile(path.join('src/etc/roles.json'), { + encoding: 'utf8' +}, (error, data) => { + if (error) { + console.error(error); + process.exit(); + } + + const literalRequires = []; + const abstractRequires = []; + const dpubRequires = []; + + let aria = JSON.parse(data); + Object.keys(aria) + .forEach((name) => { + const camelName = createCamelName(name); + + if (aria[name].abstract) { + subDir = 'abstract'; + abstractRequires.push([name, camelName]); + } else if (name.indexOf('doc-') === 0) { + subDir = 'dpub'; + dpubRequires.push([name, camelName]); + } else { + literalRequires.push([name, camelName]); + } + }); + + // Create a rollup maps. + [ + [literalRequires, 'ariaLiteralRoles', 'literal'], + [abstractRequires, 'ariaAbstractRoles', 'abstract'], + [dpubRequires, 'ariaDpubRoles', 'dpub'], + ].forEach(requires => { + fs.writeFile( + path.join(baseDir, `${requires[1]}.js`), + '/**\n' + + ' * @flow\n' + + ' */\n' + + `${requiresMapper(requires[0], path.join(requires[2]), 0)}\n` + + `\n` + + `const ariaLiteralRoles = new Map([\n` + + `${requiresCombiner(requires[0], 1)}\n` + + `]);\n` + + `\n` + + `export default ariaLiteralRoles;`, + { + encoding: 'ascii' + }, + function (err) { + if (err) throw err; + console.log(`Created file ${baseDir}/${requires[1]}.js`); + } + ); + }); +}); diff --git a/src/ariaMap.js b/src/ariaMap.js index 85e66820..0d8c051a 100644 --- a/src/ariaMap.js +++ b/src/ariaMap.js @@ -4,7 +4,7 @@ import ariaJSON from './etc/aria.json'; -type MapOfRoleDefinitions = Map; +type MapOfRoleDefinitions = Map; const ariaMap: MapOfRoleDefinitions = new Map([]); diff --git a/src/elementRoleMap.js b/src/elementRoleMap.js index 33fb2022..3ad474b6 100644 --- a/src/elementRoleMap.js +++ b/src/elementRoleMap.js @@ -6,32 +6,41 @@ import rolesMap from './rolesMap'; type RoleSet = Set; -type ElementRoleRelationMap = Map; - -// $FlowFixMe: spread operand is valid on $Iterable -const elementRoleMap: ElementRoleRelationMap = [...rolesMap.keys()] - .reduce(( - accumulator: ElementRoleRelationMap, - key: string, - ): ElementRoleRelationMap => { - const role = rolesMap.get(key); - if (role) { - [ - ...role.baseConcepts, - ...role.relatedConcepts, - ] - .forEach(( - relation: RoleRelation, - ): void => { - if (relation.module === 'HTML') { - const concept = JSON.stringify(relation.concept); - const roles: RoleSet = accumulator.get(concept) || new Set([]); +type ElementRoleRelationMap = Map; + +const elementRoleMap: ElementRoleRelationMap = new Map([]); + +[...rolesMap.keys()] + .forEach(( + key: string, + ): void => { + const role = rolesMap.get(key); + if (role) { + [ + ...role.baseConcepts, + ...role.relatedConcepts, + ] + .forEach(( + relation: RoleRelation, + ): void => { + if (relation.module === 'HTML') { + const concept = relation.concept; + if (concept) { + const conceptStr = JSON.stringify(concept); + + let roles: ?RoleSet = ([...elementRoleMap.entries()] + .find(([key, value]) => JSON.stringify(key) === conceptStr) + || [])[1]; + + if (!roles) { + roles = new Set([]); + } roles.add(key); - accumulator.set(concept, roles); + elementRoleMap.set(concept, roles); } - }); - } - return accumulator; - }, new Map([])); + } + }); + } + }); export default elementRoleMap; diff --git a/src/etc/aria/abstract/commandRole.js b/src/etc/aria/abstract/commandRole.js new file mode 100644 index 00000000..4d002794 --- /dev/null +++ b/src/etc/aria/abstract/commandRole.js @@ -0,0 +1,32 @@ +/** + * @flow + */ +const commandRole: RoleDefinition = { + abstract: true, + accessibleNameRequired: false, + baseConcepts: [], + childrenPresentational: false, + nameFrom: [ + 'author', + ], + props: {}, + relatedConcepts: [ + { + module: 'HTML', + concept: { + name: 'menuitem', + }, + }, + ], + requireContextRole: [], + requiredOwnedElements: [], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'widget', + ], + ], +}; + +export default commandRole; \ No newline at end of file diff --git a/src/etc/aria/abstract/compositeRole.js b/src/etc/aria/abstract/compositeRole.js new file mode 100644 index 00000000..d4847276 --- /dev/null +++ b/src/etc/aria/abstract/compositeRole.js @@ -0,0 +1,27 @@ +/** + * @flow + */ +const compositeRole: RoleDefinition = { + abstract: true, + accessibleNameRequired: false, + baseConcepts: [], + childrenPresentational: false, + nameFrom: [ + 'author', + ], + props: { + 'aria-activedescendant': null, + }, + relatedConcepts: [], + requireContextRole: [], + requiredOwnedElements: [], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'widget', + ], + ], +}; + +export default compositeRole; \ No newline at end of file diff --git a/src/etc/aria/abstract/inputRole.js b/src/etc/aria/abstract/inputRole.js new file mode 100644 index 00000000..706a82f9 --- /dev/null +++ b/src/etc/aria/abstract/inputRole.js @@ -0,0 +1,32 @@ +/** + * @flow + */ +const inputRole: RoleDefinition = { + abstract: true, + accessibleNameRequired: false, + baseConcepts: [], + childrenPresentational: false, + nameFrom: [ + 'author', + ], + props: {}, + relatedConcepts: [ + { + module: 'XForms', + concept: { + name: 'input', + }, + }, + ], + requireContextRole: [], + requiredOwnedElements: [], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'widget', + ], + ], +}; + +export default inputRole; \ No newline at end of file diff --git a/src/etc/aria/abstract/landmarkRole.js b/src/etc/aria/abstract/landmarkRole.js new file mode 100644 index 00000000..a1f7c04e --- /dev/null +++ b/src/etc/aria/abstract/landmarkRole.js @@ -0,0 +1,26 @@ +/** + * @flow + */ +const landmarkRole: RoleDefinition = { + abstract: true, + accessibleNameRequired: false, + baseConcepts: [], + childrenPresentational: false, + nameFrom: [ + 'author', + ], + props: {}, + relatedConcepts: [], + requireContextRole: [], + requiredOwnedElements: [], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'structure', + 'section', + ], + ], +}; + +export default landmarkRole; \ No newline at end of file diff --git a/src/etc/aria/abstract/rangeRole.js b/src/etc/aria/abstract/rangeRole.js new file mode 100644 index 00000000..52f37be7 --- /dev/null +++ b/src/etc/aria/abstract/rangeRole.js @@ -0,0 +1,30 @@ +/** + * @flow + */ +const rangeRole: RoleDefinition = { + abstract: true, + accessibleNameRequired: false, + baseConcepts: [], + childrenPresentational: false, + nameFrom: [ + 'author', + ], + props: { + 'aria-valuemax': null, + 'aria-valuemin': null, + 'aria-valuenow': null, + 'aria-valuetext': null, + }, + relatedConcepts: [], + requireContextRole: [], + requiredOwnedElements: [], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'widget', + ], + ], +}; + +export default rangeRole; \ No newline at end of file diff --git a/src/etc/aria/abstract/roletypeRole.js b/src/etc/aria/abstract/roletypeRole.js new file mode 100644 index 00000000..91dec6b7 --- /dev/null +++ b/src/etc/aria/abstract/roletypeRole.js @@ -0,0 +1,61 @@ +/** + * @flow + */ +const roletypeRole: RoleDefinition = { + abstract: true, + accessibleNameRequired: false, + baseConcepts: [], + childrenPresentational: false, + nameFrom: [ + 'author', + ], + props: { + 'aria-atomic': null, + 'aria-busy': null, + 'aria-controls': null, + 'aria-current': null, + 'aria-describedby': null, + 'aria-details': null, + 'aria-disabled': null, + 'aria-dropeffect': null, + 'aria-errormessage': null, + 'aria-flowto': null, + 'aria-grabbed': null, + 'aria-haspopup': null, + 'aria-hidden': null, + 'aria-invalid': null, + 'aria-keyshortcuts': null, + 'aria-label': null, + 'aria-labelledby': null, + 'aria-live': null, + 'aria-owns': null, + 'aria-relevant': null, + 'aria-roledescription': null, + }, + relatedConcepts: [ + { + module: 'XHTML', + concept: { + name: 'role', + }, + }, + { + module: 'HTML', + concept: { + name: 'rel', + }, + }, + { + module: 'Dublin Core', + concept: { + name: 'type', + }, + }, + ], + requireContextRole: [], + requiredOwnedElements: [], + requiredProps: {}, + superClass: [], +}; + +export default roletypeRole; \ No newline at end of file diff --git a/src/etc/aria/abstract/sectionRole.js b/src/etc/aria/abstract/sectionRole.js new file mode 100644 index 00000000..37cff1b6 --- /dev/null +++ b/src/etc/aria/abstract/sectionRole.js @@ -0,0 +1,44 @@ +/** + * @flow + */ +const sectionRole: RoleDefinition = { + abstract: true, + accessibleNameRequired: false, + baseConcepts: [], + childrenPresentational: false, + nameFrom: [], + props: { + 'aria-expanded': null, + }, + relatedConcepts: [ + { + module: 'DTB', + concept: { + name: 'frontmatter', + }, + }, + { + module: 'DTB', + concept: { + name: 'level', + }, + }, + { + module: 'SMIL', + concept: { + name: 'level', + }, + }, + ], + requireContextRole: [], + requiredOwnedElements: [], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'structure', + ], + ], +}; + +export default sectionRole; \ No newline at end of file diff --git a/src/etc/aria/abstract/sectionheadRole.js b/src/etc/aria/abstract/sectionheadRole.js new file mode 100644 index 00000000..a23d3344 --- /dev/null +++ b/src/etc/aria/abstract/sectionheadRole.js @@ -0,0 +1,28 @@ +/** + * @flow + */ +const sectionheadRole: RoleDefinition = { + abstract: true, + accessibleNameRequired: false, + baseConcepts: [], + childrenPresentational: false, + nameFrom: [ + 'author', + 'contents', + ], + props: { + 'aria-expanded': null, + }, + relatedConcepts: [], + requireContextRole: [], + requiredOwnedElements: [], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'structure', + ], + ], +}; + +export default sectionheadRole; \ No newline at end of file diff --git a/src/etc/aria/abstract/selectRole.js b/src/etc/aria/abstract/selectRole.js new file mode 100644 index 00000000..735fc1b5 --- /dev/null +++ b/src/etc/aria/abstract/selectRole.js @@ -0,0 +1,34 @@ +/** + * @flow + */ +const selectRole: RoleDefinition = { + abstract: true, + accessibleNameRequired: false, + baseConcepts: [], + childrenPresentational: false, + nameFrom: [ + 'author', + ], + props: { + 'aria-orientation': null, + }, + relatedConcepts: [], + requireContextRole: [], + requiredOwnedElements: [], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'widget', + 'composite', + ], + [ + 'roletype', + 'structure', + 'section', + 'group', + ], + ], +}; + +export default selectRole; \ No newline at end of file diff --git a/src/etc/aria/abstract/structureRole.js b/src/etc/aria/abstract/structureRole.js new file mode 100644 index 00000000..b640c199 --- /dev/null +++ b/src/etc/aria/abstract/structureRole.js @@ -0,0 +1,22 @@ +/** + * @flow + */ +const structureRole: RoleDefinition = { + abstract: true, + accessibleNameRequired: false, + baseConcepts: [], + childrenPresentational: false, + nameFrom: [], + props: {}, + relatedConcepts: [], + requireContextRole: [], + requiredOwnedElements: [], + requiredProps: {}, + superClass: [ + [ + 'roletype', + ], + ], +}; + +export default structureRole; \ No newline at end of file diff --git a/src/etc/aria/abstract/widgetRole.js b/src/etc/aria/abstract/widgetRole.js new file mode 100644 index 00000000..3c5527b0 --- /dev/null +++ b/src/etc/aria/abstract/widgetRole.js @@ -0,0 +1,22 @@ +/** + * @flow + */ +const widgetRole: RoleDefinition = { + abstract: true, + accessibleNameRequired: false, + baseConcepts: [], + childrenPresentational: false, + nameFrom: [], + props: {}, + relatedConcepts: [], + requireContextRole: [], + requiredOwnedElements: [], + requiredProps: {}, + superClass: [ + [ + 'roletype', + ], + ], +}; + +export default widgetRole; \ No newline at end of file diff --git a/src/etc/aria/abstract/windowRole.js b/src/etc/aria/abstract/windowRole.js new file mode 100644 index 00000000..af2d34ff --- /dev/null +++ b/src/etc/aria/abstract/windowRole.js @@ -0,0 +1,27 @@ +/** + * @flow + */ +const windowRole: RoleDefinition = { + abstract: true, + accessibleNameRequired: false, + baseConcepts: [], + childrenPresentational: false, + nameFrom: [ + 'author', + ], + props: { + 'aria-expanded': null, + 'aria-modal': null, + }, + relatedConcepts: [], + requireContextRole: [], + requiredOwnedElements: [], + requiredProps: {}, + superClass: [ + [ + 'roletype', + ], + ], +}; + +export default windowRole; \ No newline at end of file diff --git a/src/etc/aria/ariaAbstractRoles.js b/src/etc/aria/ariaAbstractRoles.js new file mode 100644 index 00000000..3a0e0250 --- /dev/null +++ b/src/etc/aria/ariaAbstractRoles.js @@ -0,0 +1,32 @@ +/** + * @flow + */ +import commandRole from './abstract/commandRole'; +import compositeRole from './abstract/compositeRole'; +import inputRole from './abstract/inputRole'; +import landmarkRole from './abstract/landmarkRole'; +import rangeRole from './abstract/rangeRole'; +import roletypeRole from './abstract/roletypeRole'; +import sectionRole from './abstract/sectionRole'; +import sectionheadRole from './abstract/sectionheadRole'; +import selectRole from './abstract/selectRole'; +import structureRole from './abstract/structureRole'; +import widgetRole from './abstract/widgetRole'; +import windowRole from './abstract/windowRole'; + +const ariaLiteralRoles = new Map([ + ['command', commandRole], + ['composite', compositeRole], + ['input', inputRole], + ['landmark', landmarkRole], + ['range', rangeRole], + ['roletype', roletypeRole], + ['section', sectionRole], + ['sectionhead', sectionheadRole], + ['select', selectRole], + ['structure', structureRole], + ['widget', widgetRole], + ['window', windowRole] +]); + +export default ariaLiteralRoles; \ No newline at end of file diff --git a/src/etc/aria/ariaDpubRoles.js b/src/etc/aria/ariaDpubRoles.js new file mode 100644 index 00000000..1d9e8904 --- /dev/null +++ b/src/etc/aria/ariaDpubRoles.js @@ -0,0 +1,86 @@ +/** + * @flow + */ +import docAbstractRole from './dpub/docAbstractRole'; +import docAcknowledgmentsRole from './dpub/docAcknowledgmentsRole'; +import docAfterwordRole from './dpub/docAfterwordRole'; +import docAppendixRole from './dpub/docAppendixRole'; +import docBacklinkRole from './dpub/docBacklinkRole'; +import docBiblioentryRole from './dpub/docBiblioentryRole'; +import docBibliographyRole from './dpub/docBibliographyRole'; +import docBibliorefRole from './dpub/docBibliorefRole'; +import docChapterRole from './dpub/docChapterRole'; +import docColophonRole from './dpub/docColophonRole'; +import docConclusionRole from './dpub/docConclusionRole'; +import docCoverRole from './dpub/docCoverRole'; +import docCreditRole from './dpub/docCreditRole'; +import docCreditsRole from './dpub/docCreditsRole'; +import docDedicationRole from './dpub/docDedicationRole'; +import docEndnoteRole from './dpub/docEndnoteRole'; +import docEndnotesRole from './dpub/docEndnotesRole'; +import docEpigraphRole from './dpub/docEpigraphRole'; +import docEpilogueRole from './dpub/docEpilogueRole'; +import docErrataRole from './dpub/docErrataRole'; +import docExampleRole from './dpub/docExampleRole'; +import docFootnoteRole from './dpub/docFootnoteRole'; +import docForewordRole from './dpub/docForewordRole'; +import docGlossaryRole from './dpub/docGlossaryRole'; +import docGlossrefRole from './dpub/docGlossrefRole'; +import docIndexRole from './dpub/docIndexRole'; +import docIntroductionRole from './dpub/docIntroductionRole'; +import docNoterefRole from './dpub/docNoterefRole'; +import docNoticeRole from './dpub/docNoticeRole'; +import docPagebreakRole from './dpub/docPagebreakRole'; +import docPagelistRole from './dpub/docPagelistRole'; +import docPartRole from './dpub/docPartRole'; +import docPrefaceRole from './dpub/docPrefaceRole'; +import docPrologueRole from './dpub/docPrologueRole'; +import docPullquoteRole from './dpub/docPullquoteRole'; +import docQnaRole from './dpub/docQnaRole'; +import docSubtitleRole from './dpub/docSubtitleRole'; +import docTipRole from './dpub/docTipRole'; +import docTocRole from './dpub/docTocRole'; + +const ariaLiteralRoles = new Map([ + ['doc-abstract', docAbstractRole], + ['doc-acknowledgments', docAcknowledgmentsRole], + ['doc-afterword', docAfterwordRole], + ['doc-appendix', docAppendixRole], + ['doc-backlink', docBacklinkRole], + ['doc-biblioentry', docBiblioentryRole], + ['doc-bibliography', docBibliographyRole], + ['doc-biblioref', docBibliorefRole], + ['doc-chapter', docChapterRole], + ['doc-colophon', docColophonRole], + ['doc-conclusion', docConclusionRole], + ['doc-cover', docCoverRole], + ['doc-credit', docCreditRole], + ['doc-credits', docCreditsRole], + ['doc-dedication', docDedicationRole], + ['doc-endnote', docEndnoteRole], + ['doc-endnotes', docEndnotesRole], + ['doc-epigraph', docEpigraphRole], + ['doc-epilogue', docEpilogueRole], + ['doc-errata', docErrataRole], + ['doc-example', docExampleRole], + ['doc-footnote', docFootnoteRole], + ['doc-foreword', docForewordRole], + ['doc-glossary', docGlossaryRole], + ['doc-glossref', docGlossrefRole], + ['doc-index', docIndexRole], + ['doc-introduction', docIntroductionRole], + ['doc-noteref', docNoterefRole], + ['doc-notice', docNoticeRole], + ['doc-pagebreak', docPagebreakRole], + ['doc-pagelist', docPagelistRole], + ['doc-part', docPartRole], + ['doc-preface', docPrefaceRole], + ['doc-prologue', docPrologueRole], + ['doc-pullquote', docPullquoteRole], + ['doc-qna', docQnaRole], + ['doc-subtitle', docSubtitleRole], + ['doc-tip', docTipRole], + ['doc-toc', docTocRole] +]); + +export default ariaLiteralRoles; \ No newline at end of file diff --git a/src/etc/aria/ariaLiteralRoles.js b/src/etc/aria/ariaLiteralRoles.js new file mode 100644 index 00000000..05fc14b0 --- /dev/null +++ b/src/etc/aria/ariaLiteralRoles.js @@ -0,0 +1,146 @@ +/** + * @flow + */ +import alertRole from './literal/alertRole'; +import alertdialogRole from './literal/alertdialogRole'; +import applicationRole from './literal/applicationRole'; +import articleRole from './literal/articleRole'; +import bannerRole from './literal/bannerRole'; +import buttonRole from './literal/buttonRole'; +import cellRole from './literal/cellRole'; +import checkboxRole from './literal/checkboxRole'; +import columnheaderRole from './literal/columnheaderRole'; +import comboboxRole from './literal/comboboxRole'; +import complementaryRole from './literal/complementaryRole'; +import contentinfoRole from './literal/contentinfoRole'; +import definitionRole from './literal/definitionRole'; +import dialogRole from './literal/dialogRole'; +import directoryRole from './literal/directoryRole'; +import documentRole from './literal/documentRole'; +import feedRole from './literal/feedRole'; +import figureRole from './literal/figureRole'; +import formRole from './literal/formRole'; +import gridRole from './literal/gridRole'; +import gridcellRole from './literal/gridcellRole'; +import groupRole from './literal/groupRole'; +import headingRole from './literal/headingRole'; +import imgRole from './literal/imgRole'; +import linkRole from './literal/linkRole'; +import listRole from './literal/listRole'; +import listboxRole from './literal/listboxRole'; +import listitemRole from './literal/listitemRole'; +import logRole from './literal/logRole'; +import mainRole from './literal/mainRole'; +import marqueeRole from './literal/marqueeRole'; +import mathRole from './literal/mathRole'; +import menuRole from './literal/menuRole'; +import menubarRole from './literal/menubarRole'; +import menuitemRole from './literal/menuitemRole'; +import menuitemcheckboxRole from './literal/menuitemcheckboxRole'; +import menuitemradioRole from './literal/menuitemradioRole'; +import navigationRole from './literal/navigationRole'; +import noneRole from './literal/noneRole'; +import noteRole from './literal/noteRole'; +import optionRole from './literal/optionRole'; +import presentationRole from './literal/presentationRole'; +import progressbarRole from './literal/progressbarRole'; +import radioRole from './literal/radioRole'; +import radiogroupRole from './literal/radiogroupRole'; +import regionRole from './literal/regionRole'; +import rowRole from './literal/rowRole'; +import rowgroupRole from './literal/rowgroupRole'; +import rowheaderRole from './literal/rowheaderRole'; +import scrollbarRole from './literal/scrollbarRole'; +import searchRole from './literal/searchRole'; +import searchboxRole from './literal/searchboxRole'; +import separatorRole from './literal/separatorRole'; +import sliderRole from './literal/sliderRole'; +import spinbuttonRole from './literal/spinbuttonRole'; +import statusRole from './literal/statusRole'; +import switchRole from './literal/switchRole'; +import tabRole from './literal/tabRole'; +import tableRole from './literal/tableRole'; +import tablistRole from './literal/tablistRole'; +import tabpanelRole from './literal/tabpanelRole'; +import termRole from './literal/termRole'; +import textboxRole from './literal/textboxRole'; +import timerRole from './literal/timerRole'; +import toolbarRole from './literal/toolbarRole'; +import tooltipRole from './literal/tooltipRole'; +import treeRole from './literal/treeRole'; +import treegridRole from './literal/treegridRole'; +import treeitemRole from './literal/treeitemRole'; + +const ariaLiteralRoles = new Map([ + ['alert', alertRole], + ['alertdialog', alertdialogRole], + ['application', applicationRole], + ['article', articleRole], + ['banner', bannerRole], + ['button', buttonRole], + ['cell', cellRole], + ['checkbox', checkboxRole], + ['columnheader', columnheaderRole], + ['combobox', comboboxRole], + ['complementary', complementaryRole], + ['contentinfo', contentinfoRole], + ['definition', definitionRole], + ['dialog', dialogRole], + ['directory', directoryRole], + ['document', documentRole], + ['feed', feedRole], + ['figure', figureRole], + ['form', formRole], + ['grid', gridRole], + ['gridcell', gridcellRole], + ['group', groupRole], + ['heading', headingRole], + ['img', imgRole], + ['link', linkRole], + ['list', listRole], + ['listbox', listboxRole], + ['listitem', listitemRole], + ['log', logRole], + ['main', mainRole], + ['marquee', marqueeRole], + ['math', mathRole], + ['menu', menuRole], + ['menubar', menubarRole], + ['menuitem', menuitemRole], + ['menuitemcheckbox', menuitemcheckboxRole], + ['menuitemradio', menuitemradioRole], + ['navigation', navigationRole], + ['none', noneRole], + ['note', noteRole], + ['option', optionRole], + ['presentation', presentationRole], + ['progressbar', progressbarRole], + ['radio', radioRole], + ['radiogroup', radiogroupRole], + ['region', regionRole], + ['row', rowRole], + ['rowgroup', rowgroupRole], + ['rowheader', rowheaderRole], + ['scrollbar', scrollbarRole], + ['search', searchRole], + ['searchbox', searchboxRole], + ['separator', separatorRole], + ['slider', sliderRole], + ['spinbutton', spinbuttonRole], + ['status', statusRole], + ['switch', switchRole], + ['tab', tabRole], + ['table', tableRole], + ['tablist', tablistRole], + ['tabpanel', tabpanelRole], + ['term', termRole], + ['textbox', textboxRole], + ['timer', timerRole], + ['toolbar', toolbarRole], + ['tooltip', tooltipRole], + ['tree', treeRole], + ['treegrid', treegridRole], + ['treeitem', treeitemRole] +]); + +export default ariaLiteralRoles; \ No newline at end of file diff --git a/src/etc/aria/dpub/docAbstractRole.js b/src/etc/aria/dpub/docAbstractRole.js new file mode 100644 index 00000000..85dde25c --- /dev/null +++ b/src/etc/aria/dpub/docAbstractRole.js @@ -0,0 +1,35 @@ +/** + * @flow + */ +const docAbstractRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: false, + baseConcepts: [], + childrenPresentational: false, + nameFrom: [ + 'author', + ], + props: { + 'aria-describedat': null, + }, + relatedConcepts: [ + { + module: 'EPUB', + concept: { + name: 'abstract [EPUB-SSV]', + }, + }, + ], + requireContextRole: [], + requiredOwnedElements: [], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'structure', + 'section', + ], + ], +}; + +export default docAbstractRole; \ No newline at end of file diff --git a/src/etc/aria/dpub/docAcknowledgmentsRole.js b/src/etc/aria/dpub/docAcknowledgmentsRole.js new file mode 100644 index 00000000..a7c1a319 --- /dev/null +++ b/src/etc/aria/dpub/docAcknowledgmentsRole.js @@ -0,0 +1,36 @@ +/** + * @flow + */ +const docAcknowledgmentsRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: false, + baseConcepts: [], + childrenPresentational: false, + nameFrom: [ + 'author', + ], + props: { + 'aria-describedat': null, + }, + relatedConcepts: [ + { + module: 'EPUB', + concept: { + name: 'acknowledgments [EPUB-SSV]', + }, + }, + ], + requireContextRole: [], + requiredOwnedElements: [], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'structure', + 'section', + 'landmark', + ], + ], +}; + +export default docAcknowledgmentsRole; \ No newline at end of file diff --git a/src/etc/aria/dpub/docAfterwordRole.js b/src/etc/aria/dpub/docAfterwordRole.js new file mode 100644 index 00000000..c5737744 --- /dev/null +++ b/src/etc/aria/dpub/docAfterwordRole.js @@ -0,0 +1,36 @@ +/** + * @flow + */ +const docAfterwordRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: false, + baseConcepts: [], + childrenPresentational: false, + nameFrom: [ + 'author', + ], + props: { + 'aria-describedat': null, + }, + relatedConcepts: [ + { + module: 'EPUB', + concept: { + name: 'afterword [EPUB-SSV]', + }, + }, + ], + requireContextRole: [], + requiredOwnedElements: [], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'structure', + 'section', + 'landmark', + ], + ], +}; + +export default docAfterwordRole; \ No newline at end of file diff --git a/src/etc/aria/dpub/docAppendixRole.js b/src/etc/aria/dpub/docAppendixRole.js new file mode 100644 index 00000000..9a65b58a --- /dev/null +++ b/src/etc/aria/dpub/docAppendixRole.js @@ -0,0 +1,36 @@ +/** + * @flow + */ +const docAppendixRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: false, + baseConcepts: [], + childrenPresentational: false, + nameFrom: [ + 'author', + ], + props: { + 'aria-describedat': null, + }, + relatedConcepts: [ + { + module: 'EPUB', + concept: { + name: 'appendix [EPUB-SSV]', + }, + }, + ], + requireContextRole: [], + requiredOwnedElements: [], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'structure', + 'section', + 'landmark', + ], + ], +}; + +export default docAppendixRole; \ No newline at end of file diff --git a/src/etc/aria/dpub/docBacklinkRole.js b/src/etc/aria/dpub/docBacklinkRole.js new file mode 100644 index 00000000..4c673922 --- /dev/null +++ b/src/etc/aria/dpub/docBacklinkRole.js @@ -0,0 +1,37 @@ +/** + * @flow + */ +const docBacklinkRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: true, + baseConcepts: [], + childrenPresentational: false, + nameFrom: [ + 'author', + 'content', + ], + props: { + 'aria-describedat': null, + }, + relatedConcepts: [ + { + module: 'EPUB', + concept: { + name: 'referrer [EPUB-SSV]', + }, + }, + ], + requireContextRole: [], + requiredOwnedElements: [], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'widget', + 'command', + 'link', + ], + ], +}; + +export default docBacklinkRole; \ No newline at end of file diff --git a/src/etc/aria/dpub/docBiblioentryRole.js b/src/etc/aria/dpub/docBiblioentryRole.js new file mode 100644 index 00000000..6297ef9a --- /dev/null +++ b/src/etc/aria/dpub/docBiblioentryRole.js @@ -0,0 +1,38 @@ +/** + * @flow + */ +const docBiblioentryRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: true, + baseConcepts: [], + childrenPresentational: false, + nameFrom: [ + 'author', + ], + props: { + 'aria-describedat': null, + }, + relatedConcepts: [ + { + module: 'EPUB', + concept: { + name: 'EPUB biblioentry [EPUB-SSV]', + }, + }, + ], + requireContextRole: [ + 'doc-bibliography', + ], + requiredOwnedElements: [], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'structure', + 'section', + 'listitem', + ], + ], +}; + +export default docBiblioentryRole; \ No newline at end of file diff --git a/src/etc/aria/dpub/docBibliographyRole.js b/src/etc/aria/dpub/docBibliographyRole.js new file mode 100644 index 00000000..16ccf7e3 --- /dev/null +++ b/src/etc/aria/dpub/docBibliographyRole.js @@ -0,0 +1,40 @@ +/** + * @flow + */ +const docBibliographyRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: false, + baseConcepts: [], + childrenPresentational: false, + nameFrom: [ + 'author', + ], + props: { + 'aria-describedat': null, + }, + relatedConcepts: [ + { + module: 'EPUB', + concept: { + name: 'bibliography [EPUB-SSV]', + }, + }, + ], + requireContextRole: [], + requiredOwnedElements: [ + [ + 'doc-biblioentry', + ], + ], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'structure', + 'section', + 'landmark', + ], + ], +}; + +export default docBibliographyRole; \ No newline at end of file diff --git a/src/etc/aria/dpub/docBibliorefRole.js b/src/etc/aria/dpub/docBibliorefRole.js new file mode 100644 index 00000000..2f9f3190 --- /dev/null +++ b/src/etc/aria/dpub/docBibliorefRole.js @@ -0,0 +1,37 @@ +/** + * @flow + */ +const docBibliorefRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: true, + baseConcepts: [], + childrenPresentational: false, + nameFrom: [ + 'author', + 'contents', + ], + props: { + 'aria-describedat': null, + }, + relatedConcepts: [ + { + module: 'EPUB', + concept: { + name: 'biblioref [EPUB-SSV]', + }, + }, + ], + requireContextRole: [], + requiredOwnedElements: [], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'widget', + 'command', + 'link', + ], + ], +}; + +export default docBibliorefRole; \ No newline at end of file diff --git a/src/etc/aria/dpub/docChapterRole.js b/src/etc/aria/dpub/docChapterRole.js new file mode 100644 index 00000000..388aa899 --- /dev/null +++ b/src/etc/aria/dpub/docChapterRole.js @@ -0,0 +1,36 @@ +/** + * @flow + */ +const docChapterRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: false, + baseConcepts: [], + childrenPresentational: false, + nameFrom: [ + 'author', + ], + props: { + 'aria-describedat': null, + }, + relatedConcepts: [ + { + module: 'EPUB', + concept: { + name: 'chapter [EPUB-SSV]', + }, + }, + ], + requireContextRole: [], + requiredOwnedElements: [], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'structure', + 'section', + 'landmark', + ], + ], +}; + +export default docChapterRole; \ No newline at end of file diff --git a/src/etc/aria/dpub/docColophonRole.js b/src/etc/aria/dpub/docColophonRole.js new file mode 100644 index 00000000..6295db70 --- /dev/null +++ b/src/etc/aria/dpub/docColophonRole.js @@ -0,0 +1,35 @@ +/** + * @flow + */ +const docColophonRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: false, + baseConcepts: [], + childrenPresentational: false, + nameFrom: [ + 'author', + ], + props: { + 'aria-describedat': null, + }, + relatedConcepts: [ + { + module: 'EPUB', + concept: { + name: 'colophon [EPUB-SSV]', + }, + }, + ], + requireContextRole: [], + requiredOwnedElements: [], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'structure', + 'section', + ], + ], +}; + +export default docColophonRole; \ No newline at end of file diff --git a/src/etc/aria/dpub/docConclusionRole.js b/src/etc/aria/dpub/docConclusionRole.js new file mode 100644 index 00000000..dd880470 --- /dev/null +++ b/src/etc/aria/dpub/docConclusionRole.js @@ -0,0 +1,36 @@ +/** + * @flow + */ +const docConclusionRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: false, + baseConcepts: [], + childrenPresentational: false, + nameFrom: [ + 'author', + ], + props: { + 'aria-describedat': null, + }, + relatedConcepts: [ + { + module: 'EPUB', + concept: { + name: 'conclusion [EPUB-SSV]', + }, + }, + ], + requireContextRole: [], + requiredOwnedElements: [], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'structure', + 'section', + 'landmark', + ], + ], +}; + +export default docConclusionRole; \ No newline at end of file diff --git a/src/etc/aria/dpub/docCoverRole.js b/src/etc/aria/dpub/docCoverRole.js new file mode 100644 index 00000000..e784d21c --- /dev/null +++ b/src/etc/aria/dpub/docCoverRole.js @@ -0,0 +1,36 @@ +/** + * @flow + */ +const docCoverRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: false, + baseConcepts: [], + childrenPresentational: false, + nameFrom: [ + 'author', + ], + props: { + 'aria-describedat': null, + }, + relatedConcepts: [ + { + module: 'EPUB', + concept: { + name: 'cover [EPUB-SSV]', + }, + }, + ], + requireContextRole: [], + requiredOwnedElements: [], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'structure', + 'section', + 'img', + ], + ], +}; + +export default docCoverRole; \ No newline at end of file diff --git a/src/etc/aria/dpub/docCreditRole.js b/src/etc/aria/dpub/docCreditRole.js new file mode 100644 index 00000000..1597694f --- /dev/null +++ b/src/etc/aria/dpub/docCreditRole.js @@ -0,0 +1,35 @@ +/** + * @flow + */ +const docCreditRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: false, + baseConcepts: [], + childrenPresentational: false, + nameFrom: [ + 'author', + ], + props: { + 'aria-describedat': null, + }, + relatedConcepts: [ + { + module: 'EPUB', + concept: { + name: 'credit [EPUB-SSV]', + }, + }, + ], + requireContextRole: [], + requiredOwnedElements: [], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'structure', + 'section', + ], + ], +}; + +export default docCreditRole; \ No newline at end of file diff --git a/src/etc/aria/dpub/docCreditsRole.js b/src/etc/aria/dpub/docCreditsRole.js new file mode 100644 index 00000000..f674d8e4 --- /dev/null +++ b/src/etc/aria/dpub/docCreditsRole.js @@ -0,0 +1,36 @@ +/** + * @flow + */ +const docCreditsRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: false, + baseConcepts: [], + childrenPresentational: false, + nameFrom: [ + 'author', + ], + props: { + 'aria-describedat': null, + }, + relatedConcepts: [ + { + module: 'EPUB', + concept: { + name: 'credits [EPUB-SSV]', + }, + }, + ], + requireContextRole: [], + requiredOwnedElements: [], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'structure', + 'section', + 'landmark', + ], + ], +}; + +export default docCreditsRole; \ No newline at end of file diff --git a/src/etc/aria/dpub/docDedicationRole.js b/src/etc/aria/dpub/docDedicationRole.js new file mode 100644 index 00000000..3c610e51 --- /dev/null +++ b/src/etc/aria/dpub/docDedicationRole.js @@ -0,0 +1,35 @@ +/** + * @flow + */ +const docDedicationRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: false, + baseConcepts: [], + childrenPresentational: false, + nameFrom: [ + 'author', + ], + props: { + 'aria-describedat': null, + }, + relatedConcepts: [ + { + module: 'EPUB', + concept: { + name: 'dedication [EPUB-SSV]', + }, + }, + ], + requireContextRole: [], + requiredOwnedElements: [], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'structure', + 'section', + ], + ], +}; + +export default docDedicationRole; \ No newline at end of file diff --git a/src/etc/aria/dpub/docEndnoteRole.js b/src/etc/aria/dpub/docEndnoteRole.js new file mode 100644 index 00000000..24e533df --- /dev/null +++ b/src/etc/aria/dpub/docEndnoteRole.js @@ -0,0 +1,38 @@ +/** + * @flow + */ +const docEndnoteRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: false, + baseConcepts: [], + childrenPresentational: false, + nameFrom: [ + 'author', + ], + props: { + 'aria-describedat': null, + }, + relatedConcepts: [ + { + module: 'EPUB', + concept: { + name: 'rearnote [EPUB-SSV]', + }, + }, + ], + requireContextRole: [ + 'doc-endnotes', + ], + requiredOwnedElements: [], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'structure', + 'section', + 'listitem', + ], + ], +}; + +export default docEndnoteRole; \ No newline at end of file diff --git a/src/etc/aria/dpub/docEndnotesRole.js b/src/etc/aria/dpub/docEndnotesRole.js new file mode 100644 index 00000000..d4887cf7 --- /dev/null +++ b/src/etc/aria/dpub/docEndnotesRole.js @@ -0,0 +1,40 @@ +/** + * @flow + */ +const docEndnotesRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: false, + baseConcepts: [], + childrenPresentational: false, + nameFrom: [ + 'author', + ], + props: { + 'aria-describedat': null, + }, + relatedConcepts: [ + { + module: 'EPUB', + concept: { + name: 'rearnotes [EPUB-SSV]', + }, + }, + ], + requireContextRole: [], + requiredOwnedElements: [ + [ + 'doc-endnote', + ], + ], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'structure', + 'section', + 'landmark', + ], + ], +}; + +export default docEndnotesRole; \ No newline at end of file diff --git a/src/etc/aria/dpub/docEpigraphRole.js b/src/etc/aria/dpub/docEpigraphRole.js new file mode 100644 index 00000000..9790fd86 --- /dev/null +++ b/src/etc/aria/dpub/docEpigraphRole.js @@ -0,0 +1,35 @@ +/** + * @flow + */ +const docEpigraphRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: false, + baseConcepts: [], + childrenPresentational: false, + nameFrom: [ + 'author', + ], + props: { + 'aria-describedat': null, + }, + relatedConcepts: [ + { + module: 'EPUB', + concept: { + name: 'epigraph [EPUB-SSV]', + }, + }, + ], + requireContextRole: [], + requiredOwnedElements: [], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'structure', + 'section', + ], + ], +}; + +export default docEpigraphRole; \ No newline at end of file diff --git a/src/etc/aria/dpub/docEpilogueRole.js b/src/etc/aria/dpub/docEpilogueRole.js new file mode 100644 index 00000000..68bc75ef --- /dev/null +++ b/src/etc/aria/dpub/docEpilogueRole.js @@ -0,0 +1,36 @@ +/** + * @flow + */ +const docEpilogueRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: false, + baseConcepts: [], + childrenPresentational: false, + nameFrom: [ + 'author', + ], + props: { + 'aria-describedat': null, + }, + relatedConcepts: [ + { + module: 'EPUB', + concept: { + name: 'epilogue [EPUB-SSV]', + }, + }, + ], + requireContextRole: [], + requiredOwnedElements: [], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'structure', + 'section', + 'landmark', + ], + ], +}; + +export default docEpilogueRole; \ No newline at end of file diff --git a/src/etc/aria/dpub/docErrataRole.js b/src/etc/aria/dpub/docErrataRole.js new file mode 100644 index 00000000..b14ab41e --- /dev/null +++ b/src/etc/aria/dpub/docErrataRole.js @@ -0,0 +1,36 @@ +/** + * @flow + */ +const docErrataRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: false, + baseConcepts: [], + childrenPresentational: false, + nameFrom: [ + 'author', + ], + props: { + 'aria-describedat': null, + }, + relatedConcepts: [ + { + module: 'EPUB', + concept: { + name: 'errata [EPUB-SSV]', + }, + }, + ], + requireContextRole: [], + requiredOwnedElements: [], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'structure', + 'section', + 'landmark', + ], + ], +}; + +export default docErrataRole; \ No newline at end of file diff --git a/src/etc/aria/dpub/docExampleRole.js b/src/etc/aria/dpub/docExampleRole.js new file mode 100644 index 00000000..4d465613 --- /dev/null +++ b/src/etc/aria/dpub/docExampleRole.js @@ -0,0 +1,28 @@ +/** + * @flow + */ +const docExampleRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: false, + baseConcepts: [], + childrenPresentational: false, + nameFrom: [ + 'author', + ], + props: { + 'aria-describedat': null, + }, + relatedConcepts: [], + requireContextRole: [], + requiredOwnedElements: [], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'structure', + 'section', + ], + ], +}; + +export default docExampleRole; \ No newline at end of file diff --git a/src/etc/aria/dpub/docFootnoteRole.js b/src/etc/aria/dpub/docFootnoteRole.js new file mode 100644 index 00000000..d716702e --- /dev/null +++ b/src/etc/aria/dpub/docFootnoteRole.js @@ -0,0 +1,35 @@ +/** + * @flow + */ +const docFootnoteRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: false, + baseConcepts: [], + childrenPresentational: false, + nameFrom: [ + 'author', + ], + props: { + 'aria-describedat': null, + }, + relatedConcepts: [ + { + module: 'EPUB', + concept: { + name: 'footnote [EPUB-SSV]', + }, + }, + ], + requireContextRole: [], + requiredOwnedElements: [], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'structure', + 'section', + ], + ], +}; + +export default docFootnoteRole; \ No newline at end of file diff --git a/src/etc/aria/dpub/docForewordRole.js b/src/etc/aria/dpub/docForewordRole.js new file mode 100644 index 00000000..a49e15f9 --- /dev/null +++ b/src/etc/aria/dpub/docForewordRole.js @@ -0,0 +1,36 @@ +/** + * @flow + */ +const docForewordRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: false, + baseConcepts: [], + childrenPresentational: false, + nameFrom: [ + 'author', + ], + props: { + 'aria-describedat': null, + }, + relatedConcepts: [ + { + module: 'EPUB', + concept: { + name: 'foreword [EPUB-SSV]', + }, + }, + ], + requireContextRole: [], + requiredOwnedElements: [], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'structure', + 'section', + 'landmark', + ], + ], +}; + +export default docForewordRole; \ No newline at end of file diff --git a/src/etc/aria/dpub/docGlossaryRole.js b/src/etc/aria/dpub/docGlossaryRole.js new file mode 100644 index 00000000..080380d1 --- /dev/null +++ b/src/etc/aria/dpub/docGlossaryRole.js @@ -0,0 +1,43 @@ +/** + * @flow + */ +const docGlossaryRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: false, + baseConcepts: [], + childrenPresentational: false, + nameFrom: [ + 'author', + ], + props: { + 'aria-describedat': null, + }, + relatedConcepts: [ + { + module: 'EPUB', + concept: { + name: 'glossary [EPUB-SSV]', + }, + }, + ], + requireContextRole: [], + requiredOwnedElements: [ + [ + 'term', + ], + [ + 'definition', + ], + ], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'structure', + 'section', + 'landmark', + ], + ], +}; + +export default docGlossaryRole; \ No newline at end of file diff --git a/src/etc/aria/dpub/docGlossrefRole.js b/src/etc/aria/dpub/docGlossrefRole.js new file mode 100644 index 00000000..9825e658 --- /dev/null +++ b/src/etc/aria/dpub/docGlossrefRole.js @@ -0,0 +1,37 @@ +/** + * @flow + */ +const docGlossrefRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: true, + baseConcepts: [], + childrenPresentational: false, + nameFrom: [ + 'author', + 'contents', + ], + props: { + 'aria-describedat': null, + }, + relatedConcepts: [ + { + module: 'EPUB', + concept: { + name: 'glossref [EPUB-SSV]', + }, + }, + ], + requireContextRole: [], + requiredOwnedElements: [], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'widget', + 'command', + 'link', + ], + ], +}; + +export default docGlossrefRole; \ No newline at end of file diff --git a/src/etc/aria/dpub/docIndexRole.js b/src/etc/aria/dpub/docIndexRole.js new file mode 100644 index 00000000..839398f3 --- /dev/null +++ b/src/etc/aria/dpub/docIndexRole.js @@ -0,0 +1,37 @@ +/** + * @flow + */ +const docIndexRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: false, + baseConcepts: [], + childrenPresentational: false, + nameFrom: [ + 'author', + ], + props: { + 'aria-describedat': null, + }, + relatedConcepts: [ + { + module: 'EPUB', + concept: { + name: 'index [EPUB-SSV]', + }, + }, + ], + requireContextRole: [], + requiredOwnedElements: [], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'structure', + 'section', + 'landmark', + 'navigation', + ], + ], +}; + +export default docIndexRole; \ No newline at end of file diff --git a/src/etc/aria/dpub/docIntroductionRole.js b/src/etc/aria/dpub/docIntroductionRole.js new file mode 100644 index 00000000..51a4a1b0 --- /dev/null +++ b/src/etc/aria/dpub/docIntroductionRole.js @@ -0,0 +1,36 @@ +/** + * @flow + */ +const docIntroductionRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: false, + baseConcepts: [], + childrenPresentational: false, + nameFrom: [ + 'author', + ], + props: { + 'aria-describedat': null, + }, + relatedConcepts: [ + { + module: 'EPUB', + concept: { + name: 'introduction [EPUB-SSV]', + }, + }, + ], + requireContextRole: [], + requiredOwnedElements: [], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'structure', + 'section', + 'landmark', + ], + ], +}; + +export default docIntroductionRole; \ No newline at end of file diff --git a/src/etc/aria/dpub/docNoterefRole.js b/src/etc/aria/dpub/docNoterefRole.js new file mode 100644 index 00000000..b34338f9 --- /dev/null +++ b/src/etc/aria/dpub/docNoterefRole.js @@ -0,0 +1,37 @@ +/** + * @flow + */ +const docNoterefRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: true, + baseConcepts: [], + childrenPresentational: false, + nameFrom: [ + 'author', + 'contents', + ], + props: { + 'aria-describedat': null, + }, + relatedConcepts: [ + { + module: 'EPUB', + concept: { + name: 'noteref [EPUB-SSV]', + }, + }, + ], + requireContextRole: [], + requiredOwnedElements: [], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'widget', + 'command', + 'link', + ], + ], +}; + +export default docNoterefRole; \ No newline at end of file diff --git a/src/etc/aria/dpub/docNoticeRole.js b/src/etc/aria/dpub/docNoticeRole.js new file mode 100644 index 00000000..44570579 --- /dev/null +++ b/src/etc/aria/dpub/docNoticeRole.js @@ -0,0 +1,36 @@ +/** + * @flow + */ +const docNoticeRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: false, + baseConcepts: [], + childrenPresentational: false, + nameFrom: [ + 'author', + ], + props: { + 'aria-describedat': null, + }, + relatedConcepts: [ + { + module: 'EPUB', + concept: { + name: 'notice [EPUB-SSV]', + }, + }, + ], + requireContextRole: [], + requiredOwnedElements: [], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'structure', + 'section', + 'note', + ], + ], +}; + +export default docNoticeRole; \ No newline at end of file diff --git a/src/etc/aria/dpub/docPagebreakRole.js b/src/etc/aria/dpub/docPagebreakRole.js new file mode 100644 index 00000000..2c39141c --- /dev/null +++ b/src/etc/aria/dpub/docPagebreakRole.js @@ -0,0 +1,35 @@ +/** + * @flow + */ +const docPagebreakRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: true, + baseConcepts: [], + childrenPresentational: true, + nameFrom: [ + 'author', + ], + props: { + 'aria-describedat': null, + }, + relatedConcepts: [ + { + module: 'EPUB', + concept: { + name: 'pagebreak [EPUB-SSV]', + }, + }, + ], + requireContextRole: [], + requiredOwnedElements: [], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'structure', + 'separator', + ], + ], +}; + +export default docPagebreakRole; \ No newline at end of file diff --git a/src/etc/aria/dpub/docPagelistRole.js b/src/etc/aria/dpub/docPagelistRole.js new file mode 100644 index 00000000..c38a375f --- /dev/null +++ b/src/etc/aria/dpub/docPagelistRole.js @@ -0,0 +1,37 @@ +/** + * @flow + */ +const docPagelistRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: false, + baseConcepts: [], + childrenPresentational: false, + nameFrom: [ + 'author', + ], + props: { + 'aria-describedat': null, + }, + relatedConcepts: [ + { + module: 'EPUB', + concept: { + name: 'page-list [EPUB-SSV]', + }, + }, + ], + requireContextRole: [], + requiredOwnedElements: [], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'structure', + 'section', + 'landmark', + 'navigation', + ], + ], +}; + +export default docPagelistRole; \ No newline at end of file diff --git a/src/etc/aria/dpub/docPartRole.js b/src/etc/aria/dpub/docPartRole.js new file mode 100644 index 00000000..f5e39678 --- /dev/null +++ b/src/etc/aria/dpub/docPartRole.js @@ -0,0 +1,36 @@ +/** + * @flow + */ +const docPartRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: true, + baseConcepts: [], + childrenPresentational: false, + nameFrom: [ + 'author', + ], + props: { + 'aria-describedat': null, + }, + relatedConcepts: [ + { + module: 'EPUB', + concept: { + name: 'part [EPUB-SSV]', + }, + }, + ], + requireContextRole: [], + requiredOwnedElements: [], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'structure', + 'section', + 'landmark', + ], + ], +}; + +export default docPartRole; \ No newline at end of file diff --git a/src/etc/aria/dpub/docPrefaceRole.js b/src/etc/aria/dpub/docPrefaceRole.js new file mode 100644 index 00000000..eb792191 --- /dev/null +++ b/src/etc/aria/dpub/docPrefaceRole.js @@ -0,0 +1,36 @@ +/** + * @flow + */ +const docPrefaceRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: false, + baseConcepts: [], + childrenPresentational: false, + nameFrom: [ + 'author', + ], + props: { + 'aria-describedat': null, + }, + relatedConcepts: [ + { + module: 'EPUB', + concept: { + name: 'preface [EPUB-SSV]', + }, + }, + ], + requireContextRole: [], + requiredOwnedElements: [], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'structure', + 'section', + 'landmark', + ], + ], +}; + +export default docPrefaceRole; \ No newline at end of file diff --git a/src/etc/aria/dpub/docPrologueRole.js b/src/etc/aria/dpub/docPrologueRole.js new file mode 100644 index 00000000..c971a8bc --- /dev/null +++ b/src/etc/aria/dpub/docPrologueRole.js @@ -0,0 +1,36 @@ +/** + * @flow + */ +const docPrologueRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: false, + baseConcepts: [], + childrenPresentational: false, + nameFrom: [ + 'author', + ], + props: { + 'aria-describedat': null, + }, + relatedConcepts: [ + { + module: 'EPUB', + concept: { + name: 'prologue [EPUB-SSV]', + }, + }, + ], + requireContextRole: [], + requiredOwnedElements: [], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'structure', + 'section', + 'landmark', + ], + ], +}; + +export default docPrologueRole; \ No newline at end of file diff --git a/src/etc/aria/dpub/docPullquoteRole.js b/src/etc/aria/dpub/docPullquoteRole.js new file mode 100644 index 00000000..1df2f081 --- /dev/null +++ b/src/etc/aria/dpub/docPullquoteRole.js @@ -0,0 +1,31 @@ +/** + * @flow + */ +const docPullquoteRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: false, + baseConcepts: [], + childrenPresentational: false, + nameFrom: [ + 'author', + ], + props: {}, + relatedConcepts: [ + { + module: 'EPUB', + concept: { + name: 'pullquote [EPUB-SSV]', + }, + }, + ], + requireContextRole: [], + requiredOwnedElements: [], + requiredProps: {}, + superClass: [ + [ + 'none', + ], + ], +}; + +export default docPullquoteRole; \ No newline at end of file diff --git a/src/etc/aria/dpub/docQnaRole.js b/src/etc/aria/dpub/docQnaRole.js new file mode 100644 index 00000000..149fec42 --- /dev/null +++ b/src/etc/aria/dpub/docQnaRole.js @@ -0,0 +1,35 @@ +/** + * @flow + */ +const docQnaRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: false, + baseConcepts: [], + childrenPresentational: false, + nameFrom: [ + 'author', + ], + props: { + 'aria-describedat': null, + }, + relatedConcepts: [ + { + module: 'EPUB', + concept: { + name: 'qna [EPUB-SSV]', + }, + }, + ], + requireContextRole: [], + requiredOwnedElements: [], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'structure', + 'section', + ], + ], +}; + +export default docQnaRole; \ No newline at end of file diff --git a/src/etc/aria/dpub/docSubtitleRole.js b/src/etc/aria/dpub/docSubtitleRole.js new file mode 100644 index 00000000..c3393c53 --- /dev/null +++ b/src/etc/aria/dpub/docSubtitleRole.js @@ -0,0 +1,35 @@ +/** + * @flow + */ +const docSubtitleRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: false, + baseConcepts: [], + childrenPresentational: false, + nameFrom: [ + 'author', + ], + props: { + 'aria-describedat': null, + }, + relatedConcepts: [ + { + module: 'EPUB', + concept: { + name: 'subtitle [EPUB-SSV]', + }, + }, + ], + requireContextRole: [], + requiredOwnedElements: [], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'structure', + 'sectionhead', + ], + ], +}; + +export default docSubtitleRole; \ No newline at end of file diff --git a/src/etc/aria/dpub/docTipRole.js b/src/etc/aria/dpub/docTipRole.js new file mode 100644 index 00000000..cf7c2c52 --- /dev/null +++ b/src/etc/aria/dpub/docTipRole.js @@ -0,0 +1,36 @@ +/** + * @flow + */ +const docTipRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: false, + baseConcepts: [], + childrenPresentational: false, + nameFrom: [ + 'author', + ], + props: { + 'aria-describedat': null, + }, + relatedConcepts: [ + { + module: 'EPUB', + concept: { + name: 'help [EPUB-SSV]', + }, + }, + ], + requireContextRole: [], + requiredOwnedElements: [], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'structure', + 'section', + 'note', + ], + ], +}; + +export default docTipRole; \ No newline at end of file diff --git a/src/etc/aria/dpub/docTocRole.js b/src/etc/aria/dpub/docTocRole.js new file mode 100644 index 00000000..17e31754 --- /dev/null +++ b/src/etc/aria/dpub/docTocRole.js @@ -0,0 +1,37 @@ +/** + * @flow + */ +const docTocRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: false, + baseConcepts: [], + childrenPresentational: false, + nameFrom: [ + 'author', + ], + props: { + 'aria-describedat': null, + }, + relatedConcepts: [ + { + module: 'EPUB', + concept: { + name: 'toc [EPUB-SSV]', + }, + }, + ], + requireContextRole: [], + requiredOwnedElements: [], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'structure', + 'section', + 'landmark', + 'navigation', + ], + ], +}; + +export default docTocRole; \ No newline at end of file diff --git a/src/etc/aria/literal/alertRole.js b/src/etc/aria/literal/alertRole.js new file mode 100644 index 00000000..c798a406 --- /dev/null +++ b/src/etc/aria/literal/alertRole.js @@ -0,0 +1,36 @@ +/** + * @flow + */ +const alertRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: false, + baseConcepts: [], + childrenPresentational: false, + nameFrom: [ + 'author', + ], + props: { + 'aria-atomic': 'true', + 'aria-live': 'assertive', + }, + relatedConcepts: [ + { + module: 'XForms', + concept: { + name: 'alert', + }, + }, + ], + requireContextRole: [], + requiredOwnedElements: [], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'structure', + 'section', + ], + ], +}; + +export default alertRole; \ No newline at end of file diff --git a/src/etc/aria/literal/alertdialogRole.js b/src/etc/aria/literal/alertdialogRole.js new file mode 100644 index 00000000..85005c3c --- /dev/null +++ b/src/etc/aria/literal/alertdialogRole.js @@ -0,0 +1,39 @@ +/** + * @flow + */ +const alertdialogRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: true, + baseConcepts: [], + childrenPresentational: false, + nameFrom: [ + 'author', + ], + props: {}, + relatedConcepts: [ + { + module: 'XForms', + concept: { + name: 'alert', + }, + }, + ], + requireContextRole: [], + requiredOwnedElements: [], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'structure', + 'section', + 'alert', + ], + [ + 'roletype', + 'window', + 'dialog', + ], + ], +}; + +export default alertdialogRole; \ No newline at end of file diff --git a/src/etc/aria/literal/applicationRole.js b/src/etc/aria/literal/applicationRole.js new file mode 100644 index 00000000..0bbb9331 --- /dev/null +++ b/src/etc/aria/literal/applicationRole.js @@ -0,0 +1,33 @@ +/** + * @flow + */ +const applicationRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: true, + baseConcepts: [ + { + concept: { + name: 'Device Independence Delivery Unit', + }, + }, + ], + childrenPresentational: false, + nameFrom: [ + 'author', + ], + props: { + 'aria-activedescendant': null, + }, + relatedConcepts: [], + requireContextRole: [], + requiredOwnedElements: [], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'structure', + ], + ], +}; + +export default applicationRole; \ No newline at end of file diff --git a/src/etc/aria/literal/articleRole.js b/src/etc/aria/literal/articleRole.js new file mode 100644 index 00000000..e734a9cb --- /dev/null +++ b/src/etc/aria/literal/articleRole.js @@ -0,0 +1,36 @@ +/** + * @flow + */ +const articleRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: false, + baseConcepts: [], + childrenPresentational: false, + nameFrom: [ + 'author', + ], + props: { + 'aria-posinset': null, + 'aria-setsize': null, + }, + relatedConcepts: [ + { + module: 'HTML', + concept: { + name: 'article', + }, + }, + ], + requireContextRole: [], + requiredOwnedElements: [], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'structure', + 'document', + ], + ], +}; + +export default articleRole; \ No newline at end of file diff --git a/src/etc/aria/literal/bannerRole.js b/src/etc/aria/literal/bannerRole.js new file mode 100644 index 00000000..cea9c0ce --- /dev/null +++ b/src/etc/aria/literal/bannerRole.js @@ -0,0 +1,27 @@ +/** + * @flow + */ +const bannerRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: false, + baseConcepts: [], + childrenPresentational: false, + nameFrom: [ + 'author', + ], + props: {}, + relatedConcepts: [], + requireContextRole: [], + requiredOwnedElements: [], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'structure', + 'section', + 'landmark', + ], + ], +}; + +export default bannerRole; \ No newline at end of file diff --git a/src/etc/aria/literal/buttonRole.js b/src/etc/aria/literal/buttonRole.js new file mode 100644 index 00000000..385ab52b --- /dev/null +++ b/src/etc/aria/literal/buttonRole.js @@ -0,0 +1,50 @@ +/** + * @flow + */ +const buttonRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: true, + baseConcepts: [ + { + module: 'HTML', + concept: { + name: 'button', + }, + }, + ], + childrenPresentational: true, + nameFrom: [ + 'author', + 'contents', + ], + props: { + 'aria-expanded': null, + 'aria-pressed': null, + }, + relatedConcepts: [ + { + module: 'ARIA', + concept: { + name: 'link', + }, + }, + { + module: 'XForms', + concept: { + name: 'trigger', + }, + }, + ], + requireContextRole: [], + requiredOwnedElements: [], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'widget', + 'command', + ], + ], +}; + +export default buttonRole; \ No newline at end of file diff --git a/src/etc/aria/literal/cellRole.js b/src/etc/aria/literal/cellRole.js new file mode 100644 index 00000000..2129711b --- /dev/null +++ b/src/etc/aria/literal/cellRole.js @@ -0,0 +1,41 @@ +/** + * @flow + */ +const cellRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: false, + baseConcepts: [ + { + module: 'HTML', + concept: { + name: 'td', + }, + }, + ], + childrenPresentational: false, + nameFrom: [ + 'author', + 'contents', + ], + props: { + 'aria-colindex': null, + 'aria-colspan': null, + 'aria-rowindex': null, + 'aria-rowspan': null, + }, + relatedConcepts: [], + requireContextRole: [ + 'row', + ], + requiredOwnedElements: [], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'structure', + 'section', + ], + ], +}; + +export default cellRole; \ No newline at end of file diff --git a/src/etc/aria/literal/checkboxRole.js b/src/etc/aria/literal/checkboxRole.js new file mode 100644 index 00000000..3d900466 --- /dev/null +++ b/src/etc/aria/literal/checkboxRole.js @@ -0,0 +1,51 @@ +/** + * @flow + */ +const checkboxRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: true, + baseConcepts: [], + childrenPresentational: true, + nameFrom: [ + 'author', + 'contents', + ], + props: { + 'aria-checked': 'false', + 'aria-readonly': null, + }, + relatedConcepts: [ + { + module: 'ARIA', + concept: { + name: 'option', + }, + }, + { + module: 'HTML', + concept: { + name: 'input', + attributes: [ + { + name: 'type', + value: 'checkbox', + }, + ], + }, + }, + ], + requireContextRole: [], + requiredOwnedElements: [], + requiredProps: { + 'aria-checked': null, + }, + superClass: [ + [ + 'roletype', + 'widget', + 'input', + ], + ], +}; + +export default checkboxRole; \ No newline at end of file diff --git a/src/etc/aria/literal/columnheaderRole.js b/src/etc/aria/literal/columnheaderRole.js new file mode 100644 index 00000000..4c7238a3 --- /dev/null +++ b/src/etc/aria/literal/columnheaderRole.js @@ -0,0 +1,62 @@ +/** + * @flow + */ +const columnheaderRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: true, + baseConcepts: [ + { + module: 'HTML', + concept: { + name: 'th', + attributes: [ + { + name: 'scope', + value: 'col', + }, + ], + }, + }, + ], + childrenPresentational: false, + nameFrom: [ + 'author', + 'contents', + ], + props: { + 'aria-sort': null, + }, + relatedConcepts: [], + requireContextRole: [ + 'row', + ], + requiredOwnedElements: [], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'structure', + 'section', + 'cell', + ], + [ + 'roletype', + 'structure', + 'section', + 'cell', + 'gridcell', + ], + [ + 'roletype', + 'widget', + 'gridcell', + ], + [ + 'roletype', + 'structure', + 'sectionhead', + ], + ], +}; + +export default columnheaderRole; \ No newline at end of file diff --git a/src/etc/aria/literal/comboboxRole.js b/src/etc/aria/literal/comboboxRole.js new file mode 100644 index 00000000..7d2e8676 --- /dev/null +++ b/src/etc/aria/literal/comboboxRole.js @@ -0,0 +1,72 @@ +/** + * @flow + */ +const comboboxRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: true, + baseConcepts: [], + childrenPresentational: false, + nameFrom: [ + 'author', + ], + props: { + 'aria-expanded': 'false', + 'aria-autocomplete': null, + 'aria-required': null, + 'aria-haspopup': 'listbox', + 'aria-readonly': null, + }, + relatedConcepts: [ + { + module: 'XForms', + concept: { + name: 'select', + }, + }, + { + module: 'HTML', + concept: { + name: 'select', + }, + }, + ], + requireContextRole: [], + requiredOwnedElements: [ + [ + 'textbox', + ], + [ + 'listbox', + ], + [ + 'tree', + ], + [ + 'grid', + ], + [ + 'dialog', + ], + ], + requiredProps: { + 'aria-controls': null, + 'aria-expanded': 'false', + }, + superClass: [ + [ + 'roletype', + 'widget', + 'composite', + 'select', + ], + [ + 'roletype', + 'structure', + 'section', + 'group', + 'select', + ], + ], +}; + +export default comboboxRole; \ No newline at end of file diff --git a/src/etc/aria/literal/complementaryRole.js b/src/etc/aria/literal/complementaryRole.js new file mode 100644 index 00000000..37156283 --- /dev/null +++ b/src/etc/aria/literal/complementaryRole.js @@ -0,0 +1,27 @@ +/** + * @flow + */ +const complementaryRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: false, + baseConcepts: [], + childrenPresentational: false, + nameFrom: [ + 'author', + ], + props: {}, + relatedConcepts: [], + requireContextRole: [], + requiredOwnedElements: [], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'structure', + 'section', + 'landmark', + ], + ], +}; + +export default complementaryRole; \ No newline at end of file diff --git a/src/etc/aria/literal/contentinfoRole.js b/src/etc/aria/literal/contentinfoRole.js new file mode 100644 index 00000000..a236f4bc --- /dev/null +++ b/src/etc/aria/literal/contentinfoRole.js @@ -0,0 +1,27 @@ +/** + * @flow + */ +const contentinfoRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: false, + baseConcepts: [], + childrenPresentational: false, + nameFrom: [ + 'author', + ], + props: {}, + relatedConcepts: [], + requireContextRole: [], + requiredOwnedElements: [], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'structure', + 'section', + 'landmark', + ], + ], +}; + +export default contentinfoRole; \ No newline at end of file diff --git a/src/etc/aria/literal/definitionRole.js b/src/etc/aria/literal/definitionRole.js new file mode 100644 index 00000000..62719259 --- /dev/null +++ b/src/etc/aria/literal/definitionRole.js @@ -0,0 +1,39 @@ +/** + * @flow + */ +const definitionRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: false, + baseConcepts: [], + childrenPresentational: false, + nameFrom: [ + 'author', + ], + props: {}, + relatedConcepts: [ + { + module: 'HTML', + concept: { + name: 'dd', + }, + }, + { + module: 'HTML', + concept: { + name: 'dfn', + }, + }, + ], + requireContextRole: [], + requiredOwnedElements: [], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'structure', + 'section', + ], + ], +}; + +export default definitionRole; \ No newline at end of file diff --git a/src/etc/aria/literal/dialogRole.js b/src/etc/aria/literal/dialogRole.js new file mode 100644 index 00000000..3cdec221 --- /dev/null +++ b/src/etc/aria/literal/dialogRole.js @@ -0,0 +1,25 @@ +/** + * @flow + */ +const dialogRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: true, + baseConcepts: [], + childrenPresentational: false, + nameFrom: [ + 'author', + ], + props: {}, + relatedConcepts: [], + requireContextRole: [], + requiredOwnedElements: [], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'window', + ], + ], +}; + +export default dialogRole; \ No newline at end of file diff --git a/src/etc/aria/literal/directoryRole.js b/src/etc/aria/literal/directoryRole.js new file mode 100644 index 00000000..00305a17 --- /dev/null +++ b/src/etc/aria/literal/directoryRole.js @@ -0,0 +1,31 @@ +/** + * @flow + */ +const directoryRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: false, + baseConcepts: [], + childrenPresentational: false, + nameFrom: [ + 'author', + ], + props: {}, + relatedConcepts: [ + { + module: 'DAISY Guide', + }, + ], + requireContextRole: [], + requiredOwnedElements: [], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'structure', + 'section', + 'list', + ], + ], +}; + +export default directoryRole; \ No newline at end of file diff --git a/src/etc/aria/literal/documentRole.js b/src/etc/aria/literal/documentRole.js new file mode 100644 index 00000000..8345668f --- /dev/null +++ b/src/etc/aria/literal/documentRole.js @@ -0,0 +1,33 @@ +/** + * @flow + */ +const documentRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: false, + baseConcepts: [], + childrenPresentational: false, + nameFrom: [ + 'author', + ], + props: { + 'aria-expanded': null, + }, + relatedConcepts: [ + { + concept: { + name: 'Device Independence Delivery Unit', + }, + }, + ], + requireContextRole: [], + requiredOwnedElements: [], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'structure', + ], + ], +}; + +export default documentRole; \ No newline at end of file diff --git a/src/etc/aria/literal/feedRole.js b/src/etc/aria/literal/feedRole.js new file mode 100644 index 00000000..85c5ec9c --- /dev/null +++ b/src/etc/aria/literal/feedRole.js @@ -0,0 +1,31 @@ +/** + * @flow + */ +const feedRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: false, + baseConcepts: [], + childrenPresentational: false, + nameFrom: [ + 'author', + ], + props: {}, + relatedConcepts: [], + requireContextRole: [], + requiredOwnedElements: [ + [ + 'article', + ], + ], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'structure', + 'section', + 'list', + ], + ], +}; + +export default feedRole; \ No newline at end of file diff --git a/src/etc/aria/literal/figureRole.js b/src/etc/aria/literal/figureRole.js new file mode 100644 index 00000000..25dec0ab --- /dev/null +++ b/src/etc/aria/literal/figureRole.js @@ -0,0 +1,33 @@ +/** + * @flow + */ +const figureRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: false, + baseConcepts: [], + childrenPresentational: false, + nameFrom: [ + 'author', + ], + props: {}, + relatedConcepts: [ + { + module: 'HTML', + concept: { + name: 'figure', + }, + }, + ], + requireContextRole: [], + requiredOwnedElements: [], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'structure', + 'section', + ], + ], +}; + +export default figureRole; \ No newline at end of file diff --git a/src/etc/aria/literal/formRole.js b/src/etc/aria/literal/formRole.js new file mode 100644 index 00000000..178dcfc0 --- /dev/null +++ b/src/etc/aria/literal/formRole.js @@ -0,0 +1,34 @@ +/** + * @flow + */ +const formRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: false, + baseConcepts: [], + childrenPresentational: false, + nameFrom: [ + 'author', + ], + props: {}, + relatedConcepts: [ + { + module: 'HTML', + concept: { + name: 'form', + }, + }, + ], + requireContextRole: [], + requiredOwnedElements: [], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'structure', + 'section', + 'landmark', + ], + ], +}; + +export default formRole; \ No newline at end of file diff --git a/src/etc/aria/literal/gridRole.js b/src/etc/aria/literal/gridRole.js new file mode 100644 index 00000000..973d4d54 --- /dev/null +++ b/src/etc/aria/literal/gridRole.js @@ -0,0 +1,51 @@ +/** + * @flow + */ +const gridRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: true, + baseConcepts: [ + { + module: 'HTML', + concept: { + name: 'table', + }, + }, + ], + childrenPresentational: false, + nameFrom: [ + 'author', + ], + props: { + 'aria-level': null, + 'aria-multiselectable': null, + 'aria-readonly': null, + }, + relatedConcepts: [], + requireContextRole: [], + requiredOwnedElements: [ + [ + 'rowgroup', + 'row', + ], + [ + 'row', + ], + ], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'widget', + 'composite', + ], + [ + 'roletype', + 'structure', + 'section', + 'table', + ], + ], +}; + +export default gridRole; \ No newline at end of file diff --git a/src/etc/aria/literal/gridcellRole.js b/src/etc/aria/literal/gridcellRole.js new file mode 100644 index 00000000..9d154bb7 --- /dev/null +++ b/src/etc/aria/literal/gridcellRole.js @@ -0,0 +1,45 @@ +/** + * @flow + */ +const gridcellRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: true, + baseConcepts: [ + { + module: 'HTML', + concept: { + name: 'td', + }, + }, + ], + childrenPresentational: false, + nameFrom: [ + 'author', + 'contents', + ], + props: { + 'aria-readonly': null, + 'aria-required': null, + 'aria-selected': null, + }, + relatedConcepts: [], + requireContextRole: [ + 'row', + ], + requiredOwnedElements: [], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'structure', + 'section', + 'cell', + ], + [ + 'roletype', + 'widget', + ], + ], +}; + +export default gridcellRole; \ No newline at end of file diff --git a/src/etc/aria/literal/groupRole.js b/src/etc/aria/literal/groupRole.js new file mode 100644 index 00000000..6d14a318 --- /dev/null +++ b/src/etc/aria/literal/groupRole.js @@ -0,0 +1,35 @@ +/** + * @flow + */ +const groupRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: false, + baseConcepts: [], + childrenPresentational: false, + nameFrom: [ + 'author', + ], + props: { + 'aria-activedescendant': null, + }, + relatedConcepts: [ + { + module: 'HTML', + concept: { + name: 'fieldset', + }, + }, + ], + requireContextRole: [], + requiredOwnedElements: [], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'structure', + 'section', + ], + ], +}; + +export default groupRole; \ No newline at end of file diff --git a/src/etc/aria/literal/headingRole.js b/src/etc/aria/literal/headingRole.js new file mode 100644 index 00000000..8da265cc --- /dev/null +++ b/src/etc/aria/literal/headingRole.js @@ -0,0 +1,66 @@ +/** + * @flow + */ +const headingRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: true, + baseConcepts: [], + childrenPresentational: false, + nameFrom: [ + 'author', + 'contents', + ], + props: { + 'aria-level': '2', + }, + relatedConcepts: [ + { + module: 'HTML', + concept: { + name: 'h1', + }, + }, + { + module: 'HTML', + concept: { + name: 'h2', + }, + }, + { + module: 'HTML', + concept: { + name: 'h3', + }, + }, + { + module: 'HTML', + concept: { + name: 'h4', + }, + }, + { + module: 'HTML', + concept: { + name: 'h5', + }, + }, + { + module: 'HTML', + concept: { + name: 'h6', + }, + }, + ], + requireContextRole: [], + requiredOwnedElements: [], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'structure', + 'sectionhead', + ], + ], +}; + +export default headingRole; \ No newline at end of file diff --git a/src/etc/aria/literal/imgRole.js b/src/etc/aria/literal/imgRole.js new file mode 100644 index 00000000..0d75a06f --- /dev/null +++ b/src/etc/aria/literal/imgRole.js @@ -0,0 +1,39 @@ +/** + * @flow + */ +const imgRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: true, + baseConcepts: [], + childrenPresentational: true, + nameFrom: [ + 'author', + ], + props: {}, + relatedConcepts: [ + { + module: 'HTML', + concept: { + name: 'img', + }, + }, + { + module: 'DTB', + concept: { + name: 'imggroup', + }, + }, + ], + requireContextRole: [], + requiredOwnedElements: [], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'structure', + 'section', + ], + ], +}; + +export default imgRole; \ No newline at end of file diff --git a/src/etc/aria/literal/linkRole.js b/src/etc/aria/literal/linkRole.js new file mode 100644 index 00000000..6da27537 --- /dev/null +++ b/src/etc/aria/literal/linkRole.js @@ -0,0 +1,42 @@ +/** + * @flow + */ +const linkRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: true, + baseConcepts: [], + childrenPresentational: false, + nameFrom: [ + 'author', + 'contents', + ], + props: { + 'aria-expanded': null, + }, + relatedConcepts: [ + { + module: 'HTML', + concept: { + name: 'a', + }, + }, + { + module: 'HTML', + concept: { + name: 'link', + }, + }, + ], + requireContextRole: [], + requiredOwnedElements: [], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'widget', + 'command', + ], + ], +}; + +export default linkRole; \ No newline at end of file diff --git a/src/etc/aria/literal/listRole.js b/src/etc/aria/literal/listRole.js new file mode 100644 index 00000000..bb8a66d1 --- /dev/null +++ b/src/etc/aria/literal/listRole.js @@ -0,0 +1,47 @@ +/** + * @flow + */ +const listRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: false, + baseConcepts: [ + { + module: 'HTML', + concept: { + name: 'ol', + }, + }, + { + module: 'HTML', + concept: { + name: 'ul', + }, + }, + ], + childrenPresentational: false, + nameFrom: [ + 'author', + ], + props: {}, + relatedConcepts: [], + requireContextRole: [], + requiredOwnedElements: [ + [ + 'group', + 'listitem', + ], + [ + 'listitem', + ], + ], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'structure', + 'section', + ], + ], +}; + +export default listRole; \ No newline at end of file diff --git a/src/etc/aria/literal/listboxRole.js b/src/etc/aria/literal/listboxRole.js new file mode 100644 index 00000000..c656dab0 --- /dev/null +++ b/src/etc/aria/literal/listboxRole.js @@ -0,0 +1,62 @@ +/** + * @flow + */ +const listboxRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: true, + baseConcepts: [], + childrenPresentational: false, + nameFrom: [ + 'author', + ], + props: { + 'aria-multiselectable': null, + 'aria-readonly': null, + 'aria-required': null, + 'aria-orientation': 'vertical', + }, + relatedConcepts: [ + { + module: 'ARIA', + concept: { + name: 'list', + }, + }, + { + module: 'HTML', + concept: { + name: 'select', + }, + }, + { + module: 'XForms', + concept: { + name: 'select', + }, + }, + ], + requireContextRole: [], + requiredOwnedElements: [ + [ + 'option', + ], + ], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'widget', + 'composite', + 'select', + ], + [ + 'roletype', + 'structure', + 'section', + 'group', + 'select', + ], + ], +}; + +export default listboxRole; \ No newline at end of file diff --git a/src/etc/aria/literal/listitemRole.js b/src/etc/aria/literal/listitemRole.js new file mode 100644 index 00000000..984dc789 --- /dev/null +++ b/src/etc/aria/literal/listitemRole.js @@ -0,0 +1,47 @@ +/** + * @flow + */ +const listitemRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: false, + baseConcepts: [ + { + module: 'HTML', + concept: { + name: 'li', + }, + }, + ], + childrenPresentational: false, + nameFrom: [ + 'author', + ], + props: { + 'aria-level': null, + 'aria-posinset': null, + 'aria-setsize': null, + }, + relatedConcepts: [ + { + module: 'XForms', + concept: { + name: 'item', + }, + }, + ], + requireContextRole: [ + 'group', + 'list', + ], + requiredOwnedElements: [], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'structure', + 'section', + ], + ], +}; + +export default listitemRole; \ No newline at end of file diff --git a/src/etc/aria/literal/logRole.js b/src/etc/aria/literal/logRole.js new file mode 100644 index 00000000..67eec90e --- /dev/null +++ b/src/etc/aria/literal/logRole.js @@ -0,0 +1,28 @@ +/** + * @flow + */ +const logRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: true, + baseConcepts: [], + childrenPresentational: false, + nameFrom: [ + 'author', + ], + props: { + 'aria-live': 'polite', + }, + relatedConcepts: [], + requireContextRole: [], + requiredOwnedElements: [], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'structure', + 'section', + ], + ], +}; + +export default logRole; \ No newline at end of file diff --git a/src/etc/aria/literal/mainRole.js b/src/etc/aria/literal/mainRole.js new file mode 100644 index 00000000..4f051b18 --- /dev/null +++ b/src/etc/aria/literal/mainRole.js @@ -0,0 +1,34 @@ +/** + * @flow + */ +const mainRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: false, + baseConcepts: [], + childrenPresentational: false, + nameFrom: [ + 'author', + ], + props: {}, + relatedConcepts: [ + { + module: 'HTML', + concept: { + name: 'main', + }, + }, + ], + requireContextRole: [], + requiredOwnedElements: [], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'structure', + 'section', + 'landmark', + ], + ], +}; + +export default mainRole; \ No newline at end of file diff --git a/src/etc/aria/literal/marqueeRole.js b/src/etc/aria/literal/marqueeRole.js new file mode 100644 index 00000000..fc50c08c --- /dev/null +++ b/src/etc/aria/literal/marqueeRole.js @@ -0,0 +1,26 @@ +/** + * @flow + */ +const marqueeRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: true, + baseConcepts: [], + childrenPresentational: false, + nameFrom: [ + 'author', + ], + props: {}, + relatedConcepts: [], + requireContextRole: [], + requiredOwnedElements: [], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'structure', + 'section', + ], + ], +}; + +export default marqueeRole; \ No newline at end of file diff --git a/src/etc/aria/literal/mathRole.js b/src/etc/aria/literal/mathRole.js new file mode 100644 index 00000000..af5926e3 --- /dev/null +++ b/src/etc/aria/literal/mathRole.js @@ -0,0 +1,26 @@ +/** + * @flow + */ +const mathRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: false, + baseConcepts: [], + childrenPresentational: true, + nameFrom: [ + 'author', + ], + props: {}, + relatedConcepts: [], + requireContextRole: [], + requiredOwnedElements: [], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'structure', + 'section', + ], + ], +}; + +export default mathRole; \ No newline at end of file diff --git a/src/etc/aria/literal/menuRole.js b/src/etc/aria/literal/menuRole.js new file mode 100644 index 00000000..91a8d9a3 --- /dev/null +++ b/src/etc/aria/literal/menuRole.js @@ -0,0 +1,75 @@ +/** + * @flow + */ +const menuRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: false, + baseConcepts: [], + childrenPresentational: false, + nameFrom: [ + 'author', + ], + props: { + 'aria-orientation': 'vertical', + }, + relatedConcepts: [ + { + module: 'ARIA', + concept: { + name: 'list', + }, + }, + { + module: 'DTB', + concept: { + name: 'sidebar', + }, + }, + { + module: 'XForms', + concept: { + name: 'select', + }, + }, + { + module: 'JAPI', + concept: { + name: 'MENU', + }, + }, + ], + requireContextRole: [], + requiredOwnedElements: [ + [ + 'group', + 'menuitemradio', + ], + [ + 'menuitem', + ], + [ + 'menuitemcheckbox', + ], + [ + 'menuitemradio', + ], + ], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'widget', + 'composite', + 'select', + ], + [ + 'roletype', + 'structure', + 'section', + 'group', + 'select', + ], + ], +}; + +export default menuRole; \ No newline at end of file diff --git a/src/etc/aria/literal/menubarRole.js b/src/etc/aria/literal/menubarRole.js new file mode 100644 index 00000000..e63f7d1b --- /dev/null +++ b/src/etc/aria/literal/menubarRole.js @@ -0,0 +1,59 @@ +/** + * @flow + */ +const menubarRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: false, + baseConcepts: [], + childrenPresentational: false, + nameFrom: [ + 'author', + ], + props: { + 'aria-orientation': 'vertical', + }, + relatedConcepts: [ + { + module: 'ARIA', + concept: { + name: 'toolbar', + }, + }, + ], + requireContextRole: [], + requiredOwnedElements: [ + [ + 'group', + 'menuitemradio', + ], + [ + 'menuitem', + ], + [ + 'menuitemcheckbox', + ], + [ + 'menuitemradio', + ], + ], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'widget', + 'composite', + 'select', + 'menu', + ], + [ + 'roletype', + 'structure', + 'section', + 'group', + 'select', + 'menu', + ], + ], +}; + +export default menubarRole; \ No newline at end of file diff --git a/src/etc/aria/literal/menuitemRole.js b/src/etc/aria/literal/menuitemRole.js new file mode 100644 index 00000000..a5654466 --- /dev/null +++ b/src/etc/aria/literal/menuitemRole.js @@ -0,0 +1,59 @@ +/** + * @flow + */ +const menuitemRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: true, + baseConcepts: [], + childrenPresentational: false, + nameFrom: [ + 'author', + 'contents', + ], + props: { + 'aria-posinset': null, + 'aria-setsize': null, + }, + relatedConcepts: [ + { + module: 'ARIA', + concept: { + name: 'option', + }, + }, + { + module: 'ARIA', + concept: { + name: 'listitem', + }, + }, + { + module: 'HTML', + concept: { + name: 'menuitem', + }, + }, + { + module: 'JAPI', + concept: { + name: 'MENU_ITEM', + }, + }, + ], + requireContextRole: [ + 'group', + 'menu', + 'menubar', + ], + requiredOwnedElements: [], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'widget', + 'command', + ], + ], +}; + +export default menuitemRole; \ No newline at end of file diff --git a/src/etc/aria/literal/menuitemcheckboxRole.js b/src/etc/aria/literal/menuitemcheckboxRole.js new file mode 100644 index 00000000..a6f5b08d --- /dev/null +++ b/src/etc/aria/literal/menuitemcheckboxRole.js @@ -0,0 +1,48 @@ +/** + * @flow + */ +const menuitemcheckboxRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: true, + baseConcepts: [], + childrenPresentational: true, + nameFrom: [ + 'author', + 'contents', + ], + props: { + 'aria-checked': 'false', + }, + relatedConcepts: [ + { + module: 'ARIA', + concept: { + name: 'menuitem', + }, + }, + ], + requireContextRole: [ + 'menu', + 'menubar', + ], + requiredOwnedElements: [], + requiredProps: { + 'aria-checked': null, + }, + superClass: [ + [ + 'roletype', + 'widget', + 'command', + 'menuitem', + ], + [ + 'roletype', + 'widget', + 'input', + 'checkbox', + ], + ], +}; + +export default menuitemcheckboxRole; \ No newline at end of file diff --git a/src/etc/aria/literal/menuitemradioRole.js b/src/etc/aria/literal/menuitemradioRole.js new file mode 100644 index 00000000..1e644a85 --- /dev/null +++ b/src/etc/aria/literal/menuitemradioRole.js @@ -0,0 +1,57 @@ +/** + * @flow + */ +const menuitemradioRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: true, + baseConcepts: [], + childrenPresentational: true, + nameFrom: [ + 'author', + 'contents', + ], + props: { + 'aria-checked': 'false', + }, + relatedConcepts: [ + { + module: 'ARIA', + concept: { + name: 'menuitem', + }, + }, + ], + requireContextRole: [ + 'group', + 'menu', + 'menubar', + ], + requiredOwnedElements: [], + requiredProps: { + 'aria-checked': null, + }, + superClass: [ + [ + 'roletype', + 'widget', + 'command', + 'menuitem', + 'menuitemcheckbox', + ], + [ + 'roletype', + 'widget', + 'input', + 'checkbox', + 'menuitemcheckbox', + ], + [ + 'roletype', + 'widget', + 'input', + 'radio', + ], + ], +}; + +export default menuitemradioRole; \ No newline at end of file diff --git a/src/etc/aria/literal/navigationRole.js b/src/etc/aria/literal/navigationRole.js new file mode 100644 index 00000000..5127e516 --- /dev/null +++ b/src/etc/aria/literal/navigationRole.js @@ -0,0 +1,34 @@ +/** + * @flow + */ +const navigationRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: false, + baseConcepts: [], + childrenPresentational: false, + nameFrom: [ + 'author', + ], + props: {}, + relatedConcepts: [ + { + module: 'HTML', + concept: { + name: 'nav', + }, + }, + ], + requireContextRole: [], + requiredOwnedElements: [], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'structure', + 'section', + 'landmark', + ], + ], +}; + +export default navigationRole; \ No newline at end of file diff --git a/src/etc/aria/literal/noneRole.js b/src/etc/aria/literal/noneRole.js new file mode 100644 index 00000000..0ef390b6 --- /dev/null +++ b/src/etc/aria/literal/noneRole.js @@ -0,0 +1,14 @@ +/** + * @flow + */ +const noneRole: RoleDefinition = { + abstract: false, + baseConcepts: [], + childrenPresentational: false, + props: {}, + relatedConcepts: [], + requiredProps: {}, + superClass: [], +}; + +export default noneRole; \ No newline at end of file diff --git a/src/etc/aria/literal/noteRole.js b/src/etc/aria/literal/noteRole.js new file mode 100644 index 00000000..29272a40 --- /dev/null +++ b/src/etc/aria/literal/noteRole.js @@ -0,0 +1,26 @@ +/** + * @flow + */ +const noteRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: false, + baseConcepts: [], + childrenPresentational: false, + nameFrom: [ + 'author', + ], + props: {}, + relatedConcepts: [], + requireContextRole: [], + requiredOwnedElements: [], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'structure', + 'section', + ], + ], +}; + +export default noteRole; \ No newline at end of file diff --git a/src/etc/aria/literal/optionRole.js b/src/etc/aria/literal/optionRole.js new file mode 100644 index 00000000..19943cfb --- /dev/null +++ b/src/etc/aria/literal/optionRole.js @@ -0,0 +1,56 @@ +/** + * @flow + */ +const optionRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: true, + baseConcepts: [ + { + module: 'HTML', + concept: { + name: 'option', + }, + }, + ], + childrenPresentational: true, + nameFrom: [ + 'author', + 'contents', + ], + props: { + 'aria-checked': null, + 'aria-posinset': null, + 'aria-selected': 'false', + 'aria-setsize': null, + }, + relatedConcepts: [ + { + module: 'ARIA', + concept: { + name: 'listitem', + }, + }, + { + module: 'XForms', + concept: { + name: 'item', + }, + }, + ], + requireContextRole: [ + 'listbox', + ], + requiredOwnedElements: [], + requiredProps: { + 'aria-selected': 'false', + }, + superClass: [ + [ + 'roletype', + 'widget', + 'input', + ], + ], +}; + +export default optionRole; \ No newline at end of file diff --git a/src/etc/aria/literal/presentationRole.js b/src/etc/aria/literal/presentationRole.js new file mode 100644 index 00000000..b1b03995 --- /dev/null +++ b/src/etc/aria/literal/presentationRole.js @@ -0,0 +1,25 @@ +/** + * @flow + */ +const presentationRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: false, + baseConcepts: [], + childrenPresentational: false, + nameFrom: [ + 'author', + ], + props: {}, + relatedConcepts: [], + requireContextRole: [], + requiredOwnedElements: [], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'structure', + ], + ], +}; + +export default presentationRole; \ No newline at end of file diff --git a/src/etc/aria/literal/progressbarRole.js b/src/etc/aria/literal/progressbarRole.js new file mode 100644 index 00000000..99fb9b53 --- /dev/null +++ b/src/etc/aria/literal/progressbarRole.js @@ -0,0 +1,33 @@ +/** + * @flow + */ +const progressbarRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: true, + baseConcepts: [], + childrenPresentational: true, + nameFrom: [ + 'author', + ], + props: {}, + relatedConcepts: [ + { + module: 'ARIA', + concept: { + name: 'status', + }, + }, + ], + requireContextRole: [], + requiredOwnedElements: [], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'widget', + 'range', + ], + ], +}; + +export default progressbarRole; \ No newline at end of file diff --git a/src/etc/aria/literal/radioRole.js b/src/etc/aria/literal/radioRole.js new file mode 100644 index 00000000..abcc8c05 --- /dev/null +++ b/src/etc/aria/literal/radioRole.js @@ -0,0 +1,47 @@ +/** + * @flow + */ +const radioRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: true, + baseConcepts: [], + childrenPresentational: true, + nameFrom: [ + 'author', + 'contents', + ], + props: { + 'aria-checked': 'false', + 'aria-posinset': null, + 'aria-selected': null, + 'aria-setsize': null, + }, + relatedConcepts: [ + { + module: 'HTML', + concept: { + name: 'input', + attributes: [ + { + name: 'type', + value: 'radio', + }, + ], + }, + }, + ], + requireContextRole: [], + requiredOwnedElements: [], + requiredProps: { + 'aria-checked': 'false', + }, + superClass: [ + [ + 'roletype', + 'widget', + 'input', + ], + ], +}; + +export default radioRole; \ No newline at end of file diff --git a/src/etc/aria/literal/radiogroupRole.js b/src/etc/aria/literal/radiogroupRole.js new file mode 100644 index 00000000..492f51a1 --- /dev/null +++ b/src/etc/aria/literal/radiogroupRole.js @@ -0,0 +1,48 @@ +/** + * @flow + */ +const radiogroupRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: true, + baseConcepts: [], + childrenPresentational: false, + nameFrom: [ + 'author', + ], + props: { + 'aria-readonly': null, + 'aria-required': null, + }, + relatedConcepts: [ + { + module: 'ARIA', + concept: { + name: 'list', + }, + }, + ], + requireContextRole: [], + requiredOwnedElements: [ + [ + 'radio', + ], + ], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'widget', + 'composite', + 'select', + ], + [ + 'roletype', + 'structure', + 'section', + 'group', + 'select', + ], + ], +}; + +export default radiogroupRole; \ No newline at end of file diff --git a/src/etc/aria/literal/regionRole.js b/src/etc/aria/literal/regionRole.js new file mode 100644 index 00000000..920d4d70 --- /dev/null +++ b/src/etc/aria/literal/regionRole.js @@ -0,0 +1,45 @@ +/** + * @flow + */ +const regionRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: true, + baseConcepts: [], + childrenPresentational: false, + nameFrom: [ + 'author', + ], + props: {}, + relatedConcepts: [ + { + module: 'HTML', + concept: { + name: 'frame', + }, + }, + { + concept: { + name: 'Device Independence Glossart perceivable unit', + }, + }, + { + module: 'ARIA', + concept: { + name: 'section', + }, + }, + ], + requireContextRole: [], + requiredOwnedElements: [], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'structure', + 'section', + 'landmark', + ], + ], +}; + +export default regionRole; \ No newline at end of file diff --git a/src/etc/aria/literal/rowRole.js b/src/etc/aria/literal/rowRole.js new file mode 100644 index 00000000..44bd085a --- /dev/null +++ b/src/etc/aria/literal/rowRole.js @@ -0,0 +1,62 @@ +/** + * @flow + */ +const rowRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: false, + baseConcepts: [ + { + module: 'HTML', + concept: { + name: 'tr', + }, + }, + ], + childrenPresentational: false, + nameFrom: [ + 'author', + 'contents', + ], + props: { + 'aria-colindex': null, + 'aria-level': null, + 'aria-rowindex': null, + 'aria-selected': null, + }, + relatedConcepts: [], + requireContextRole: [ + 'grid', + 'rowgroup', + 'table', + 'treegrid', + ], + requiredOwnedElements: [ + [ + 'cell', + ], + [ + 'columnheader', + ], + [ + 'gridcell', + ], + [ + 'rowheader', + ], + ], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'structure', + 'section', + 'group', + ], + [ + 'roletype', + 'widget', + ], + ], +}; + +export default rowRole; \ No newline at end of file diff --git a/src/etc/aria/literal/rowgroupRole.js b/src/etc/aria/literal/rowgroupRole.js new file mode 100644 index 00000000..9c4dfa6a --- /dev/null +++ b/src/etc/aria/literal/rowgroupRole.js @@ -0,0 +1,56 @@ +/** + * @flow + */ +const rowgroupRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: false, + baseConcepts: [ + { + module: 'HTML', + concept: { + name: 'tbody', + }, + }, + { + module: 'HTML', + concept: { + name: 'tfoot', + }, + }, + { + module: 'HTML', + concept: { + name: 'thead', + }, + }, + ], + childrenPresentational: false, + nameFrom: [ + 'author', + 'contents', + ], + props: { + 'aria-activedescendant': null, + 'aria-expanded': null, + }, + relatedConcepts: [], + requireContextRole: [ + 'grid', + 'table', + 'treegrid', + ], + requiredOwnedElements: [ + [ + 'row', + ], + ], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'structure', + ], + ], +}; + +export default rowgroupRole; \ No newline at end of file diff --git a/src/etc/aria/literal/rowheaderRole.js b/src/etc/aria/literal/rowheaderRole.js new file mode 100644 index 00000000..e43a99f3 --- /dev/null +++ b/src/etc/aria/literal/rowheaderRole.js @@ -0,0 +1,62 @@ +/** + * @flow + */ +const rowheaderRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: true, + baseConcepts: [ + { + module: 'HTML', + concept: { + name: 'th', + attributes: [ + { + name: 'scope', + value: 'row', + }, + ], + }, + }, + ], + childrenPresentational: false, + nameFrom: [ + 'author', + 'contents', + ], + props: { + 'aria-sort': null, + }, + relatedConcepts: [], + requireContextRole: [ + 'row', + ], + requiredOwnedElements: [], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'structure', + 'section', + 'cell', + ], + [ + 'roletype', + 'structure', + 'section', + 'cell', + 'gridcell', + ], + [ + 'roletype', + 'widget', + 'gridcell', + ], + [ + 'roletype', + 'structure', + 'sectionhead', + ], + ], +}; + +export default rowheaderRole; \ No newline at end of file diff --git a/src/etc/aria/literal/scrollbarRole.js b/src/etc/aria/literal/scrollbarRole.js new file mode 100644 index 00000000..dc847f50 --- /dev/null +++ b/src/etc/aria/literal/scrollbarRole.js @@ -0,0 +1,48 @@ +/** + * @flow + */ +const scrollbarRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: false, + baseConcepts: [], + childrenPresentational: true, + nameFrom: [ + 'author', + ], + props: { + 'aria-controls': null, + 'aria-orientation': null, + 'aria-valuemax': null, + 'aria-valuemin': null, + 'aria-valuenow': null, + 'aria-atomic': null, + 'aria-busy': null, + 'aria-describedby': null, + 'aria-disabled': null, + 'aria-dropeffect': null, + 'aria-flowto': null, + 'aria-grabbed': null, + 'aria-haspopup': null, + 'aria-hidden': null, + 'aria-invalid': null, + 'aria-label': null, + 'aria-labelledby': null, + 'aria-live': null, + 'aria-owns': null, + 'aria-relevant': null, + 'aria-valuetext': null, + }, + relatedConcepts: [], + requireContextRole: [], + requiredOwnedElements: [], + requiredProps: { + 'ARIA-CONTROLS': null, + 'aria-orientation': null, + 'aria-valuemax': null, + 'aria-valuemin': null, + 'aria-valuenow': null, + }, + superClass: [], +}; + +export default scrollbarRole; \ No newline at end of file diff --git a/src/etc/aria/literal/searchRole.js b/src/etc/aria/literal/searchRole.js new file mode 100644 index 00000000..49c175bf --- /dev/null +++ b/src/etc/aria/literal/searchRole.js @@ -0,0 +1,27 @@ +/** + * @flow + */ +const searchRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: false, + baseConcepts: [], + childrenPresentational: false, + nameFrom: [ + 'author', + ], + props: {}, + relatedConcepts: [], + requireContextRole: [], + requiredOwnedElements: [], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'structure', + 'section', + 'landmark', + ], + ], +}; + +export default searchRole; \ No newline at end of file diff --git a/src/etc/aria/literal/searchboxRole.js b/src/etc/aria/literal/searchboxRole.js new file mode 100644 index 00000000..45391030 --- /dev/null +++ b/src/etc/aria/literal/searchboxRole.js @@ -0,0 +1,40 @@ +/** + * @flow + */ +const searchboxRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: true, + baseConcepts: [ + { + module: 'HTML', + concept: { + name: 'input', + attributes: [ + { + name: 'type', + value: 'search', + }, + ], + }, + }, + ], + childrenPresentational: false, + nameFrom: [ + 'author', + ], + props: {}, + relatedConcepts: [], + requireContextRole: [], + requiredOwnedElements: [], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'widget', + 'input', + 'textbox', + ], + ], +}; + +export default searchboxRole; \ No newline at end of file diff --git a/src/etc/aria/literal/separatorRole.js b/src/etc/aria/literal/separatorRole.js new file mode 100644 index 00000000..8cbe19a3 --- /dev/null +++ b/src/etc/aria/literal/separatorRole.js @@ -0,0 +1,35 @@ +/** + * @flow + */ +const separatorRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: false, + baseConcepts: [], + childrenPresentational: true, + nameFrom: [ + 'author', + ], + props: { + 'aria-expanded': null, + 'aria-orientation': 'horizontal', + }, + relatedConcepts: [ + { + module: 'HTML', + concept: { + name: 'hr', + }, + }, + ], + requireContextRole: [], + requiredOwnedElements: [], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'structure', + ], + ], +}; + +export default separatorRole; \ No newline at end of file diff --git a/src/etc/aria/literal/sliderRole.js b/src/etc/aria/literal/sliderRole.js new file mode 100644 index 00000000..e98daae9 --- /dev/null +++ b/src/etc/aria/literal/sliderRole.js @@ -0,0 +1,41 @@ +/** + * @flow + */ +const sliderRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: true, + baseConcepts: [], + childrenPresentational: true, + nameFrom: [ + 'author', + ], + props: { + 'aria-orientation': 'horizontal', + 'aria-readonly': null, + 'aria-valuemax': '100', + 'aria-valuemin': '0', + 'aria-valuenow': '50', + }, + relatedConcepts: [], + requireContextRole: [], + requiredOwnedElements: [], + requiredProps: { + 'aria-valuemax': '100', + 'aria-valuemin': '0', + 'aria-valuenow': '50', + }, + superClass: [ + [ + 'roletype', + 'widget', + 'input', + ], + [ + 'roletype', + 'widget', + 'range', + ], + ], +}; + +export default sliderRole; \ No newline at end of file diff --git a/src/etc/aria/literal/spinbuttonRole.js b/src/etc/aria/literal/spinbuttonRole.js new file mode 100644 index 00000000..288aa21f --- /dev/null +++ b/src/etc/aria/literal/spinbuttonRole.js @@ -0,0 +1,44 @@ +/** + * @flow + */ +const spinbuttonRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: true, + baseConcepts: [], + childrenPresentational: false, + nameFrom: [ + 'author', + ], + props: { + 'aria-valuenow': '0', + 'aria-required': null, + 'aria-readonly': null, + }, + relatedConcepts: [], + requireContextRole: [], + requiredOwnedElements: [], + requiredProps: { + 'aria-valuemax': null, + 'aria-valuemin': null, + 'aria-valuenow': '0', + }, + superClass: [ + [ + 'roletype', + 'widget', + 'composite', + ], + [ + 'roletype', + 'widget', + 'input', + ], + [ + 'roletype', + 'widget', + 'range', + ], + ], +}; + +export default spinbuttonRole; \ No newline at end of file diff --git a/src/etc/aria/literal/statusRole.js b/src/etc/aria/literal/statusRole.js new file mode 100644 index 00000000..dd1267e3 --- /dev/null +++ b/src/etc/aria/literal/statusRole.js @@ -0,0 +1,29 @@ +/** + * @flow + */ +const statusRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: false, + baseConcepts: [], + childrenPresentational: false, + nameFrom: [ + 'author', + ], + props: { + 'aria-atomic': 'true', + 'aria-live': 'polite', + }, + relatedConcepts: [], + requireContextRole: [], + requiredOwnedElements: [], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'structure', + 'section', + ], + ], +}; + +export default statusRole; \ No newline at end of file diff --git a/src/etc/aria/literal/switchRole.js b/src/etc/aria/literal/switchRole.js new file mode 100644 index 00000000..fe77a1d6 --- /dev/null +++ b/src/etc/aria/literal/switchRole.js @@ -0,0 +1,39 @@ +/** + * @flow + */ +const switchRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: true, + baseConcepts: [], + childrenPresentational: true, + nameFrom: [ + 'author', + 'contents', + ], + props: { + 'aria-checked': 'false', + }, + relatedConcepts: [ + { + module: 'ARIA', + concept: { + name: 'button', + }, + }, + ], + requireContextRole: [], + requiredOwnedElements: [], + requiredProps: { + 'aria-checked': 'false', + }, + superClass: [ + [ + 'roletype', + 'widget', + 'input', + 'checkbox', + ], + ], +}; + +export default switchRole; \ No newline at end of file diff --git a/src/etc/aria/literal/tabRole.js b/src/etc/aria/literal/tabRole.js new file mode 100644 index 00000000..bb4be70d --- /dev/null +++ b/src/etc/aria/literal/tabRole.js @@ -0,0 +1,37 @@ +/** + * @flow + */ +const tabRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: false, + baseConcepts: [], + childrenPresentational: true, + nameFrom: [ + 'author', + 'contents', + ], + props: { + 'aria-posinset': null, + 'aria-selected': 'false', + 'aria-setsize': null, + }, + relatedConcepts: [], + requireContextRole: [ + 'tablist', + ], + requiredOwnedElements: [], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'structure', + 'sectionhead', + ], + [ + 'roletype', + 'widget', + ], + ], +}; + +export default tabRole; \ No newline at end of file diff --git a/src/etc/aria/literal/tableRole.js b/src/etc/aria/literal/tableRole.js new file mode 100644 index 00000000..105b0094 --- /dev/null +++ b/src/etc/aria/literal/tableRole.js @@ -0,0 +1,44 @@ +/** + * @flow + */ +const tableRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: true, + baseConcepts: [ + { + module: 'HTML', + concept: { + name: 'table', + }, + }, + ], + childrenPresentational: false, + nameFrom: [ + 'author', + ], + props: { + 'aria-colcount': null, + 'aria-rowcount': null, + }, + relatedConcepts: [], + requireContextRole: [], + requiredOwnedElements: [ + [ + 'row', + ], + [ + 'rowgroup', + 'row', + ], + ], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'structure', + 'section', + ], + ], +}; + +export default tableRole; \ No newline at end of file diff --git a/src/etc/aria/literal/tablistRole.js b/src/etc/aria/literal/tablistRole.js new file mode 100644 index 00000000..ae779033 --- /dev/null +++ b/src/etc/aria/literal/tablistRole.js @@ -0,0 +1,42 @@ +/** + * @flow + */ +const tablistRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: false, + baseConcepts: [], + childrenPresentational: false, + nameFrom: [ + 'author', + ], + props: { + 'aria-level': null, + 'aria-multiselectable': null, + 'aria-orientation': 'horizontal', + 'aria-expanded': null, + }, + relatedConcepts: [ + { + module: 'DAISY', + concept: { + name: 'guide', + }, + }, + ], + requireContextRole: [], + requiredOwnedElements: [ + [ + 'tab', + ], + ], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'widget', + 'composite', + ], + ], +}; + +export default tablistRole; \ No newline at end of file diff --git a/src/etc/aria/literal/tabpanelRole.js b/src/etc/aria/literal/tabpanelRole.js new file mode 100644 index 00000000..87696f01 --- /dev/null +++ b/src/etc/aria/literal/tabpanelRole.js @@ -0,0 +1,26 @@ +/** + * @flow + */ +const tabpanelRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: true, + baseConcepts: [], + childrenPresentational: false, + nameFrom: [ + 'author', + ], + props: {}, + relatedConcepts: [], + requireContextRole: [], + requiredOwnedElements: [], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'structure', + 'section', + ], + ], +}; + +export default tabpanelRole; \ No newline at end of file diff --git a/src/etc/aria/literal/termRole.js b/src/etc/aria/literal/termRole.js new file mode 100644 index 00000000..c3c5d245 --- /dev/null +++ b/src/etc/aria/literal/termRole.js @@ -0,0 +1,33 @@ +/** + * @flow + */ +const termRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: false, + baseConcepts: [], + childrenPresentational: false, + nameFrom: [ + 'author', + ], + props: {}, + relatedConcepts: [ + { + module: 'HTML', + concept: { + name: 'dt', + }, + }, + ], + requireContextRole: [], + requiredOwnedElements: [], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'structure', + 'section', + ], + ], +}; + +export default termRole; \ No newline at end of file diff --git a/src/etc/aria/literal/textboxRole.js b/src/etc/aria/literal/textboxRole.js new file mode 100644 index 00000000..5c6a62df --- /dev/null +++ b/src/etc/aria/literal/textboxRole.js @@ -0,0 +1,64 @@ +/** + * @flow + */ +const textboxRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: true, + baseConcepts: [], + childrenPresentational: false, + nameFrom: [ + 'author', + ], + props: { + 'aria-activedescendant': null, + 'aria-autocomplete': null, + 'aria-multiline': null, + 'aria-placeholder': null, + 'aria-readonly': null, + 'aria-required': null, + }, + relatedConcepts: [ + { + module: 'XForms', + concept: { + name: 'input', + }, + }, + { + module: 'HTML', + concept: { + name: 'textarea', + }, + }, + { + module: 'HTML', + concept: { + name: 'input', + }, + }, + { + module: 'HTML', + concept: { + name: 'input', + attributes: [ + { + name: 'type', + value: 'text', + }, + ], + }, + }, + ], + requireContextRole: [], + requiredOwnedElements: [], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'widget', + 'input', + ], + ], +}; + +export default textboxRole; \ No newline at end of file diff --git a/src/etc/aria/literal/timerRole.js b/src/etc/aria/literal/timerRole.js new file mode 100644 index 00000000..66ace53d --- /dev/null +++ b/src/etc/aria/literal/timerRole.js @@ -0,0 +1,27 @@ +/** + * @flow + */ +const timerRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: true, + baseConcepts: [], + childrenPresentational: false, + nameFrom: [ + 'author', + ], + props: {}, + relatedConcepts: [], + requireContextRole: [], + requiredOwnedElements: [], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'structure', + 'section', + 'status', + ], + ], +}; + +export default timerRole; \ No newline at end of file diff --git a/src/etc/aria/literal/toolbarRole.js b/src/etc/aria/literal/toolbarRole.js new file mode 100644 index 00000000..cdcf18bb --- /dev/null +++ b/src/etc/aria/literal/toolbarRole.js @@ -0,0 +1,36 @@ +/** + * @flow + */ +const toolbarRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: false, + baseConcepts: [], + childrenPresentational: false, + nameFrom: [ + 'author', + ], + props: { + 'aria-orientation': 'horizontal', + }, + relatedConcepts: [ + { + module: 'ARIA', + concept: { + name: 'menubar', + }, + }, + ], + requireContextRole: [], + requiredOwnedElements: [], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'structure', + 'section', + 'group', + ], + ], +}; + +export default toolbarRole; \ No newline at end of file diff --git a/src/etc/aria/literal/tooltipRole.js b/src/etc/aria/literal/tooltipRole.js new file mode 100644 index 00000000..0a12c76f --- /dev/null +++ b/src/etc/aria/literal/tooltipRole.js @@ -0,0 +1,27 @@ +/** + * @flow + */ +const tooltipRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: true, + baseConcepts: [], + childrenPresentational: false, + nameFrom: [ + 'author', + 'contents', + ], + props: {}, + relatedConcepts: [], + requireContextRole: [], + requiredOwnedElements: [], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'structure', + 'section', + ], + ], +}; + +export default tooltipRole; \ No newline at end of file diff --git a/src/etc/aria/literal/treeRole.js b/src/etc/aria/literal/treeRole.js new file mode 100644 index 00000000..bd7aeb24 --- /dev/null +++ b/src/etc/aria/literal/treeRole.js @@ -0,0 +1,46 @@ +/** + * @flow + */ +const treeRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: true, + baseConcepts: [], + childrenPresentational: false, + nameFrom: [ + 'author', + ], + props: { + 'aria-multiselectable': null, + 'aria-required': null, + 'aria-orientation': 'vertical', + }, + relatedConcepts: [], + requireContextRole: [], + requiredOwnedElements: [ + [ + 'group', + 'treeitem', + ], + [ + 'treeitem', + ], + ], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'widget', + 'composite', + 'select', + ], + [ + 'roletype', + 'structure', + 'section', + 'group', + 'select', + ], + ], +}; + +export default treeRole; \ No newline at end of file diff --git a/src/etc/aria/literal/treegridRole.js b/src/etc/aria/literal/treegridRole.js new file mode 100644 index 00000000..6bf1ca5c --- /dev/null +++ b/src/etc/aria/literal/treegridRole.js @@ -0,0 +1,57 @@ +/** + * @flow + */ +const treegridRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: false, + baseConcepts: [], + childrenPresentational: false, + nameFrom: [ + 'author', + ], + props: {}, + relatedConcepts: [], + requireContextRole: [], + requiredOwnedElements: [ + [ + 'rowgroup', + 'row', + ], + [ + 'row', + ], + ], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'widget', + 'composite', + 'grid', + ], + [ + 'roletype', + 'structure', + 'section', + 'table', + 'grid', + ], + [ + 'roletype', + 'widget', + 'composite', + 'select', + 'tree', + ], + [ + 'roletype', + 'structure', + 'section', + 'group', + 'select', + 'tree', + ], + ], +}; + +export default treegridRole; \ No newline at end of file diff --git a/src/etc/aria/literal/treeitemRole.js b/src/etc/aria/literal/treeitemRole.js new file mode 100644 index 00000000..d1dfb7c9 --- /dev/null +++ b/src/etc/aria/literal/treeitemRole.js @@ -0,0 +1,37 @@ +/** + * @flow + */ +const treeitemRole: RoleDefinition = { + abstract: false, + accessibleNameRequired: true, + baseConcepts: [], + childrenPresentational: false, + nameFrom: [ + 'author', + 'contents', + ], + props: {}, + relatedConcepts: [], + requireContextRole: [ + 'group', + 'tree', + ], + requiredOwnedElements: [], + requiredProps: {}, + superClass: [ + [ + 'roletype', + 'structure', + 'section', + 'listitem', + ], + [ + 'roletype', + 'widget', + 'input', + 'option', + ], + ], +}; + +export default treeitemRole; \ No newline at end of file diff --git a/src/etc/roles.json b/src/etc/roles.json index b0254261..04243dad 100644 --- a/src/etc/roles.json +++ b/src/etc/roles.json @@ -264,7 +264,8 @@ "name": "td" } }], - "relatedConcepts": [] + "relatedConcepts": [], + "childrenPresentational": false }, "checkbox": { "superClass": ["input"], @@ -3163,7 +3164,12 @@ }, "none": { "superClass": [], - "props": [] + "props": [], + "requiredProps": [], + "baseConcepts": [], + "relatedConcepts": [], + "childrenPresentational": false, + "abstract": false }, "note": { "superClass": ["section"], @@ -4687,6 +4693,7 @@ "requiredProps": [], "abstract": true, "baseConcepts": [], - "relatedConcepts": [] + "relatedConcepts": [], + "childrenPresentational": false } } diff --git a/src/roleElementMap.js b/src/roleElementMap.js index f6d67dd8..92bafbda 100644 --- a/src/roleElementMap.js +++ b/src/roleElementMap.js @@ -4,34 +4,35 @@ import rolesMap from './rolesMap'; -type RelationConceptSet = Set; +type RelationConceptSet = Set; type RoleElementRelationMap = Map; -// $FlowFixMe: spread operand is valid on $Iterable -const roleElementMap: RoleElementRelationMap = [...rolesMap.keys()] - .reduce(( - accumulator: RoleElementRelationMap, - key: string, - ): RoleElementRelationMap => { - const role = rolesMap.get(key); - if (role) { - [ - ...role.baseConcepts, - ...role.relatedConcepts, - ] - .forEach(( - relation: RoleRelation, - ): void => { - if (relation.module === 'HTML') { - const concept: RelationConcept = relation.concept; - const relationConcepts: RelationConceptSet = accumulator.get(key) || new Set([]); - relationConcepts.add(JSON.stringify(concept)); - accumulator.set(key, relationConcepts); +const roleElementMap: RoleElementRelationMap = new Map([]); + +[...rolesMap.keys()] + .forEach(( + key: string, + ): void => { + const role = rolesMap.get(key); + if (role) { + [ + ...role.baseConcepts, + ...role.relatedConcepts, + ] + .forEach(( + relation: RoleRelation, + ): void => { + if (relation.module === 'HTML') { + const concept = relation.concept; + if (concept) { + const relationConcepts = roleElementMap.get(key) || new Set([]); + relationConcepts.add(concept); + roleElementMap.set(key, relationConcepts); } - }); - } - return accumulator; - }, new Map([])); + } + }); + } + }); export default roleElementMap; diff --git a/src/rolesMap.js b/src/rolesMap.js index 871872a9..52ccadbf 100644 --- a/src/rolesMap.js +++ b/src/rolesMap.js @@ -2,17 +2,24 @@ * @flow */ -import rolesJSON from './etc/roles.json'; +import ariaAbstractRoles from './etc/aria/ariaAbstractRoles'; +import ariaLiteralRoles from './etc/aria/ariaLiteralRoles'; +import ariaDpubRoles from './etc/aria/ariaDpubRoles'; type MapOfRoleDefinitions = Map; const rolesMap: MapOfRoleDefinitions = new Map([]); - -Object - .keys(rolesJSON) - .reduce( - (map, key) => map.set(key, (rolesJSON[key]: RoleDefinition)), - rolesMap, +[ + ariaAbstractRoles, + ariaLiteralRoles, + ariaDpubRoles, +].forEach(roleSet => { + roleSet.forEach( + ( + value: RoleDefinition, + key: string + ) => rolesMap.set(key, value) ); +}); export default rolesMap; From 64962216ed08a5aab026f96589e452bbb84c07b8 Mon Sep 17 00:00:00 2001 From: Jesse Renee Beach Date: Wed, 1 Mar 2017 16:41:46 -0800 Subject: [PATCH 03/15] Use the correct module names for the abstract and dpub roles rollup modules --- scripts/breakUpAriaJSON.js | 4 ++-- src/etc/aria/ariaAbstractRoles.js | 4 ++-- src/etc/aria/ariaDpubRoles.js | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/breakUpAriaJSON.js b/scripts/breakUpAriaJSON.js index 5c7b76a6..dcec8a73 100644 --- a/scripts/breakUpAriaJSON.js +++ b/scripts/breakUpAriaJSON.js @@ -294,11 +294,11 @@ fs.readFile(path.join('src/etc/roles.json'), { + ' */\n' + `${requiresMapper(requires[0], path.join(requires[2]), 0)}\n` + `\n` - + `const ariaLiteralRoles = new Map([\n` + + `const ${requires[1]} = new Map([\n` + `${requiresCombiner(requires[0], 1)}\n` + `]);\n` + `\n` - + `export default ariaLiteralRoles;`, + + `export default ${requires[1]};`, { encoding: 'ascii' }, diff --git a/src/etc/aria/ariaAbstractRoles.js b/src/etc/aria/ariaAbstractRoles.js index 3a0e0250..76bdf744 100644 --- a/src/etc/aria/ariaAbstractRoles.js +++ b/src/etc/aria/ariaAbstractRoles.js @@ -14,7 +14,7 @@ import structureRole from './abstract/structureRole'; import widgetRole from './abstract/widgetRole'; import windowRole from './abstract/windowRole'; -const ariaLiteralRoles = new Map([ +const ariaAbstractRoles = new Map([ ['command', commandRole], ['composite', compositeRole], ['input', inputRole], @@ -29,4 +29,4 @@ const ariaLiteralRoles = new Map([ ['window', windowRole] ]); -export default ariaLiteralRoles; \ No newline at end of file +export default ariaAbstractRoles; \ No newline at end of file diff --git a/src/etc/aria/ariaDpubRoles.js b/src/etc/aria/ariaDpubRoles.js index 1d9e8904..d1f9370e 100644 --- a/src/etc/aria/ariaDpubRoles.js +++ b/src/etc/aria/ariaDpubRoles.js @@ -41,7 +41,7 @@ import docSubtitleRole from './dpub/docSubtitleRole'; import docTipRole from './dpub/docTipRole'; import docTocRole from './dpub/docTocRole'; -const ariaLiteralRoles = new Map([ +const ariaDpubRoles = new Map([ ['doc-abstract', docAbstractRole], ['doc-acknowledgments', docAcknowledgmentsRole], ['doc-afterword', docAfterwordRole], @@ -83,4 +83,4 @@ const ariaLiteralRoles = new Map([ ['doc-toc', docTocRole] ]); -export default ariaLiteralRoles; \ No newline at end of file +export default ariaDpubRoles; \ No newline at end of file From 5b0fa8f82462ae745f0357ad3be576d706141162 Mon Sep 17 00:00:00 2001 From: Jesse Renee Beach Date: Thu, 2 Mar 2017 10:34:01 -0800 Subject: [PATCH 04/15] Update flow-bin to 0.40.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c09d94c0..21aef781 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "eslint-plugin-flowtype": "^2.30.0", "eslint-plugin-import": "^2.2.0", "expect": "^1.20.2", - "flow-bin": "^0.38.0", + "flow-bin": "^0.40.0", "jest": "^18.1.0", "minimist": "^1.2.0", "rimraf": "^2.5.4" From 686a579d270bf7567cafd2e77ca89557a578926d Mon Sep 17 00:00:00 2001 From: Jesse Renee Beach Date: Thu, 2 Mar 2017 10:48:08 -0800 Subject: [PATCH 05/15] Move src/etc/aria to src/etc/roles --- src/etc/{aria => roles}/abstract/commandRole.js | 0 src/etc/{aria => roles}/abstract/compositeRole.js | 0 src/etc/{aria => roles}/abstract/inputRole.js | 0 src/etc/{aria => roles}/abstract/landmarkRole.js | 0 src/etc/{aria => roles}/abstract/rangeRole.js | 0 src/etc/{aria => roles}/abstract/roletypeRole.js | 0 src/etc/{aria => roles}/abstract/sectionRole.js | 0 src/etc/{aria => roles}/abstract/sectionheadRole.js | 0 src/etc/{aria => roles}/abstract/selectRole.js | 0 src/etc/{aria => roles}/abstract/structureRole.js | 0 src/etc/{aria => roles}/abstract/widgetRole.js | 0 src/etc/{aria => roles}/abstract/windowRole.js | 0 src/etc/{aria => roles}/ariaAbstractRoles.js | 0 src/etc/{aria => roles}/ariaDpubRoles.js | 0 src/etc/{aria => roles}/ariaLiteralRoles.js | 0 src/etc/{aria => roles}/dpub/docAbstractRole.js | 0 src/etc/{aria => roles}/dpub/docAcknowledgmentsRole.js | 0 src/etc/{aria => roles}/dpub/docAfterwordRole.js | 0 src/etc/{aria => roles}/dpub/docAppendixRole.js | 0 src/etc/{aria => roles}/dpub/docBacklinkRole.js | 0 src/etc/{aria => roles}/dpub/docBiblioentryRole.js | 0 src/etc/{aria => roles}/dpub/docBibliographyRole.js | 0 src/etc/{aria => roles}/dpub/docBibliorefRole.js | 0 src/etc/{aria => roles}/dpub/docChapterRole.js | 0 src/etc/{aria => roles}/dpub/docColophonRole.js | 0 src/etc/{aria => roles}/dpub/docConclusionRole.js | 0 src/etc/{aria => roles}/dpub/docCoverRole.js | 0 src/etc/{aria => roles}/dpub/docCreditRole.js | 0 src/etc/{aria => roles}/dpub/docCreditsRole.js | 0 src/etc/{aria => roles}/dpub/docDedicationRole.js | 0 src/etc/{aria => roles}/dpub/docEndnoteRole.js | 0 src/etc/{aria => roles}/dpub/docEndnotesRole.js | 0 src/etc/{aria => roles}/dpub/docEpigraphRole.js | 0 src/etc/{aria => roles}/dpub/docEpilogueRole.js | 0 src/etc/{aria => roles}/dpub/docErrataRole.js | 0 src/etc/{aria => roles}/dpub/docExampleRole.js | 0 src/etc/{aria => roles}/dpub/docFootnoteRole.js | 0 src/etc/{aria => roles}/dpub/docForewordRole.js | 0 src/etc/{aria => roles}/dpub/docGlossaryRole.js | 0 src/etc/{aria => roles}/dpub/docGlossrefRole.js | 0 src/etc/{aria => roles}/dpub/docIndexRole.js | 0 src/etc/{aria => roles}/dpub/docIntroductionRole.js | 0 src/etc/{aria => roles}/dpub/docNoterefRole.js | 0 src/etc/{aria => roles}/dpub/docNoticeRole.js | 0 src/etc/{aria => roles}/dpub/docPagebreakRole.js | 0 src/etc/{aria => roles}/dpub/docPagelistRole.js | 0 src/etc/{aria => roles}/dpub/docPartRole.js | 0 src/etc/{aria => roles}/dpub/docPrefaceRole.js | 0 src/etc/{aria => roles}/dpub/docPrologueRole.js | 0 src/etc/{aria => roles}/dpub/docPullquoteRole.js | 0 src/etc/{aria => roles}/dpub/docQnaRole.js | 0 src/etc/{aria => roles}/dpub/docSubtitleRole.js | 0 src/etc/{aria => roles}/dpub/docTipRole.js | 0 src/etc/{aria => roles}/dpub/docTocRole.js | 0 src/etc/{aria => roles}/literal/alertRole.js | 0 src/etc/{aria => roles}/literal/alertdialogRole.js | 0 src/etc/{aria => roles}/literal/applicationRole.js | 0 src/etc/{aria => roles}/literal/articleRole.js | 0 src/etc/{aria => roles}/literal/bannerRole.js | 0 src/etc/{aria => roles}/literal/buttonRole.js | 0 src/etc/{aria => roles}/literal/cellRole.js | 0 src/etc/{aria => roles}/literal/checkboxRole.js | 0 src/etc/{aria => roles}/literal/columnheaderRole.js | 0 src/etc/{aria => roles}/literal/comboboxRole.js | 0 src/etc/{aria => roles}/literal/complementaryRole.js | 0 src/etc/{aria => roles}/literal/contentinfoRole.js | 0 src/etc/{aria => roles}/literal/definitionRole.js | 0 src/etc/{aria => roles}/literal/dialogRole.js | 0 src/etc/{aria => roles}/literal/directoryRole.js | 0 src/etc/{aria => roles}/literal/documentRole.js | 0 src/etc/{aria => roles}/literal/feedRole.js | 0 src/etc/{aria => roles}/literal/figureRole.js | 0 src/etc/{aria => roles}/literal/formRole.js | 0 src/etc/{aria => roles}/literal/gridRole.js | 0 src/etc/{aria => roles}/literal/gridcellRole.js | 0 src/etc/{aria => roles}/literal/groupRole.js | 0 src/etc/{aria => roles}/literal/headingRole.js | 0 src/etc/{aria => roles}/literal/imgRole.js | 0 src/etc/{aria => roles}/literal/linkRole.js | 0 src/etc/{aria => roles}/literal/listRole.js | 0 src/etc/{aria => roles}/literal/listboxRole.js | 0 src/etc/{aria => roles}/literal/listitemRole.js | 0 src/etc/{aria => roles}/literal/logRole.js | 0 src/etc/{aria => roles}/literal/mainRole.js | 0 src/etc/{aria => roles}/literal/marqueeRole.js | 0 src/etc/{aria => roles}/literal/mathRole.js | 0 src/etc/{aria => roles}/literal/menuRole.js | 0 src/etc/{aria => roles}/literal/menubarRole.js | 0 src/etc/{aria => roles}/literal/menuitemRole.js | 0 src/etc/{aria => roles}/literal/menuitemcheckboxRole.js | 0 src/etc/{aria => roles}/literal/menuitemradioRole.js | 0 src/etc/{aria => roles}/literal/navigationRole.js | 0 src/etc/{aria => roles}/literal/noneRole.js | 0 src/etc/{aria => roles}/literal/noteRole.js | 0 src/etc/{aria => roles}/literal/optionRole.js | 0 src/etc/{aria => roles}/literal/presentationRole.js | 0 src/etc/{aria => roles}/literal/progressbarRole.js | 0 src/etc/{aria => roles}/literal/radioRole.js | 0 src/etc/{aria => roles}/literal/radiogroupRole.js | 0 src/etc/{aria => roles}/literal/regionRole.js | 0 src/etc/{aria => roles}/literal/rowRole.js | 0 src/etc/{aria => roles}/literal/rowgroupRole.js | 0 src/etc/{aria => roles}/literal/rowheaderRole.js | 0 src/etc/{aria => roles}/literal/scrollbarRole.js | 0 src/etc/{aria => roles}/literal/searchRole.js | 0 src/etc/{aria => roles}/literal/searchboxRole.js | 0 src/etc/{aria => roles}/literal/separatorRole.js | 0 src/etc/{aria => roles}/literal/sliderRole.js | 0 src/etc/{aria => roles}/literal/spinbuttonRole.js | 0 src/etc/{aria => roles}/literal/statusRole.js | 0 src/etc/{aria => roles}/literal/switchRole.js | 0 src/etc/{aria => roles}/literal/tabRole.js | 0 src/etc/{aria => roles}/literal/tableRole.js | 0 src/etc/{aria => roles}/literal/tablistRole.js | 0 src/etc/{aria => roles}/literal/tabpanelRole.js | 0 src/etc/{aria => roles}/literal/termRole.js | 0 src/etc/{aria => roles}/literal/textboxRole.js | 0 src/etc/{aria => roles}/literal/timerRole.js | 0 src/etc/{aria => roles}/literal/toolbarRole.js | 0 src/etc/{aria => roles}/literal/tooltipRole.js | 0 src/etc/{aria => roles}/literal/treeRole.js | 0 src/etc/{aria => roles}/literal/treegridRole.js | 0 src/etc/{aria => roles}/literal/treeitemRole.js | 0 123 files changed, 0 insertions(+), 0 deletions(-) rename src/etc/{aria => roles}/abstract/commandRole.js (100%) rename src/etc/{aria => roles}/abstract/compositeRole.js (100%) rename src/etc/{aria => roles}/abstract/inputRole.js (100%) rename src/etc/{aria => roles}/abstract/landmarkRole.js (100%) rename src/etc/{aria => roles}/abstract/rangeRole.js (100%) rename src/etc/{aria => roles}/abstract/roletypeRole.js (100%) rename src/etc/{aria => roles}/abstract/sectionRole.js (100%) rename src/etc/{aria => roles}/abstract/sectionheadRole.js (100%) rename src/etc/{aria => roles}/abstract/selectRole.js (100%) rename src/etc/{aria => roles}/abstract/structureRole.js (100%) rename src/etc/{aria => roles}/abstract/widgetRole.js (100%) rename src/etc/{aria => roles}/abstract/windowRole.js (100%) rename src/etc/{aria => roles}/ariaAbstractRoles.js (100%) rename src/etc/{aria => roles}/ariaDpubRoles.js (100%) rename src/etc/{aria => roles}/ariaLiteralRoles.js (100%) rename src/etc/{aria => roles}/dpub/docAbstractRole.js (100%) rename src/etc/{aria => roles}/dpub/docAcknowledgmentsRole.js (100%) rename src/etc/{aria => roles}/dpub/docAfterwordRole.js (100%) rename src/etc/{aria => roles}/dpub/docAppendixRole.js (100%) rename src/etc/{aria => roles}/dpub/docBacklinkRole.js (100%) rename src/etc/{aria => roles}/dpub/docBiblioentryRole.js (100%) rename src/etc/{aria => roles}/dpub/docBibliographyRole.js (100%) rename src/etc/{aria => roles}/dpub/docBibliorefRole.js (100%) rename src/etc/{aria => roles}/dpub/docChapterRole.js (100%) rename src/etc/{aria => roles}/dpub/docColophonRole.js (100%) rename src/etc/{aria => roles}/dpub/docConclusionRole.js (100%) rename src/etc/{aria => roles}/dpub/docCoverRole.js (100%) rename src/etc/{aria => roles}/dpub/docCreditRole.js (100%) rename src/etc/{aria => roles}/dpub/docCreditsRole.js (100%) rename src/etc/{aria => roles}/dpub/docDedicationRole.js (100%) rename src/etc/{aria => roles}/dpub/docEndnoteRole.js (100%) rename src/etc/{aria => roles}/dpub/docEndnotesRole.js (100%) rename src/etc/{aria => roles}/dpub/docEpigraphRole.js (100%) rename src/etc/{aria => roles}/dpub/docEpilogueRole.js (100%) rename src/etc/{aria => roles}/dpub/docErrataRole.js (100%) rename src/etc/{aria => roles}/dpub/docExampleRole.js (100%) rename src/etc/{aria => roles}/dpub/docFootnoteRole.js (100%) rename src/etc/{aria => roles}/dpub/docForewordRole.js (100%) rename src/etc/{aria => roles}/dpub/docGlossaryRole.js (100%) rename src/etc/{aria => roles}/dpub/docGlossrefRole.js (100%) rename src/etc/{aria => roles}/dpub/docIndexRole.js (100%) rename src/etc/{aria => roles}/dpub/docIntroductionRole.js (100%) rename src/etc/{aria => roles}/dpub/docNoterefRole.js (100%) rename src/etc/{aria => roles}/dpub/docNoticeRole.js (100%) rename src/etc/{aria => roles}/dpub/docPagebreakRole.js (100%) rename src/etc/{aria => roles}/dpub/docPagelistRole.js (100%) rename src/etc/{aria => roles}/dpub/docPartRole.js (100%) rename src/etc/{aria => roles}/dpub/docPrefaceRole.js (100%) rename src/etc/{aria => roles}/dpub/docPrologueRole.js (100%) rename src/etc/{aria => roles}/dpub/docPullquoteRole.js (100%) rename src/etc/{aria => roles}/dpub/docQnaRole.js (100%) rename src/etc/{aria => roles}/dpub/docSubtitleRole.js (100%) rename src/etc/{aria => roles}/dpub/docTipRole.js (100%) rename src/etc/{aria => roles}/dpub/docTocRole.js (100%) rename src/etc/{aria => roles}/literal/alertRole.js (100%) rename src/etc/{aria => roles}/literal/alertdialogRole.js (100%) rename src/etc/{aria => roles}/literal/applicationRole.js (100%) rename src/etc/{aria => roles}/literal/articleRole.js (100%) rename src/etc/{aria => roles}/literal/bannerRole.js (100%) rename src/etc/{aria => roles}/literal/buttonRole.js (100%) rename src/etc/{aria => roles}/literal/cellRole.js (100%) rename src/etc/{aria => roles}/literal/checkboxRole.js (100%) rename src/etc/{aria => roles}/literal/columnheaderRole.js (100%) rename src/etc/{aria => roles}/literal/comboboxRole.js (100%) rename src/etc/{aria => roles}/literal/complementaryRole.js (100%) rename src/etc/{aria => roles}/literal/contentinfoRole.js (100%) rename src/etc/{aria => roles}/literal/definitionRole.js (100%) rename src/etc/{aria => roles}/literal/dialogRole.js (100%) rename src/etc/{aria => roles}/literal/directoryRole.js (100%) rename src/etc/{aria => roles}/literal/documentRole.js (100%) rename src/etc/{aria => roles}/literal/feedRole.js (100%) rename src/etc/{aria => roles}/literal/figureRole.js (100%) rename src/etc/{aria => roles}/literal/formRole.js (100%) rename src/etc/{aria => roles}/literal/gridRole.js (100%) rename src/etc/{aria => roles}/literal/gridcellRole.js (100%) rename src/etc/{aria => roles}/literal/groupRole.js (100%) rename src/etc/{aria => roles}/literal/headingRole.js (100%) rename src/etc/{aria => roles}/literal/imgRole.js (100%) rename src/etc/{aria => roles}/literal/linkRole.js (100%) rename src/etc/{aria => roles}/literal/listRole.js (100%) rename src/etc/{aria => roles}/literal/listboxRole.js (100%) rename src/etc/{aria => roles}/literal/listitemRole.js (100%) rename src/etc/{aria => roles}/literal/logRole.js (100%) rename src/etc/{aria => roles}/literal/mainRole.js (100%) rename src/etc/{aria => roles}/literal/marqueeRole.js (100%) rename src/etc/{aria => roles}/literal/mathRole.js (100%) rename src/etc/{aria => roles}/literal/menuRole.js (100%) rename src/etc/{aria => roles}/literal/menubarRole.js (100%) rename src/etc/{aria => roles}/literal/menuitemRole.js (100%) rename src/etc/{aria => roles}/literal/menuitemcheckboxRole.js (100%) rename src/etc/{aria => roles}/literal/menuitemradioRole.js (100%) rename src/etc/{aria => roles}/literal/navigationRole.js (100%) rename src/etc/{aria => roles}/literal/noneRole.js (100%) rename src/etc/{aria => roles}/literal/noteRole.js (100%) rename src/etc/{aria => roles}/literal/optionRole.js (100%) rename src/etc/{aria => roles}/literal/presentationRole.js (100%) rename src/etc/{aria => roles}/literal/progressbarRole.js (100%) rename src/etc/{aria => roles}/literal/radioRole.js (100%) rename src/etc/{aria => roles}/literal/radiogroupRole.js (100%) rename src/etc/{aria => roles}/literal/regionRole.js (100%) rename src/etc/{aria => roles}/literal/rowRole.js (100%) rename src/etc/{aria => roles}/literal/rowgroupRole.js (100%) rename src/etc/{aria => roles}/literal/rowheaderRole.js (100%) rename src/etc/{aria => roles}/literal/scrollbarRole.js (100%) rename src/etc/{aria => roles}/literal/searchRole.js (100%) rename src/etc/{aria => roles}/literal/searchboxRole.js (100%) rename src/etc/{aria => roles}/literal/separatorRole.js (100%) rename src/etc/{aria => roles}/literal/sliderRole.js (100%) rename src/etc/{aria => roles}/literal/spinbuttonRole.js (100%) rename src/etc/{aria => roles}/literal/statusRole.js (100%) rename src/etc/{aria => roles}/literal/switchRole.js (100%) rename src/etc/{aria => roles}/literal/tabRole.js (100%) rename src/etc/{aria => roles}/literal/tableRole.js (100%) rename src/etc/{aria => roles}/literal/tablistRole.js (100%) rename src/etc/{aria => roles}/literal/tabpanelRole.js (100%) rename src/etc/{aria => roles}/literal/termRole.js (100%) rename src/etc/{aria => roles}/literal/textboxRole.js (100%) rename src/etc/{aria => roles}/literal/timerRole.js (100%) rename src/etc/{aria => roles}/literal/toolbarRole.js (100%) rename src/etc/{aria => roles}/literal/tooltipRole.js (100%) rename src/etc/{aria => roles}/literal/treeRole.js (100%) rename src/etc/{aria => roles}/literal/treegridRole.js (100%) rename src/etc/{aria => roles}/literal/treeitemRole.js (100%) diff --git a/src/etc/aria/abstract/commandRole.js b/src/etc/roles/abstract/commandRole.js similarity index 100% rename from src/etc/aria/abstract/commandRole.js rename to src/etc/roles/abstract/commandRole.js diff --git a/src/etc/aria/abstract/compositeRole.js b/src/etc/roles/abstract/compositeRole.js similarity index 100% rename from src/etc/aria/abstract/compositeRole.js rename to src/etc/roles/abstract/compositeRole.js diff --git a/src/etc/aria/abstract/inputRole.js b/src/etc/roles/abstract/inputRole.js similarity index 100% rename from src/etc/aria/abstract/inputRole.js rename to src/etc/roles/abstract/inputRole.js diff --git a/src/etc/aria/abstract/landmarkRole.js b/src/etc/roles/abstract/landmarkRole.js similarity index 100% rename from src/etc/aria/abstract/landmarkRole.js rename to src/etc/roles/abstract/landmarkRole.js diff --git a/src/etc/aria/abstract/rangeRole.js b/src/etc/roles/abstract/rangeRole.js similarity index 100% rename from src/etc/aria/abstract/rangeRole.js rename to src/etc/roles/abstract/rangeRole.js diff --git a/src/etc/aria/abstract/roletypeRole.js b/src/etc/roles/abstract/roletypeRole.js similarity index 100% rename from src/etc/aria/abstract/roletypeRole.js rename to src/etc/roles/abstract/roletypeRole.js diff --git a/src/etc/aria/abstract/sectionRole.js b/src/etc/roles/abstract/sectionRole.js similarity index 100% rename from src/etc/aria/abstract/sectionRole.js rename to src/etc/roles/abstract/sectionRole.js diff --git a/src/etc/aria/abstract/sectionheadRole.js b/src/etc/roles/abstract/sectionheadRole.js similarity index 100% rename from src/etc/aria/abstract/sectionheadRole.js rename to src/etc/roles/abstract/sectionheadRole.js diff --git a/src/etc/aria/abstract/selectRole.js b/src/etc/roles/abstract/selectRole.js similarity index 100% rename from src/etc/aria/abstract/selectRole.js rename to src/etc/roles/abstract/selectRole.js diff --git a/src/etc/aria/abstract/structureRole.js b/src/etc/roles/abstract/structureRole.js similarity index 100% rename from src/etc/aria/abstract/structureRole.js rename to src/etc/roles/abstract/structureRole.js diff --git a/src/etc/aria/abstract/widgetRole.js b/src/etc/roles/abstract/widgetRole.js similarity index 100% rename from src/etc/aria/abstract/widgetRole.js rename to src/etc/roles/abstract/widgetRole.js diff --git a/src/etc/aria/abstract/windowRole.js b/src/etc/roles/abstract/windowRole.js similarity index 100% rename from src/etc/aria/abstract/windowRole.js rename to src/etc/roles/abstract/windowRole.js diff --git a/src/etc/aria/ariaAbstractRoles.js b/src/etc/roles/ariaAbstractRoles.js similarity index 100% rename from src/etc/aria/ariaAbstractRoles.js rename to src/etc/roles/ariaAbstractRoles.js diff --git a/src/etc/aria/ariaDpubRoles.js b/src/etc/roles/ariaDpubRoles.js similarity index 100% rename from src/etc/aria/ariaDpubRoles.js rename to src/etc/roles/ariaDpubRoles.js diff --git a/src/etc/aria/ariaLiteralRoles.js b/src/etc/roles/ariaLiteralRoles.js similarity index 100% rename from src/etc/aria/ariaLiteralRoles.js rename to src/etc/roles/ariaLiteralRoles.js diff --git a/src/etc/aria/dpub/docAbstractRole.js b/src/etc/roles/dpub/docAbstractRole.js similarity index 100% rename from src/etc/aria/dpub/docAbstractRole.js rename to src/etc/roles/dpub/docAbstractRole.js diff --git a/src/etc/aria/dpub/docAcknowledgmentsRole.js b/src/etc/roles/dpub/docAcknowledgmentsRole.js similarity index 100% rename from src/etc/aria/dpub/docAcknowledgmentsRole.js rename to src/etc/roles/dpub/docAcknowledgmentsRole.js diff --git a/src/etc/aria/dpub/docAfterwordRole.js b/src/etc/roles/dpub/docAfterwordRole.js similarity index 100% rename from src/etc/aria/dpub/docAfterwordRole.js rename to src/etc/roles/dpub/docAfterwordRole.js diff --git a/src/etc/aria/dpub/docAppendixRole.js b/src/etc/roles/dpub/docAppendixRole.js similarity index 100% rename from src/etc/aria/dpub/docAppendixRole.js rename to src/etc/roles/dpub/docAppendixRole.js diff --git a/src/etc/aria/dpub/docBacklinkRole.js b/src/etc/roles/dpub/docBacklinkRole.js similarity index 100% rename from src/etc/aria/dpub/docBacklinkRole.js rename to src/etc/roles/dpub/docBacklinkRole.js diff --git a/src/etc/aria/dpub/docBiblioentryRole.js b/src/etc/roles/dpub/docBiblioentryRole.js similarity index 100% rename from src/etc/aria/dpub/docBiblioentryRole.js rename to src/etc/roles/dpub/docBiblioentryRole.js diff --git a/src/etc/aria/dpub/docBibliographyRole.js b/src/etc/roles/dpub/docBibliographyRole.js similarity index 100% rename from src/etc/aria/dpub/docBibliographyRole.js rename to src/etc/roles/dpub/docBibliographyRole.js diff --git a/src/etc/aria/dpub/docBibliorefRole.js b/src/etc/roles/dpub/docBibliorefRole.js similarity index 100% rename from src/etc/aria/dpub/docBibliorefRole.js rename to src/etc/roles/dpub/docBibliorefRole.js diff --git a/src/etc/aria/dpub/docChapterRole.js b/src/etc/roles/dpub/docChapterRole.js similarity index 100% rename from src/etc/aria/dpub/docChapterRole.js rename to src/etc/roles/dpub/docChapterRole.js diff --git a/src/etc/aria/dpub/docColophonRole.js b/src/etc/roles/dpub/docColophonRole.js similarity index 100% rename from src/etc/aria/dpub/docColophonRole.js rename to src/etc/roles/dpub/docColophonRole.js diff --git a/src/etc/aria/dpub/docConclusionRole.js b/src/etc/roles/dpub/docConclusionRole.js similarity index 100% rename from src/etc/aria/dpub/docConclusionRole.js rename to src/etc/roles/dpub/docConclusionRole.js diff --git a/src/etc/aria/dpub/docCoverRole.js b/src/etc/roles/dpub/docCoverRole.js similarity index 100% rename from src/etc/aria/dpub/docCoverRole.js rename to src/etc/roles/dpub/docCoverRole.js diff --git a/src/etc/aria/dpub/docCreditRole.js b/src/etc/roles/dpub/docCreditRole.js similarity index 100% rename from src/etc/aria/dpub/docCreditRole.js rename to src/etc/roles/dpub/docCreditRole.js diff --git a/src/etc/aria/dpub/docCreditsRole.js b/src/etc/roles/dpub/docCreditsRole.js similarity index 100% rename from src/etc/aria/dpub/docCreditsRole.js rename to src/etc/roles/dpub/docCreditsRole.js diff --git a/src/etc/aria/dpub/docDedicationRole.js b/src/etc/roles/dpub/docDedicationRole.js similarity index 100% rename from src/etc/aria/dpub/docDedicationRole.js rename to src/etc/roles/dpub/docDedicationRole.js diff --git a/src/etc/aria/dpub/docEndnoteRole.js b/src/etc/roles/dpub/docEndnoteRole.js similarity index 100% rename from src/etc/aria/dpub/docEndnoteRole.js rename to src/etc/roles/dpub/docEndnoteRole.js diff --git a/src/etc/aria/dpub/docEndnotesRole.js b/src/etc/roles/dpub/docEndnotesRole.js similarity index 100% rename from src/etc/aria/dpub/docEndnotesRole.js rename to src/etc/roles/dpub/docEndnotesRole.js diff --git a/src/etc/aria/dpub/docEpigraphRole.js b/src/etc/roles/dpub/docEpigraphRole.js similarity index 100% rename from src/etc/aria/dpub/docEpigraphRole.js rename to src/etc/roles/dpub/docEpigraphRole.js diff --git a/src/etc/aria/dpub/docEpilogueRole.js b/src/etc/roles/dpub/docEpilogueRole.js similarity index 100% rename from src/etc/aria/dpub/docEpilogueRole.js rename to src/etc/roles/dpub/docEpilogueRole.js diff --git a/src/etc/aria/dpub/docErrataRole.js b/src/etc/roles/dpub/docErrataRole.js similarity index 100% rename from src/etc/aria/dpub/docErrataRole.js rename to src/etc/roles/dpub/docErrataRole.js diff --git a/src/etc/aria/dpub/docExampleRole.js b/src/etc/roles/dpub/docExampleRole.js similarity index 100% rename from src/etc/aria/dpub/docExampleRole.js rename to src/etc/roles/dpub/docExampleRole.js diff --git a/src/etc/aria/dpub/docFootnoteRole.js b/src/etc/roles/dpub/docFootnoteRole.js similarity index 100% rename from src/etc/aria/dpub/docFootnoteRole.js rename to src/etc/roles/dpub/docFootnoteRole.js diff --git a/src/etc/aria/dpub/docForewordRole.js b/src/etc/roles/dpub/docForewordRole.js similarity index 100% rename from src/etc/aria/dpub/docForewordRole.js rename to src/etc/roles/dpub/docForewordRole.js diff --git a/src/etc/aria/dpub/docGlossaryRole.js b/src/etc/roles/dpub/docGlossaryRole.js similarity index 100% rename from src/etc/aria/dpub/docGlossaryRole.js rename to src/etc/roles/dpub/docGlossaryRole.js diff --git a/src/etc/aria/dpub/docGlossrefRole.js b/src/etc/roles/dpub/docGlossrefRole.js similarity index 100% rename from src/etc/aria/dpub/docGlossrefRole.js rename to src/etc/roles/dpub/docGlossrefRole.js diff --git a/src/etc/aria/dpub/docIndexRole.js b/src/etc/roles/dpub/docIndexRole.js similarity index 100% rename from src/etc/aria/dpub/docIndexRole.js rename to src/etc/roles/dpub/docIndexRole.js diff --git a/src/etc/aria/dpub/docIntroductionRole.js b/src/etc/roles/dpub/docIntroductionRole.js similarity index 100% rename from src/etc/aria/dpub/docIntroductionRole.js rename to src/etc/roles/dpub/docIntroductionRole.js diff --git a/src/etc/aria/dpub/docNoterefRole.js b/src/etc/roles/dpub/docNoterefRole.js similarity index 100% rename from src/etc/aria/dpub/docNoterefRole.js rename to src/etc/roles/dpub/docNoterefRole.js diff --git a/src/etc/aria/dpub/docNoticeRole.js b/src/etc/roles/dpub/docNoticeRole.js similarity index 100% rename from src/etc/aria/dpub/docNoticeRole.js rename to src/etc/roles/dpub/docNoticeRole.js diff --git a/src/etc/aria/dpub/docPagebreakRole.js b/src/etc/roles/dpub/docPagebreakRole.js similarity index 100% rename from src/etc/aria/dpub/docPagebreakRole.js rename to src/etc/roles/dpub/docPagebreakRole.js diff --git a/src/etc/aria/dpub/docPagelistRole.js b/src/etc/roles/dpub/docPagelistRole.js similarity index 100% rename from src/etc/aria/dpub/docPagelistRole.js rename to src/etc/roles/dpub/docPagelistRole.js diff --git a/src/etc/aria/dpub/docPartRole.js b/src/etc/roles/dpub/docPartRole.js similarity index 100% rename from src/etc/aria/dpub/docPartRole.js rename to src/etc/roles/dpub/docPartRole.js diff --git a/src/etc/aria/dpub/docPrefaceRole.js b/src/etc/roles/dpub/docPrefaceRole.js similarity index 100% rename from src/etc/aria/dpub/docPrefaceRole.js rename to src/etc/roles/dpub/docPrefaceRole.js diff --git a/src/etc/aria/dpub/docPrologueRole.js b/src/etc/roles/dpub/docPrologueRole.js similarity index 100% rename from src/etc/aria/dpub/docPrologueRole.js rename to src/etc/roles/dpub/docPrologueRole.js diff --git a/src/etc/aria/dpub/docPullquoteRole.js b/src/etc/roles/dpub/docPullquoteRole.js similarity index 100% rename from src/etc/aria/dpub/docPullquoteRole.js rename to src/etc/roles/dpub/docPullquoteRole.js diff --git a/src/etc/aria/dpub/docQnaRole.js b/src/etc/roles/dpub/docQnaRole.js similarity index 100% rename from src/etc/aria/dpub/docQnaRole.js rename to src/etc/roles/dpub/docQnaRole.js diff --git a/src/etc/aria/dpub/docSubtitleRole.js b/src/etc/roles/dpub/docSubtitleRole.js similarity index 100% rename from src/etc/aria/dpub/docSubtitleRole.js rename to src/etc/roles/dpub/docSubtitleRole.js diff --git a/src/etc/aria/dpub/docTipRole.js b/src/etc/roles/dpub/docTipRole.js similarity index 100% rename from src/etc/aria/dpub/docTipRole.js rename to src/etc/roles/dpub/docTipRole.js diff --git a/src/etc/aria/dpub/docTocRole.js b/src/etc/roles/dpub/docTocRole.js similarity index 100% rename from src/etc/aria/dpub/docTocRole.js rename to src/etc/roles/dpub/docTocRole.js diff --git a/src/etc/aria/literal/alertRole.js b/src/etc/roles/literal/alertRole.js similarity index 100% rename from src/etc/aria/literal/alertRole.js rename to src/etc/roles/literal/alertRole.js diff --git a/src/etc/aria/literal/alertdialogRole.js b/src/etc/roles/literal/alertdialogRole.js similarity index 100% rename from src/etc/aria/literal/alertdialogRole.js rename to src/etc/roles/literal/alertdialogRole.js diff --git a/src/etc/aria/literal/applicationRole.js b/src/etc/roles/literal/applicationRole.js similarity index 100% rename from src/etc/aria/literal/applicationRole.js rename to src/etc/roles/literal/applicationRole.js diff --git a/src/etc/aria/literal/articleRole.js b/src/etc/roles/literal/articleRole.js similarity index 100% rename from src/etc/aria/literal/articleRole.js rename to src/etc/roles/literal/articleRole.js diff --git a/src/etc/aria/literal/bannerRole.js b/src/etc/roles/literal/bannerRole.js similarity index 100% rename from src/etc/aria/literal/bannerRole.js rename to src/etc/roles/literal/bannerRole.js diff --git a/src/etc/aria/literal/buttonRole.js b/src/etc/roles/literal/buttonRole.js similarity index 100% rename from src/etc/aria/literal/buttonRole.js rename to src/etc/roles/literal/buttonRole.js diff --git a/src/etc/aria/literal/cellRole.js b/src/etc/roles/literal/cellRole.js similarity index 100% rename from src/etc/aria/literal/cellRole.js rename to src/etc/roles/literal/cellRole.js diff --git a/src/etc/aria/literal/checkboxRole.js b/src/etc/roles/literal/checkboxRole.js similarity index 100% rename from src/etc/aria/literal/checkboxRole.js rename to src/etc/roles/literal/checkboxRole.js diff --git a/src/etc/aria/literal/columnheaderRole.js b/src/etc/roles/literal/columnheaderRole.js similarity index 100% rename from src/etc/aria/literal/columnheaderRole.js rename to src/etc/roles/literal/columnheaderRole.js diff --git a/src/etc/aria/literal/comboboxRole.js b/src/etc/roles/literal/comboboxRole.js similarity index 100% rename from src/etc/aria/literal/comboboxRole.js rename to src/etc/roles/literal/comboboxRole.js diff --git a/src/etc/aria/literal/complementaryRole.js b/src/etc/roles/literal/complementaryRole.js similarity index 100% rename from src/etc/aria/literal/complementaryRole.js rename to src/etc/roles/literal/complementaryRole.js diff --git a/src/etc/aria/literal/contentinfoRole.js b/src/etc/roles/literal/contentinfoRole.js similarity index 100% rename from src/etc/aria/literal/contentinfoRole.js rename to src/etc/roles/literal/contentinfoRole.js diff --git a/src/etc/aria/literal/definitionRole.js b/src/etc/roles/literal/definitionRole.js similarity index 100% rename from src/etc/aria/literal/definitionRole.js rename to src/etc/roles/literal/definitionRole.js diff --git a/src/etc/aria/literal/dialogRole.js b/src/etc/roles/literal/dialogRole.js similarity index 100% rename from src/etc/aria/literal/dialogRole.js rename to src/etc/roles/literal/dialogRole.js diff --git a/src/etc/aria/literal/directoryRole.js b/src/etc/roles/literal/directoryRole.js similarity index 100% rename from src/etc/aria/literal/directoryRole.js rename to src/etc/roles/literal/directoryRole.js diff --git a/src/etc/aria/literal/documentRole.js b/src/etc/roles/literal/documentRole.js similarity index 100% rename from src/etc/aria/literal/documentRole.js rename to src/etc/roles/literal/documentRole.js diff --git a/src/etc/aria/literal/feedRole.js b/src/etc/roles/literal/feedRole.js similarity index 100% rename from src/etc/aria/literal/feedRole.js rename to src/etc/roles/literal/feedRole.js diff --git a/src/etc/aria/literal/figureRole.js b/src/etc/roles/literal/figureRole.js similarity index 100% rename from src/etc/aria/literal/figureRole.js rename to src/etc/roles/literal/figureRole.js diff --git a/src/etc/aria/literal/formRole.js b/src/etc/roles/literal/formRole.js similarity index 100% rename from src/etc/aria/literal/formRole.js rename to src/etc/roles/literal/formRole.js diff --git a/src/etc/aria/literal/gridRole.js b/src/etc/roles/literal/gridRole.js similarity index 100% rename from src/etc/aria/literal/gridRole.js rename to src/etc/roles/literal/gridRole.js diff --git a/src/etc/aria/literal/gridcellRole.js b/src/etc/roles/literal/gridcellRole.js similarity index 100% rename from src/etc/aria/literal/gridcellRole.js rename to src/etc/roles/literal/gridcellRole.js diff --git a/src/etc/aria/literal/groupRole.js b/src/etc/roles/literal/groupRole.js similarity index 100% rename from src/etc/aria/literal/groupRole.js rename to src/etc/roles/literal/groupRole.js diff --git a/src/etc/aria/literal/headingRole.js b/src/etc/roles/literal/headingRole.js similarity index 100% rename from src/etc/aria/literal/headingRole.js rename to src/etc/roles/literal/headingRole.js diff --git a/src/etc/aria/literal/imgRole.js b/src/etc/roles/literal/imgRole.js similarity index 100% rename from src/etc/aria/literal/imgRole.js rename to src/etc/roles/literal/imgRole.js diff --git a/src/etc/aria/literal/linkRole.js b/src/etc/roles/literal/linkRole.js similarity index 100% rename from src/etc/aria/literal/linkRole.js rename to src/etc/roles/literal/linkRole.js diff --git a/src/etc/aria/literal/listRole.js b/src/etc/roles/literal/listRole.js similarity index 100% rename from src/etc/aria/literal/listRole.js rename to src/etc/roles/literal/listRole.js diff --git a/src/etc/aria/literal/listboxRole.js b/src/etc/roles/literal/listboxRole.js similarity index 100% rename from src/etc/aria/literal/listboxRole.js rename to src/etc/roles/literal/listboxRole.js diff --git a/src/etc/aria/literal/listitemRole.js b/src/etc/roles/literal/listitemRole.js similarity index 100% rename from src/etc/aria/literal/listitemRole.js rename to src/etc/roles/literal/listitemRole.js diff --git a/src/etc/aria/literal/logRole.js b/src/etc/roles/literal/logRole.js similarity index 100% rename from src/etc/aria/literal/logRole.js rename to src/etc/roles/literal/logRole.js diff --git a/src/etc/aria/literal/mainRole.js b/src/etc/roles/literal/mainRole.js similarity index 100% rename from src/etc/aria/literal/mainRole.js rename to src/etc/roles/literal/mainRole.js diff --git a/src/etc/aria/literal/marqueeRole.js b/src/etc/roles/literal/marqueeRole.js similarity index 100% rename from src/etc/aria/literal/marqueeRole.js rename to src/etc/roles/literal/marqueeRole.js diff --git a/src/etc/aria/literal/mathRole.js b/src/etc/roles/literal/mathRole.js similarity index 100% rename from src/etc/aria/literal/mathRole.js rename to src/etc/roles/literal/mathRole.js diff --git a/src/etc/aria/literal/menuRole.js b/src/etc/roles/literal/menuRole.js similarity index 100% rename from src/etc/aria/literal/menuRole.js rename to src/etc/roles/literal/menuRole.js diff --git a/src/etc/aria/literal/menubarRole.js b/src/etc/roles/literal/menubarRole.js similarity index 100% rename from src/etc/aria/literal/menubarRole.js rename to src/etc/roles/literal/menubarRole.js diff --git a/src/etc/aria/literal/menuitemRole.js b/src/etc/roles/literal/menuitemRole.js similarity index 100% rename from src/etc/aria/literal/menuitemRole.js rename to src/etc/roles/literal/menuitemRole.js diff --git a/src/etc/aria/literal/menuitemcheckboxRole.js b/src/etc/roles/literal/menuitemcheckboxRole.js similarity index 100% rename from src/etc/aria/literal/menuitemcheckboxRole.js rename to src/etc/roles/literal/menuitemcheckboxRole.js diff --git a/src/etc/aria/literal/menuitemradioRole.js b/src/etc/roles/literal/menuitemradioRole.js similarity index 100% rename from src/etc/aria/literal/menuitemradioRole.js rename to src/etc/roles/literal/menuitemradioRole.js diff --git a/src/etc/aria/literal/navigationRole.js b/src/etc/roles/literal/navigationRole.js similarity index 100% rename from src/etc/aria/literal/navigationRole.js rename to src/etc/roles/literal/navigationRole.js diff --git a/src/etc/aria/literal/noneRole.js b/src/etc/roles/literal/noneRole.js similarity index 100% rename from src/etc/aria/literal/noneRole.js rename to src/etc/roles/literal/noneRole.js diff --git a/src/etc/aria/literal/noteRole.js b/src/etc/roles/literal/noteRole.js similarity index 100% rename from src/etc/aria/literal/noteRole.js rename to src/etc/roles/literal/noteRole.js diff --git a/src/etc/aria/literal/optionRole.js b/src/etc/roles/literal/optionRole.js similarity index 100% rename from src/etc/aria/literal/optionRole.js rename to src/etc/roles/literal/optionRole.js diff --git a/src/etc/aria/literal/presentationRole.js b/src/etc/roles/literal/presentationRole.js similarity index 100% rename from src/etc/aria/literal/presentationRole.js rename to src/etc/roles/literal/presentationRole.js diff --git a/src/etc/aria/literal/progressbarRole.js b/src/etc/roles/literal/progressbarRole.js similarity index 100% rename from src/etc/aria/literal/progressbarRole.js rename to src/etc/roles/literal/progressbarRole.js diff --git a/src/etc/aria/literal/radioRole.js b/src/etc/roles/literal/radioRole.js similarity index 100% rename from src/etc/aria/literal/radioRole.js rename to src/etc/roles/literal/radioRole.js diff --git a/src/etc/aria/literal/radiogroupRole.js b/src/etc/roles/literal/radiogroupRole.js similarity index 100% rename from src/etc/aria/literal/radiogroupRole.js rename to src/etc/roles/literal/radiogroupRole.js diff --git a/src/etc/aria/literal/regionRole.js b/src/etc/roles/literal/regionRole.js similarity index 100% rename from src/etc/aria/literal/regionRole.js rename to src/etc/roles/literal/regionRole.js diff --git a/src/etc/aria/literal/rowRole.js b/src/etc/roles/literal/rowRole.js similarity index 100% rename from src/etc/aria/literal/rowRole.js rename to src/etc/roles/literal/rowRole.js diff --git a/src/etc/aria/literal/rowgroupRole.js b/src/etc/roles/literal/rowgroupRole.js similarity index 100% rename from src/etc/aria/literal/rowgroupRole.js rename to src/etc/roles/literal/rowgroupRole.js diff --git a/src/etc/aria/literal/rowheaderRole.js b/src/etc/roles/literal/rowheaderRole.js similarity index 100% rename from src/etc/aria/literal/rowheaderRole.js rename to src/etc/roles/literal/rowheaderRole.js diff --git a/src/etc/aria/literal/scrollbarRole.js b/src/etc/roles/literal/scrollbarRole.js similarity index 100% rename from src/etc/aria/literal/scrollbarRole.js rename to src/etc/roles/literal/scrollbarRole.js diff --git a/src/etc/aria/literal/searchRole.js b/src/etc/roles/literal/searchRole.js similarity index 100% rename from src/etc/aria/literal/searchRole.js rename to src/etc/roles/literal/searchRole.js diff --git a/src/etc/aria/literal/searchboxRole.js b/src/etc/roles/literal/searchboxRole.js similarity index 100% rename from src/etc/aria/literal/searchboxRole.js rename to src/etc/roles/literal/searchboxRole.js diff --git a/src/etc/aria/literal/separatorRole.js b/src/etc/roles/literal/separatorRole.js similarity index 100% rename from src/etc/aria/literal/separatorRole.js rename to src/etc/roles/literal/separatorRole.js diff --git a/src/etc/aria/literal/sliderRole.js b/src/etc/roles/literal/sliderRole.js similarity index 100% rename from src/etc/aria/literal/sliderRole.js rename to src/etc/roles/literal/sliderRole.js diff --git a/src/etc/aria/literal/spinbuttonRole.js b/src/etc/roles/literal/spinbuttonRole.js similarity index 100% rename from src/etc/aria/literal/spinbuttonRole.js rename to src/etc/roles/literal/spinbuttonRole.js diff --git a/src/etc/aria/literal/statusRole.js b/src/etc/roles/literal/statusRole.js similarity index 100% rename from src/etc/aria/literal/statusRole.js rename to src/etc/roles/literal/statusRole.js diff --git a/src/etc/aria/literal/switchRole.js b/src/etc/roles/literal/switchRole.js similarity index 100% rename from src/etc/aria/literal/switchRole.js rename to src/etc/roles/literal/switchRole.js diff --git a/src/etc/aria/literal/tabRole.js b/src/etc/roles/literal/tabRole.js similarity index 100% rename from src/etc/aria/literal/tabRole.js rename to src/etc/roles/literal/tabRole.js diff --git a/src/etc/aria/literal/tableRole.js b/src/etc/roles/literal/tableRole.js similarity index 100% rename from src/etc/aria/literal/tableRole.js rename to src/etc/roles/literal/tableRole.js diff --git a/src/etc/aria/literal/tablistRole.js b/src/etc/roles/literal/tablistRole.js similarity index 100% rename from src/etc/aria/literal/tablistRole.js rename to src/etc/roles/literal/tablistRole.js diff --git a/src/etc/aria/literal/tabpanelRole.js b/src/etc/roles/literal/tabpanelRole.js similarity index 100% rename from src/etc/aria/literal/tabpanelRole.js rename to src/etc/roles/literal/tabpanelRole.js diff --git a/src/etc/aria/literal/termRole.js b/src/etc/roles/literal/termRole.js similarity index 100% rename from src/etc/aria/literal/termRole.js rename to src/etc/roles/literal/termRole.js diff --git a/src/etc/aria/literal/textboxRole.js b/src/etc/roles/literal/textboxRole.js similarity index 100% rename from src/etc/aria/literal/textboxRole.js rename to src/etc/roles/literal/textboxRole.js diff --git a/src/etc/aria/literal/timerRole.js b/src/etc/roles/literal/timerRole.js similarity index 100% rename from src/etc/aria/literal/timerRole.js rename to src/etc/roles/literal/timerRole.js diff --git a/src/etc/aria/literal/toolbarRole.js b/src/etc/roles/literal/toolbarRole.js similarity index 100% rename from src/etc/aria/literal/toolbarRole.js rename to src/etc/roles/literal/toolbarRole.js diff --git a/src/etc/aria/literal/tooltipRole.js b/src/etc/roles/literal/tooltipRole.js similarity index 100% rename from src/etc/aria/literal/tooltipRole.js rename to src/etc/roles/literal/tooltipRole.js diff --git a/src/etc/aria/literal/treeRole.js b/src/etc/roles/literal/treeRole.js similarity index 100% rename from src/etc/aria/literal/treeRole.js rename to src/etc/roles/literal/treeRole.js diff --git a/src/etc/aria/literal/treegridRole.js b/src/etc/roles/literal/treegridRole.js similarity index 100% rename from src/etc/aria/literal/treegridRole.js rename to src/etc/roles/literal/treegridRole.js diff --git a/src/etc/aria/literal/treeitemRole.js b/src/etc/roles/literal/treeitemRole.js similarity index 100% rename from src/etc/aria/literal/treeitemRole.js rename to src/etc/roles/literal/treeitemRole.js From 1e6483f4a3b940ff0485a0febabec56549010356 Mon Sep 17 00:00:00 2001 From: Jesse Renee Beach Date: Thu, 2 Mar 2017 11:00:32 -0800 Subject: [PATCH 06/15] Remove the aria.json file and move the info into a module --- flow/{roles.js => aria.js} | 12 ++ src/ariaMap.js | 18 --- src/{etc/aria.json => ariaPropsMap.js} | 152 +++++++++++++------------ src/rolesMap.js | 6 +- 4 files changed, 95 insertions(+), 93 deletions(-) rename flow/{roles.js => aria.js} (72%) delete mode 100644 src/ariaMap.js rename src/{etc/aria.json => ariaPropsMap.js} (55%) diff --git a/flow/roles.js b/flow/aria.js similarity index 72% rename from flow/roles.js rename to flow/aria.js index 86f5174d..1ec6c9da 100644 --- a/flow/roles.js +++ b/flow/aria.js @@ -25,3 +25,15 @@ type RelationConceptAttribute = { name: string, value: string, }; + +type PropDefinition = { + type: 'string' + | 'integer' + | 'number' + | 'boolean' + | 'token' + | 'tokenlist' + | 'tristate', + value? : Array, + allowundefined?: boolean, +}; diff --git a/src/ariaMap.js b/src/ariaMap.js deleted file mode 100644 index 0d8c051a..00000000 --- a/src/ariaMap.js +++ /dev/null @@ -1,18 +0,0 @@ -/** - * @flow - */ - -import ariaJSON from './etc/aria.json'; - -type MapOfRoleDefinitions = Map; - -const ariaMap: MapOfRoleDefinitions = new Map([]); - -Object - .keys(ariaJSON) - .reduce( - (map, key) => map.set(key, (ariaJSON[key]: RoleDefinition)), - ariaMap, - ); - -export default ariaMap; diff --git a/src/etc/aria.json b/src/ariaPropsMap.js similarity index 55% rename from src/etc/aria.json rename to src/ariaPropsMap.js index da458054..248ac7da 100644 --- a/src/etc/aria.json +++ b/src/ariaPropsMap.js @@ -1,11 +1,17 @@ -{ - "aria-activedescendant": { +/** + * @flow + */ + +type MapOfPropDefinitions = Map; + +const ariaPropsMap: MapOfPropDefinitions = new Map([ + ["aria-activedescendant", { "type": "string" - }, - "aria-atomic": { + }], + ["aria-atomic", { "type": "boolean" - }, - "aria-autocomplete": { + }], + ["aria-autocomplete", { "type": "token", "values": [ "inline", @@ -13,23 +19,23 @@ "both", "none" ] - }, - "aria-busy": { + }], + ["aria-busy", { "type": "boolean" - }, - "aria-checked": { + }], + ["aria-checked", { "type": "tristate" - }, - "aria-controls": { + }], + ["aria-controls", { "type": "string" - }, - "aria-describedby": { + }], + ["aria-describedby", { "type": "string" - }, - "aria-disabled": { + }], + ["aria-disabled", { "type": "boolean" - }, - "aria-dropeffect": { + }], + ["aria-dropeffect", { "type": "tokenlist", "values": [ "copy", @@ -39,25 +45,25 @@ "popup", "none" ] - }, - "aria-expanded": { + }], + ["aria-expanded", { "type": "boolean", "allowundefined": true - }, - "aria-flowto": { + }], + ["aria-flowto", { "type": "string" - }, - "aria-grabbed": { + }], + ["aria-grabbed", { "type": "boolean", "allowundefined": true - }, - "aria-haspopup": { + }], + ["aria-haspopup", { "type": "boolean" - }, - "aria-hidden": { + }], + ["aria-hidden", { "type": "boolean" - }, - "aria-invalid": { + }], + ["aria-invalid", { "type": "token", "values": [ "grammar", @@ -65,50 +71,50 @@ "spelling", true ] - }, - "aria-label": { + }], + ["aria-label", { "type": "string" - }, - "aria-labelledby": { + }], + ["aria-labelledby", { "type": "string" - }, - "aria-level": { + }], + ["aria-level", { "type": "integer" - }, - "aria-live": { + }], + ["aria-live", { "type": "token", "values": [ "off", "polite", "assertive" ] - }, - "aria-multiline": { + }], + ["aria-multiline", { "type": "boolean" - }, - "aria-multiselectable": { + }], + ["aria-multiselectable", { "type": "boolean" - }, - "aria-orientation": { + }], + ["aria-orientation", { "type": "token", "values": [ "vertical", "horizontal" ] - }, - "aria-owns": { + }], + ["aria-owns", { "type": "string" - }, - "aria-posinset": { + }], + ["aria-posinset", { "type": "integer" - }, - "aria-pressed": { + }], + ["aria-pressed", { "type": "tristate" - }, - "aria-readonly": { + }], + ["aria-readonly", { "type": "boolean" - }, - "aria-relevant": { + }], + ["aria-relevant", { "type": "tokenlist", "values": [ "additions", @@ -116,18 +122,18 @@ "text", "all" ] - }, - "aria-required": { + }], + ["aria-required", { "type": "boolean" - }, - "aria-selected": { + }], + ["aria-selected", { "type": "boolean", "allowundefined": true - }, - "aria-setsize": { + }], + ["aria-setsize", { "type": "integer" - }, - "aria-sort": { + }], + ["aria-sort", { "type": "token", "values": [ "ascending", @@ -135,17 +141,19 @@ "none", "other" ] - }, - "aria-valuemax": { + }], + ["aria-valuemax", { "type": "number" - }, - "aria-valuemin": { + }], + ["aria-valuemin", { "type": "number" - }, - "aria-valuenow": { + }], + ["aria-valuenow", { "type": "number" - }, - "aria-valuetext": { + }], + ["aria-valuetext", { "type": "string" - } -} + }], +]); + +export default ariaPropsMap; diff --git a/src/rolesMap.js b/src/rolesMap.js index 52ccadbf..8a483120 100644 --- a/src/rolesMap.js +++ b/src/rolesMap.js @@ -2,9 +2,9 @@ * @flow */ -import ariaAbstractRoles from './etc/aria/ariaAbstractRoles'; -import ariaLiteralRoles from './etc/aria/ariaLiteralRoles'; -import ariaDpubRoles from './etc/aria/ariaDpubRoles'; +import ariaAbstractRoles from './etc/roles/ariaAbstractRoles'; +import ariaLiteralRoles from './etc/roles/ariaLiteralRoles'; +import ariaDpubRoles from './etc/roles/ariaDpubRoles'; type MapOfRoleDefinitions = Map; From b0f7fd2266ae9ff2ba96f7ef10dab973a2ebcccb Mon Sep 17 00:00:00 2001 From: Jesse Renee Beach Date: Sat, 4 Mar 2017 11:10:43 -0800 Subject: [PATCH 07/15] ariaMap to ariaPropsMap --- __tests__/src/ariaMap-test.js | 12 ------------ __tests__/src/ariaPropsMaps-test.js | 12 ++++++++++++ src/index.js | 4 ++-- 3 files changed, 14 insertions(+), 14 deletions(-) delete mode 100644 __tests__/src/ariaMap-test.js create mode 100644 __tests__/src/ariaPropsMaps-test.js diff --git a/__tests__/src/ariaMap-test.js b/__tests__/src/ariaMap-test.js deleted file mode 100644 index a8563b40..00000000 --- a/__tests__/src/ariaMap-test.js +++ /dev/null @@ -1,12 +0,0 @@ -/* eslint-env mocha */ -import expect from 'expect'; -import ariaMap from '../../src/ariaMap'; - -describe('ariaMap', function () { - it('should be a Map', function () { - expect(ariaMap).toBeA(Map); - }); - it('should have size', function () { - expect(ariaMap.size).toBeGreaterThan(0); - }); -}); diff --git a/__tests__/src/ariaPropsMaps-test.js b/__tests__/src/ariaPropsMaps-test.js new file mode 100644 index 00000000..1fa8a54b --- /dev/null +++ b/__tests__/src/ariaPropsMaps-test.js @@ -0,0 +1,12 @@ +/* eslint-env mocha */ +import expect from 'expect'; +import ariaPropsMap from '../../src/ariaPropsMap'; + +describe('ariaPropsMap', function () { + it('should be a Map', function () { + expect(ariaPropsMap).toBeA(Map); + }); + it('should have size', function () { + expect(ariaPropsMap.size).toBeGreaterThan(0); + }); +}); diff --git a/src/index.js b/src/index.js index e51155bb..f6524d64 100644 --- a/src/index.js +++ b/src/index.js @@ -1,10 +1,10 @@ -import ariaMap from './ariaMap'; +import ariaPropsMap from './ariaPropsMap'; import domMap from './domMap'; import rolesMap from './rolesMap'; import elementRoleMap from './elementRoleMap'; import roleElementMap from './roleElementMap'; -export const aria = ariaMap; +export const aria = ariaPropsMap; export const dom = domMap; export const roles = rolesMap; export const elementRoles = elementRoleMap; From 5827bf76694fbe19f44b630e84367098ab8b1c2b Mon Sep 17 00:00:00 2001 From: Jesse Renee Beach Date: Sat, 4 Mar 2017 11:12:01 -0800 Subject: [PATCH 08/15] Move aria.json to scripts --- scripts/breakUpAriaJSON.js | 4 ++-- {src/etc => scripts}/roles.json | 0 2 files changed, 2 insertions(+), 2 deletions(-) rename {src/etc => scripts}/roles.json (100%) diff --git a/scripts/breakUpAriaJSON.js b/scripts/breakUpAriaJSON.js index dcec8a73..51dc48f6 100644 --- a/scripts/breakUpAriaJSON.js +++ b/scripts/breakUpAriaJSON.js @@ -100,7 +100,7 @@ function triageValue(value, depth = 0) { return output; } -fs.readFile(path.join('src/etc/roles.json'), { +fs.readFile(path.join('./roles.json'), { encoding: 'utf8' }, (error, data) => { if (error) { @@ -253,7 +253,7 @@ function requiresCombiner(roles, depth) { const srcDir = 'src'; -fs.readFile(path.join('src/etc/roles.json'), { +fs.readFile(path.join('./roles.json'), { encoding: 'utf8' }, (error, data) => { if (error) { diff --git a/src/etc/roles.json b/scripts/roles.json similarity index 100% rename from src/etc/roles.json rename to scripts/roles.json From 5d6468176a5b62c9b23b97b581d064bb0de799b8 Mon Sep 17 00:00:00 2001 From: Jesse Renee Beach Date: Sat, 4 Mar 2017 11:45:25 -0800 Subject: [PATCH 09/15] Fix the breakUpAriaJson script --- scripts/breakUpAriaJSON.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/scripts/breakUpAriaJSON.js b/scripts/breakUpAriaJSON.js index 51dc48f6..88e27cfc 100644 --- a/scripts/breakUpAriaJSON.js +++ b/scripts/breakUpAriaJSON.js @@ -3,7 +3,7 @@ const fs = require('fs'); const path = require('path'); -const baseDir = 'src/etc/aria'; +const baseDir = 'src/etc/roles'; const literalRequires = []; const abstractRequires = []; @@ -100,7 +100,7 @@ function triageValue(value, depth = 0) { return output; } -fs.readFile(path.join('./roles.json'), { +fs.readFile(path.join('scripts/roles.json'), { encoding: 'utf8' }, (error, data) => { if (error) { @@ -133,7 +133,9 @@ fs.readFile(path.join('./roles.json'), { // Create a set of all the props of the super classes. let superClasses = aria[name]['superClass']; const accumulation = superClassWalker(superClasses); - return accumulatedSuperClasses.set(name, accumulation); + const output = accumulatedSuperClasses.set(name, accumulation); + // console.log(`${name} => ${accumulatedSuperClasses.get(name).map(group => `[${group}]`).join('\n')}`); + return output; }); Object.keys(aria) @@ -253,7 +255,7 @@ function requiresCombiner(roles, depth) { const srcDir = 'src'; -fs.readFile(path.join('./roles.json'), { +fs.readFile(path.join('scripts/roles.json'), { encoding: 'utf8' }, (error, data) => { if (error) { From 09124e2a4ea5306a2c6d48b07091fcbaca736f74 Mon Sep 17 00:00:00 2001 From: Jesse Renee Beach Date: Sat, 4 Mar 2017 12:02:16 -0800 Subject: [PATCH 10/15] Converted dom.json to domMap --- src/domMap.js | 399 ++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 389 insertions(+), 10 deletions(-) diff --git a/src/domMap.js b/src/domMap.js index 01c0b6be..d9071d0b 100644 --- a/src/domMap.js +++ b/src/domMap.js @@ -2,8 +2,6 @@ * @flow */ -import domJSON from './etc/dom.json'; - type DOMDefinition = { reserved?: boolean, interactive?: boolean, @@ -11,13 +9,394 @@ type DOMDefinition = { type MapOfDOMDefinitions = Map; -const domMap: MapOfDOMDefinitions = new Map([]); - -Object - .keys(domJSON) - .reduce( - (map, key) => map.set(key, (domJSON[key]: DOMDefinition)), - domMap, - ); +const domMap: MapOfDOMDefinitions = new Map([ + ['a', { + reserved: false, + }], + ['abbr', { + reserved: false, + }], + ['acronym', { + reserved: false, + }], + ['address', { + reserved: false, + }], + ['applet', { + reserved: false, + }], + ['area', { + reserved: false, + }], + ['article', { + reserved: false, + }], + ['aside', { + reserved: false, + }], + ['audio', { + reserved: false, + }], + ['b', { + reserved: false, + }], + ['base', { + reserved: true + }], + ['bdi', { + reserved: false, + }], + ['bdo', { + reserved: false, + }], + ['big', { + reserved: false, + }], + ['blink', { + reserved: false, + }], + ['blockquote', { + reserved: false, + }], + ['body', { + reserved: false, + }], + ['br', { + reserved: false, + }], + ['button', { + reserved: false, + }], + ['canvas', { + reserved: false, + }], + ['caption', { + reserved: false, + }], + ['center', { + reserved: false, + }], + ['cite', { + reserved: false, + }], + ['code', { + reserved: false, + }], + ['col', { + reserved: true + }], + ['colgroup', { + reserved: true + }], + ['content', { + reserved: false, + }], + ['data', { + reserved: false, + }], + ['datalist', { + reserved: false, + }], + ['dd', { + reserved: false, + }], + ['del', { + reserved: false, + }], + ['details', { + reserved: false, + }], + ['dfn', { + reserved: false, + }], + ['dialog', { + reserved: false, + }], + ['dir', { + reserved: false, + }], + ['div', { + reserved: false, + }], + ['dl', { + reserved: false, + }], + ['dt', { + reserved: false, + }], + ['em', { + reserved: false, + }], + ['embed', { + reserved: false, + }], + ['fieldset', { + reserved: false, + }], + ['figcaption', { + reserved: false, + }], + ['figure', { + reserved: false, + }], + ['font', { + reserved: false, + }], + ['footer', { + reserved: false, + }], + ['form', { + reserved: false, + }], + ['frame', { + reserved: false, + }], + ['frameset', { + reserved: false, + }], + ['h1', { + reserved: false, + }], + ['h2', { + reserved: false, + }], + ['h3', { + reserved: false, + }], + ['h4', { + reserved: false, + }], + ['h5', { + reserved: false, + }], + ['h6', { + reserved: false, + }], + ['head', { + reserved: true + }], + ['header', { + reserved: false, + }], + ['hgroup', { + reserved: false, + }], + ['hr', { + reserved: false, + }], + ['html', { + reserved: true + }], + ['i', { + reserved: false, + }], + ['iframe', { + reserved: false, + }], + ['img', { + reserved: false, + }], + ['input', { + reserved: false, + }], + ['ins', { + reserved: false, + }], + ['kbd', { + reserved: false, + }], + ['keygen', { + reserved: false, + }], + ['label', { + reserved: false, + }], + ['legend', { + reserved: false, + }], + ['li', { + reserved: false, + }], + ['link', { + reserved: true + }], + ['main', { + reserved: false, + }], + ['map', { + reserved: false, + }], + ['mark', { + reserved: false, + }], + ['marquee', { + reserved: false, + }], + ['menu', { + reserved: false, + }], + ['menuitem', { + reserved: false, + }], + ['meta', { + reserved: true + }], + ['meter', { + reserved: false, + }], + ['nav', { + reserved: false, + }], + ['noembed', { + reserved: true + }], + ['noscript', { + reserved: true + }], + ['object', { + reserved: false, + }], + ['ol', { + reserved: false, + }], + ['optgroup', { + reserved: false, + }], + ['option', { + reserved: false, + }], + ['output', { + reserved: false, + }], + ['p', { + reserved: false, + }], + ['param', { + reserved: true + }], + ['picture', { + reserved: true + }], + ['pre', { + reserved: false, + }], + ['progress', { + reserved: false, + }], + ['q', { + reserved: false, + }], + ['rp', { + reserved: false, + }], + ['rt', { + reserved: false, + }], + ['rtc', { + reserved: false, + }], + ['ruby', { + reserved: false, + }], + ['s', { + reserved: false, + }], + ['samp', { + reserved: false, + }], + ['script', { + reserved: true + }], + ['section', { + reserved: false, + }], + ['select', { + reserved: false, + }], + ['small', { + reserved: false, + }], + ['source', { + reserved: true + }], + ['spacer': { + reserved: false, + }], + ['span', { + reserved: false, + }], + ['strike', { + reserved: false, + }], + ['strong', { + reserved: false, + }], + ['style', { + reserved: true + }], + ['sub', { + reserved: false, + }], + ['summary', { + reserved: false, + }], + ['sup', { + reserved: false, + }], + ['table', { + reserved: false, + }], + ['tbody', { + reserved: false, + }], + ['td', { + reserved: false, + }], + ['textarea', { + reserved: false, + }], + ['tfoot', { + reserved: false, + }], + ['th', { + reserved: false, + }], + ['thead', { + reserved: false, + }], + ['time', { + reserved: false, + }], + ['title', { + reserved: true + }], + ['tr', { + reserved: false, + }], + ['track', { + reserved: true + }], + ['tt', { + reserved: false, + }], + ['u', { + reserved: false, + }], + ['ul', { + reserved: false, + }], + ['var', { + reserved: false, + }], + ['video', { + reserved: false, + }], + ['wbr', { + reserved: false, + }], + ['xmp', { + reserved: false, + }], +]); export default domMap; From b9fe6c4c1e0317c23a3aaa2f997dff999f3ef709 Mon Sep 17 00:00:00 2001 From: Jesse Renee Beach Date: Tue, 7 Mar 2017 12:42:32 -0800 Subject: [PATCH 11/15] Fixed an unexpected token warning in domMap.js --- src/domMap.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/domMap.js b/src/domMap.js index d9071d0b..3b7fe110 100644 --- a/src/domMap.js +++ b/src/domMap.js @@ -319,7 +319,7 @@ const domMap: MapOfDOMDefinitions = new Map([ ['source', { reserved: true }], - ['spacer': { + ['spacer', { reserved: false, }], ['span', { From f73a500354f5f40658990fe932c491de45d0b849 Mon Sep 17 00:00:00 2001 From: Jesse Renee Beach Date: Tue, 7 Mar 2017 16:08:43 -0800 Subject: [PATCH 12/15] Fix the failing Travis run by removing a glob expansion that it apparently cannot handle --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 21aef781..4800f434 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "lib" ], "scripts": { - "build": "rimraf lib && babel src --out-dir lib && cp -R src/etc/{dom,aria}.json lib/etc", + "build": "rimraf lib && babel src --out-dir lib", "prepublish": "npm run lint && npm run flow && npm run test && npm run build", "coveralls": "cat ./reports/lcov.info | coveralls", "flow": "flow; test $? -eq 0 -o $? -eq 2", From f25dcbc0b3aa4b16e0f6fc47aef3f0cb6c4cb1cf Mon Sep 17 00:00:00 2001 From: Jesse Renee Beach Date: Thu, 9 Mar 2017 21:58:13 -0800 Subject: [PATCH 13/15] Found a stray uppercase aria prop value in the json. --- scripts/roles.json | 2 +- src/etc/roles/literal/scrollbarRole.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/roles.json b/scripts/roles.json index 04243dad..13978206 100644 --- a/scripts/roles.json +++ b/scripts/roles.json @@ -3949,7 +3949,7 @@ "requireContextRole": [], "requiredOwnedElements": [], "requiredProps": [ - "ARIA-CONTROLS", + "aria-controls", "aria-orientation", "aria-valuemax", "aria-valuemin", diff --git a/src/etc/roles/literal/scrollbarRole.js b/src/etc/roles/literal/scrollbarRole.js index dc847f50..3c85d4b4 100644 --- a/src/etc/roles/literal/scrollbarRole.js +++ b/src/etc/roles/literal/scrollbarRole.js @@ -36,7 +36,7 @@ const scrollbarRole: RoleDefinition = { requireContextRole: [], requiredOwnedElements: [], requiredProps: { - 'ARIA-CONTROLS': null, + 'aria-controls': null, 'aria-orientation': null, 'aria-valuemax': null, 'aria-valuemin': null, From 5ba13f6ce7c9bde72672d7f05a5daec32685c370 Mon Sep 17 00:00:00 2001 From: Jesse Renee Beach Date: Thu, 9 Mar 2017 23:57:18 -0800 Subject: [PATCH 14/15] Conglomerate the role properties on each role definition --- flow/aria.js | 1 + src/rolesMap.js | 27 ++++++++++++++++++++++++--- 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/flow/aria.js b/flow/aria.js index 1ec6c9da..81dbbd6b 100644 --- a/flow/aria.js +++ b/flow/aria.js @@ -9,6 +9,7 @@ type RoleDefinition = { props: {[key: string]: mixed}, relatedConcepts: Array, requiredProps: {[key: string]: mixed}, + superClass: Array>, }; type RoleRelation = { diff --git a/src/rolesMap.js b/src/rolesMap.js index 8a483120..741081e2 100644 --- a/src/rolesMap.js +++ b/src/rolesMap.js @@ -16,10 +16,31 @@ const rolesMap: MapOfRoleDefinitions = new Map([]); ].forEach(roleSet => { roleSet.forEach( ( - value: RoleDefinition, - key: string - ) => rolesMap.set(key, value) + roleDefinition: RoleDefinition, + name: string + ) => rolesMap.set(name, roleDefinition) ); }); +rolesMap.forEach((roleDefinition: RoleDefinition, name: string) => { + // Conglomerate the properties + for (let superClassIter of roleDefinition.superClass) { + for (let superClassName of superClassIter) { + const superClassDefinition = rolesMap.get(superClassName); + if (superClassDefinition) { + for (let prop of Object.keys(superClassDefinition.props)) { + if ( + !Object.prototype.hasOwnProperty.call(roleDefinition.props, prop) + ) { + Object.assign( + roleDefinition.props, + {[prop]: superClassDefinition.props[prop]}, + ); + } + } + } + } + } +}); + export default rolesMap; From 462091efd5088b0be3d2d0d55833462ea4751983 Mon Sep 17 00:00:00 2001 From: Jesse Renee Beach Date: Fri, 10 Mar 2017 16:01:50 -0800 Subject: [PATCH 15/15] Narrow the Flow type definitions for ARIA --- flow/aria.js | 305 ++++++++++++++++-- scripts/breakUpAriaJSON.js | 2 +- src/ariaPropsMap.js | 218 ++++++------- src/elementRoleMap.js | 16 +- src/etc/roles/abstract/commandRole.js | 2 +- src/etc/roles/abstract/compositeRole.js | 2 +- src/etc/roles/abstract/inputRole.js | 2 +- src/etc/roles/abstract/landmarkRole.js | 2 +- src/etc/roles/abstract/rangeRole.js | 2 +- src/etc/roles/abstract/roletypeRole.js | 2 +- src/etc/roles/abstract/sectionRole.js | 2 +- src/etc/roles/abstract/sectionheadRole.js | 2 +- src/etc/roles/abstract/selectRole.js | 2 +- src/etc/roles/abstract/structureRole.js | 2 +- src/etc/roles/abstract/widgetRole.js | 2 +- src/etc/roles/abstract/windowRole.js | 2 +- src/etc/roles/dpub/docAbstractRole.js | 2 +- src/etc/roles/dpub/docAcknowledgmentsRole.js | 2 +- src/etc/roles/dpub/docAfterwordRole.js | 2 +- src/etc/roles/dpub/docAppendixRole.js | 2 +- src/etc/roles/dpub/docBacklinkRole.js | 2 +- src/etc/roles/dpub/docBiblioentryRole.js | 2 +- src/etc/roles/dpub/docBibliographyRole.js | 2 +- src/etc/roles/dpub/docBibliorefRole.js | 2 +- src/etc/roles/dpub/docChapterRole.js | 2 +- src/etc/roles/dpub/docColophonRole.js | 2 +- src/etc/roles/dpub/docConclusionRole.js | 2 +- src/etc/roles/dpub/docCoverRole.js | 2 +- src/etc/roles/dpub/docCreditRole.js | 2 +- src/etc/roles/dpub/docCreditsRole.js | 2 +- src/etc/roles/dpub/docDedicationRole.js | 2 +- src/etc/roles/dpub/docEndnoteRole.js | 2 +- src/etc/roles/dpub/docEndnotesRole.js | 2 +- src/etc/roles/dpub/docEpigraphRole.js | 2 +- src/etc/roles/dpub/docEpilogueRole.js | 2 +- src/etc/roles/dpub/docErrataRole.js | 2 +- src/etc/roles/dpub/docExampleRole.js | 2 +- src/etc/roles/dpub/docFootnoteRole.js | 2 +- src/etc/roles/dpub/docForewordRole.js | 2 +- src/etc/roles/dpub/docGlossaryRole.js | 2 +- src/etc/roles/dpub/docGlossrefRole.js | 2 +- src/etc/roles/dpub/docIndexRole.js | 2 +- src/etc/roles/dpub/docIntroductionRole.js | 2 +- src/etc/roles/dpub/docNoterefRole.js | 2 +- src/etc/roles/dpub/docNoticeRole.js | 2 +- src/etc/roles/dpub/docPagebreakRole.js | 2 +- src/etc/roles/dpub/docPagelistRole.js | 2 +- src/etc/roles/dpub/docPartRole.js | 2 +- src/etc/roles/dpub/docPrefaceRole.js | 2 +- src/etc/roles/dpub/docPrologueRole.js | 2 +- src/etc/roles/dpub/docPullquoteRole.js | 2 +- src/etc/roles/dpub/docQnaRole.js | 2 +- src/etc/roles/dpub/docSubtitleRole.js | 2 +- src/etc/roles/dpub/docTipRole.js | 2 +- src/etc/roles/dpub/docTocRole.js | 2 +- src/etc/roles/literal/alertRole.js | 2 +- src/etc/roles/literal/alertdialogRole.js | 2 +- src/etc/roles/literal/applicationRole.js | 2 +- src/etc/roles/literal/articleRole.js | 2 +- src/etc/roles/literal/bannerRole.js | 2 +- src/etc/roles/literal/buttonRole.js | 2 +- src/etc/roles/literal/cellRole.js | 2 +- src/etc/roles/literal/checkboxRole.js | 2 +- src/etc/roles/literal/columnheaderRole.js | 2 +- src/etc/roles/literal/comboboxRole.js | 2 +- src/etc/roles/literal/complementaryRole.js | 2 +- src/etc/roles/literal/contentinfoRole.js | 2 +- src/etc/roles/literal/definitionRole.js | 2 +- src/etc/roles/literal/dialogRole.js | 2 +- src/etc/roles/literal/directoryRole.js | 2 +- src/etc/roles/literal/documentRole.js | 2 +- src/etc/roles/literal/feedRole.js | 2 +- src/etc/roles/literal/figureRole.js | 2 +- src/etc/roles/literal/formRole.js | 2 +- src/etc/roles/literal/gridRole.js | 2 +- src/etc/roles/literal/gridcellRole.js | 2 +- src/etc/roles/literal/groupRole.js | 2 +- src/etc/roles/literal/headingRole.js | 2 +- src/etc/roles/literal/imgRole.js | 2 +- src/etc/roles/literal/linkRole.js | 2 +- src/etc/roles/literal/listRole.js | 2 +- src/etc/roles/literal/listboxRole.js | 2 +- src/etc/roles/literal/listitemRole.js | 2 +- src/etc/roles/literal/logRole.js | 2 +- src/etc/roles/literal/mainRole.js | 2 +- src/etc/roles/literal/marqueeRole.js | 2 +- src/etc/roles/literal/mathRole.js | 2 +- src/etc/roles/literal/menuRole.js | 2 +- src/etc/roles/literal/menubarRole.js | 2 +- src/etc/roles/literal/menuitemRole.js | 2 +- src/etc/roles/literal/menuitemcheckboxRole.js | 2 +- src/etc/roles/literal/menuitemradioRole.js | 2 +- src/etc/roles/literal/navigationRole.js | 2 +- src/etc/roles/literal/noneRole.js | 2 +- src/etc/roles/literal/noteRole.js | 2 +- src/etc/roles/literal/optionRole.js | 2 +- src/etc/roles/literal/presentationRole.js | 2 +- src/etc/roles/literal/progressbarRole.js | 2 +- src/etc/roles/literal/radioRole.js | 2 +- src/etc/roles/literal/radiogroupRole.js | 2 +- src/etc/roles/literal/regionRole.js | 2 +- src/etc/roles/literal/rowRole.js | 2 +- src/etc/roles/literal/rowgroupRole.js | 2 +- src/etc/roles/literal/rowheaderRole.js | 2 +- src/etc/roles/literal/scrollbarRole.js | 2 +- src/etc/roles/literal/searchRole.js | 2 +- src/etc/roles/literal/searchboxRole.js | 2 +- src/etc/roles/literal/separatorRole.js | 2 +- src/etc/roles/literal/sliderRole.js | 2 +- src/etc/roles/literal/spinbuttonRole.js | 2 +- src/etc/roles/literal/statusRole.js | 2 +- src/etc/roles/literal/switchRole.js | 2 +- src/etc/roles/literal/tabRole.js | 2 +- src/etc/roles/literal/tableRole.js | 2 +- src/etc/roles/literal/tablistRole.js | 2 +- src/etc/roles/literal/tabpanelRole.js | 2 +- src/etc/roles/literal/termRole.js | 2 +- src/etc/roles/literal/textboxRole.js | 2 +- src/etc/roles/literal/timerRole.js | 2 +- src/etc/roles/literal/toolbarRole.js | 2 +- src/etc/roles/literal/tooltipRole.js | 2 +- src/etc/roles/literal/treeRole.js | 2 +- src/etc/roles/literal/treegridRole.js | 2 +- src/etc/roles/literal/treeitemRole.js | 2 +- src/index.js | 6 + src/roleElementMap.js | 9 +- src/rolesMap.js | 12 +- 127 files changed, 545 insertions(+), 263 deletions(-) diff --git a/flow/aria.js b/flow/aria.js index 81dbbd6b..b89e1c7c 100644 --- a/flow/aria.js +++ b/flow/aria.js @@ -2,32 +2,272 @@ * @flow */ -type RoleDefinition = { +type ARIAAbstractRole = + 'command' + | 'composite' + | 'input' + | 'landmark' + | 'range' + | 'roletype' + | 'section' + | 'sectionhead' + | 'select' + | 'structure' + | 'widget' + | 'window'; + +type ARIAWidgetRole = + 'alert' + | 'alertdialog' + | 'button' + | 'checkbox' + | 'dialog' + | 'gridcell' + | 'link' + | 'log' + | 'marquee' + | 'menuitem' + | 'menuitemcheckbox' + | 'menuitemradio' + | 'option' + | 'progressbar' + | 'radio' + | 'scrollbar' + | 'searchbox' + | 'slider' + | 'spinbutton' + | 'status' + | 'switch' + | 'tab' + | 'tabpanel' + | 'textbox' + | 'timer' + | 'tooltip' + | 'treeitem'; + +type ARIACompositeWidgetRole = + 'combobox' + | 'grid' + | 'listbox' + | 'menu' + | 'menubar' + | 'radiogroup' + | 'tablist' + | 'tree' + | 'treegrid'; + +type ARIADocumentStructureRole = + 'article' + | 'cell' + | 'columnheader' + | 'definition' + | 'directory' + | 'document' + | 'feed' + | 'figure' + | 'group' + | 'heading' + | 'img' + | 'list' + | 'listitem' + | 'math' + | 'none' + | 'note' + | 'presentation' + | 'region' + | 'row' + | 'rowgroup' + | 'rowheader' + | 'separator' + | 'table' + | 'term' + | 'toolbar'; + +type ARIALandmarkRole = + 'application' + | 'banner' + | 'complementary' + | 'contentinfo' + | 'form' + | 'main' + | 'navigation' + | 'search'; + +type ARIADPubRole = + | 'doc-abstract' + | 'doc-acknowledgments' + | 'doc-afterword' + | 'doc-appendix' + | 'doc-backlink' + | 'doc-biblioentry' + | 'doc-bibliography' + | 'doc-biblioref' + | 'doc-chapter' + | 'doc-colophon' + | 'doc-conclusion' + | 'doc-cover' + | 'doc-credit' + | 'doc-credits' + | 'doc-dedication' + | 'doc-endnote' + | 'doc-endnotes' + | 'doc-epigraph' + | 'doc-epilogue' + | 'doc-errata' + | 'doc-example' + | 'doc-footnote' + | 'doc-foreword' + | 'doc-glossary' + | 'doc-glossref' + | 'doc-index' + | 'doc-introduction' + | 'doc-noteref' + | 'doc-notice' + | 'doc-pagebreak' + | 'doc-pagelist' + | 'doc-part' + | 'doc-preface' + | 'doc-prologue' + | 'doc-pullquote' + | 'doc-qna' + | 'doc-subtitle' + | 'doc-tip' + | 'doc-toc'; + +type ARIARole = + ARIAWidgetRole + | ARIACompositeWidgetRole + | ARIADocumentStructureRole + | ARIALandmarkRole; + +type ARIARoleDefinition = { + /* Abstract roles may not be used in HTML. */ abstract: boolean, - baseConcepts: Array, + /* The concepts in related domains that inform behavior mappings. */ + baseConcepts: Array, + /* Child presentational roles strip child nodes of roles and flatten the + * content to text. */ childrenPresentational: boolean, - props: {[key: string]: mixed}, - relatedConcepts: Array, - requiredProps: {[key: string]: mixed}, - superClass: Array>, + /* aria-* properties and states allowed on this role. */ + props: ARIAPropertyMap, + /* The concepts in related domains that inform behavior mappings. */ + relatedConcepts: Array, + /* aria-* properties and states required on this role. */ + requiredProps: ARIAPropertyMap, + /* An array or super class "stacks." Each stack contains a LIFO list of + * strings correspond to a super class in the inheritance chain of this + * role. Roles may have more than one inheritance chain, which is why + * this property is an array of arrays and not a single array. */ + superClass: Array>, }; -type RoleRelation = { - module?: string, - concept?: RelationConcept, -}; +type ARIAState = + 'aria-busy' + | 'aria-checked' + | 'aria-disabled' + | 'aria-expanded' + | 'aria-grabbed' + | 'aria-hidden' + | 'aria-invalid' + | 'aria-pressed' + | 'aria-selected'; -type RelationConcept = { - name: string, - attributes?: Array, -}; +type ARIAProperty = + 'aria-activedescendant' + | 'aria-atomic' + | 'aria-autocomplete' + | 'aria-colcount' + | 'aria-colindex' + | 'aria-colspan' + | 'aria-controls' + | 'aria-current' + | 'aria-describedat' + | 'aria-describedby' + | 'aria-details' + | 'aria-dropeffect' + | 'aria-errormessage' + | 'aria-flowto' + | 'aria-haspopup' + | 'aria-keyshortcuts' + | 'aria-label' + | 'aria-labelledby' + | 'aria-level' + | 'aria-live' + | 'aria-modal' + | 'aria-multiline' + | 'aria-multiselectable' + | 'aria-orientation' + | 'aria-owns' + | 'aria-placeholder' + | 'aria-posinset' + | 'aria-readonly' + | 'aria-relevant' + | 'aria-required' + | 'aria-roledescription' + | 'aria-rowcount' + | 'aria-rowindex' + | 'aria-rowspan' + | 'aria-setsize' + | 'aria-sort' + | 'aria-valuemax' + | 'aria-valuemin' + | 'aria-valuenow' + | 'aria-valuetext' + | ARIAState; -type RelationConceptAttribute = { - name: string, - value: string, +type ARIAPropertyMap = { + 'aria-busy'?: mixed, + 'aria-checked'?: mixed, + 'aria-disabled'?: mixed, + 'aria-expanded'?: mixed, + 'aria-grabbed'?: mixed, + 'aria-hidden'?: mixed, + 'aria-invalid'?: mixed, + 'aria-pressed'?: mixed, + 'aria-selected'?: mixed, + 'aria-activedescendant'?: mixed, + 'aria-atomic'?: mixed, + 'aria-autocomplete'?: mixed, + 'aria-colcount'?: mixed, + 'aria-colindex'?: mixed, + 'aria-colspan'?: mixed, + 'aria-controls'?: mixed, + 'aria-current'?: ?ARIAPropertyCurrent, + 'aria-describedat'?: mixed, + 'aria-describedby'?: mixed, + 'aria-details'?: mixed, + 'aria-dropeffect'?: mixed, + 'aria-errormessage'?: mixed, + 'aria-flowto'?: mixed, + 'aria-haspopup'?: mixed, + 'aria-keyshortcuts'?: mixed, + 'aria-label'?: mixed, + 'aria-labelledby'?: mixed, + 'aria-level'?: mixed, + 'aria-live'?: mixed, + 'aria-modal'?: mixed, + 'aria-multiline'?: mixed, + 'aria-multiselectable'?: mixed, + 'aria-orientation'?: mixed, + 'aria-owns'?: mixed, + 'aria-placeholder'?: mixed, + 'aria-posinset'?: mixed, + 'aria-readonly'?: mixed, + 'aria-relevant'?: mixed, + 'aria-required'?: mixed, + 'aria-roledescription'?: mixed, + 'aria-rowcount'?: mixed, + 'aria-rowindex'?: mixed, + 'aria-rowspan'?: mixed, + 'aria-setsize'?: mixed, + 'aria-sort'?: mixed, + 'aria-valuemax'?: mixed, + 'aria-valuemin'?: mixed, + 'aria-valuenow'?: mixed, + 'aria-valuetext'?: mixed, }; -type PropDefinition = { +type ARIAPropertyDefinition = { type: 'string' | 'integer' | 'number' @@ -38,3 +278,32 @@ type PropDefinition = { value? : Array, allowundefined?: boolean, }; + +type ARIAPropertyCurrent = + 'page' + | 'step' + | 'location' + | 'date' + | 'time' + | 'true' + | 'false' + | true + | false; + +type ARIARoleRelation = { + module?: string, + concept?: ARIARelationConcept, +}; + +/* The concept in a related domain that informs behavior mappings. + * Related domains include: HTML, "Device Independence Delivery Unit", XForms, + * and ARIA to name a few. */ +type ARIARelationConcept = { + name: string, + attributes?: Array, +}; + +type ARIARelationConceptAttribute = { + name: string, + value: string, +}; diff --git a/scripts/breakUpAriaJSON.js b/scripts/breakUpAriaJSON.js index 88e27cfc..61517189 100644 --- a/scripts/breakUpAriaJSON.js +++ b/scripts/breakUpAriaJSON.js @@ -146,7 +146,7 @@ fs.readFile(path.join('scripts/roles.json'), { '/**', ' * @flow', ' */', - `const ${camelName}: RoleDefinition = {`, + `const ${camelName}: ARIARoleDefinition = {`, Object.keys(aria[name]) .sort() .filter((prop) => !['interactive'].includes(prop)) diff --git a/src/ariaPropsMap.js b/src/ariaPropsMap.js index 248ac7da..b7b9d47a 100644 --- a/src/ariaPropsMap.js +++ b/src/ariaPropsMap.js @@ -2,157 +2,157 @@ * @flow */ -type MapOfPropDefinitions = Map; +type MapOfARIAPropertyDefinitions = Map; -const ariaPropsMap: MapOfPropDefinitions = new Map([ - ["aria-activedescendant", { - "type": "string" - }], - ["aria-atomic", { - "type": "boolean" - }], - ["aria-autocomplete", { - "type": "token", - "values": [ - "inline", - "list", - "both", - "none" +const ariaPropsMap: MapOfARIAPropertyDefinitions = new Map([ + ['aria-activedescendant', { + 'type': 'string' + }], + ['aria-atomic', { + 'type': 'boolean' + }], + ['aria-autocomplete', { + 'type': 'token', + 'values': [ + 'inline', + 'list', + 'both', + 'none' ] }], - ["aria-busy", { - "type": "boolean" + ['aria-busy', { + 'type': 'boolean' }], - ["aria-checked", { - "type": "tristate" + ['aria-checked', { + 'type': 'tristate' }], - ["aria-controls", { - "type": "string" + ['aria-controls', { + 'type': 'string' }], - ["aria-describedby", { - "type": "string" + ['aria-describedby', { + 'type': 'string' }], - ["aria-disabled", { - "type": "boolean" + ['aria-disabled', { + 'type': 'boolean' }], - ["aria-dropeffect", { - "type": "tokenlist", - "values": [ - "copy", - "move", - "link", - "execute", - "popup", - "none" + ['aria-dropeffect', { + 'type': 'tokenlist', + 'values': [ + 'copy', + 'move', + 'link', + 'execute', + 'popup', + 'none' ] }], - ["aria-expanded", { - "type": "boolean", - "allowundefined": true + ['aria-expanded', { + 'type': 'boolean', + 'allowundefined': true }], - ["aria-flowto", { - "type": "string" + ['aria-flowto', { + 'type': 'string' }], - ["aria-grabbed", { - "type": "boolean", - "allowundefined": true + ['aria-grabbed', { + 'type': 'boolean', + 'allowundefined': true }], - ["aria-haspopup", { - "type": "boolean" + ['aria-haspopup', { + 'type': 'boolean' }], - ["aria-hidden", { - "type": "boolean" + ['aria-hidden', { + 'type': 'boolean' }], - ["aria-invalid", { - "type": "token", - "values": [ - "grammar", + ['aria-invalid', { + 'type': 'token', + 'values': [ + 'grammar', false, - "spelling", + 'spelling', true ] }], - ["aria-label", { - "type": "string" + ['aria-label', { + 'type': 'string' }], - ["aria-labelledby", { - "type": "string" + ['aria-labelledby', { + 'type': 'string' }], - ["aria-level", { - "type": "integer" + ['aria-level', { + 'type': 'integer' }], - ["aria-live", { - "type": "token", - "values": [ - "off", - "polite", - "assertive" + ['aria-live', { + 'type': 'token', + 'values': [ + 'off', + 'polite', + 'assertive' ] }], - ["aria-multiline", { - "type": "boolean" + ['aria-multiline', { + 'type': 'boolean' }], - ["aria-multiselectable", { - "type": "boolean" + ['aria-multiselectable', { + 'type': 'boolean' }], - ["aria-orientation", { - "type": "token", - "values": [ - "vertical", - "horizontal" + ['aria-orientation', { + 'type': 'token', + 'values': [ + 'vertical', + 'horizontal' ] }], - ["aria-owns", { - "type": "string" + ['aria-owns', { + 'type': 'string' }], - ["aria-posinset", { - "type": "integer" + ['aria-posinset', { + 'type': 'integer' }], - ["aria-pressed", { - "type": "tristate" + ['aria-pressed', { + 'type': 'tristate' }], - ["aria-readonly", { - "type": "boolean" + ['aria-readonly', { + 'type': 'boolean' }], - ["aria-relevant", { - "type": "tokenlist", - "values": [ - "additions", - "removals", - "text", - "all" + ['aria-relevant', { + 'type': 'tokenlist', + 'values': [ + 'additions', + 'removals', + 'text', + 'all' ] }], - ["aria-required", { - "type": "boolean" + ['aria-required', { + 'type': 'boolean' }], - ["aria-selected", { - "type": "boolean", - "allowundefined": true + ['aria-selected', { + 'type': 'boolean', + 'allowundefined': true }], - ["aria-setsize", { - "type": "integer" + ['aria-setsize', { + 'type': 'integer' }], - ["aria-sort", { - "type": "token", - "values": [ - "ascending", - "descending", - "none", - "other" + ['aria-sort', { + 'type': 'token', + 'values': [ + 'ascending', + 'descending', + 'none', + 'other' ] }], - ["aria-valuemax", { - "type": "number" + ['aria-valuemax', { + 'type': 'number' }], - ["aria-valuemin", { - "type": "number" + ['aria-valuemin', { + 'type': 'number' }], - ["aria-valuenow", { - "type": "number" + ['aria-valuenow', { + 'type': 'number' }], - ["aria-valuetext", { - "type": "string" + ['aria-valuetext', { + 'type': 'string' }], ]); diff --git a/src/elementRoleMap.js b/src/elementRoleMap.js index 3ad474b6..6f653d55 100644 --- a/src/elementRoleMap.js +++ b/src/elementRoleMap.js @@ -3,16 +3,17 @@ */ import rolesMap from './rolesMap'; +import type { ARIARoleDefintionKey } from './index'; -type RoleSet = Set; +type RoleSet = Set; -type ElementRoleRelationMap = Map; +type ElementARIARoleRelationMap = Map; -const elementRoleMap: ElementRoleRelationMap = new Map([]); +const elementRoleMap: ElementARIARoleRelationMap = new Map([]); [...rolesMap.keys()] .forEach(( - key: string, + key: ARIARoleDefintionKey, ): void => { const role = rolesMap.get(key); if (role) { @@ -21,7 +22,7 @@ const elementRoleMap: ElementRoleRelationMap = new Map([]); ...role.relatedConcepts, ] .forEach(( - relation: RoleRelation, + relation: ARIARoleRelation, ): void => { if (relation.module === 'HTML') { const concept = relation.concept; @@ -29,8 +30,9 @@ const elementRoleMap: ElementRoleRelationMap = new Map([]); const conceptStr = JSON.stringify(concept); let roles: ?RoleSet = ([...elementRoleMap.entries()] - .find(([key, value]) => JSON.stringify(key) === conceptStr) - || [])[1]; + .find( + ([key, value]) => JSON.stringify(key) === conceptStr)|| [] + )[1]; if (!roles) { roles = new Set([]); diff --git a/src/etc/roles/abstract/commandRole.js b/src/etc/roles/abstract/commandRole.js index 4d002794..2a922769 100644 --- a/src/etc/roles/abstract/commandRole.js +++ b/src/etc/roles/abstract/commandRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const commandRole: RoleDefinition = { +const commandRole: ARIARoleDefinition = { abstract: true, accessibleNameRequired: false, baseConcepts: [], diff --git a/src/etc/roles/abstract/compositeRole.js b/src/etc/roles/abstract/compositeRole.js index d4847276..82d81bd6 100644 --- a/src/etc/roles/abstract/compositeRole.js +++ b/src/etc/roles/abstract/compositeRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const compositeRole: RoleDefinition = { +const compositeRole: ARIARoleDefinition = { abstract: true, accessibleNameRequired: false, baseConcepts: [], diff --git a/src/etc/roles/abstract/inputRole.js b/src/etc/roles/abstract/inputRole.js index 706a82f9..90a54258 100644 --- a/src/etc/roles/abstract/inputRole.js +++ b/src/etc/roles/abstract/inputRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const inputRole: RoleDefinition = { +const inputRole: ARIARoleDefinition = { abstract: true, accessibleNameRequired: false, baseConcepts: [], diff --git a/src/etc/roles/abstract/landmarkRole.js b/src/etc/roles/abstract/landmarkRole.js index a1f7c04e..30bfdabd 100644 --- a/src/etc/roles/abstract/landmarkRole.js +++ b/src/etc/roles/abstract/landmarkRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const landmarkRole: RoleDefinition = { +const landmarkRole: ARIARoleDefinition = { abstract: true, accessibleNameRequired: false, baseConcepts: [], diff --git a/src/etc/roles/abstract/rangeRole.js b/src/etc/roles/abstract/rangeRole.js index 52f37be7..a9e702d4 100644 --- a/src/etc/roles/abstract/rangeRole.js +++ b/src/etc/roles/abstract/rangeRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const rangeRole: RoleDefinition = { +const rangeRole: ARIARoleDefinition = { abstract: true, accessibleNameRequired: false, baseConcepts: [], diff --git a/src/etc/roles/abstract/roletypeRole.js b/src/etc/roles/abstract/roletypeRole.js index 91dec6b7..f024ecaa 100644 --- a/src/etc/roles/abstract/roletypeRole.js +++ b/src/etc/roles/abstract/roletypeRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const roletypeRole: RoleDefinition = { +const roletypeRole: ARIARoleDefinition = { abstract: true, accessibleNameRequired: false, baseConcepts: [], diff --git a/src/etc/roles/abstract/sectionRole.js b/src/etc/roles/abstract/sectionRole.js index 37cff1b6..6b544617 100644 --- a/src/etc/roles/abstract/sectionRole.js +++ b/src/etc/roles/abstract/sectionRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const sectionRole: RoleDefinition = { +const sectionRole: ARIARoleDefinition = { abstract: true, accessibleNameRequired: false, baseConcepts: [], diff --git a/src/etc/roles/abstract/sectionheadRole.js b/src/etc/roles/abstract/sectionheadRole.js index a23d3344..7281a212 100644 --- a/src/etc/roles/abstract/sectionheadRole.js +++ b/src/etc/roles/abstract/sectionheadRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const sectionheadRole: RoleDefinition = { +const sectionheadRole: ARIARoleDefinition = { abstract: true, accessibleNameRequired: false, baseConcepts: [], diff --git a/src/etc/roles/abstract/selectRole.js b/src/etc/roles/abstract/selectRole.js index 735fc1b5..fa2bcd45 100644 --- a/src/etc/roles/abstract/selectRole.js +++ b/src/etc/roles/abstract/selectRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const selectRole: RoleDefinition = { +const selectRole: ARIARoleDefinition = { abstract: true, accessibleNameRequired: false, baseConcepts: [], diff --git a/src/etc/roles/abstract/structureRole.js b/src/etc/roles/abstract/structureRole.js index b640c199..275a830c 100644 --- a/src/etc/roles/abstract/structureRole.js +++ b/src/etc/roles/abstract/structureRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const structureRole: RoleDefinition = { +const structureRole: ARIARoleDefinition = { abstract: true, accessibleNameRequired: false, baseConcepts: [], diff --git a/src/etc/roles/abstract/widgetRole.js b/src/etc/roles/abstract/widgetRole.js index 3c5527b0..ae51377d 100644 --- a/src/etc/roles/abstract/widgetRole.js +++ b/src/etc/roles/abstract/widgetRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const widgetRole: RoleDefinition = { +const widgetRole: ARIARoleDefinition = { abstract: true, accessibleNameRequired: false, baseConcepts: [], diff --git a/src/etc/roles/abstract/windowRole.js b/src/etc/roles/abstract/windowRole.js index af2d34ff..5bba3378 100644 --- a/src/etc/roles/abstract/windowRole.js +++ b/src/etc/roles/abstract/windowRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const windowRole: RoleDefinition = { +const windowRole: ARIARoleDefinition = { abstract: true, accessibleNameRequired: false, baseConcepts: [], diff --git a/src/etc/roles/dpub/docAbstractRole.js b/src/etc/roles/dpub/docAbstractRole.js index 85dde25c..9f3c9619 100644 --- a/src/etc/roles/dpub/docAbstractRole.js +++ b/src/etc/roles/dpub/docAbstractRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const docAbstractRole: RoleDefinition = { +const docAbstractRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: false, baseConcepts: [], diff --git a/src/etc/roles/dpub/docAcknowledgmentsRole.js b/src/etc/roles/dpub/docAcknowledgmentsRole.js index a7c1a319..d4e16e66 100644 --- a/src/etc/roles/dpub/docAcknowledgmentsRole.js +++ b/src/etc/roles/dpub/docAcknowledgmentsRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const docAcknowledgmentsRole: RoleDefinition = { +const docAcknowledgmentsRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: false, baseConcepts: [], diff --git a/src/etc/roles/dpub/docAfterwordRole.js b/src/etc/roles/dpub/docAfterwordRole.js index c5737744..0b2f67a6 100644 --- a/src/etc/roles/dpub/docAfterwordRole.js +++ b/src/etc/roles/dpub/docAfterwordRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const docAfterwordRole: RoleDefinition = { +const docAfterwordRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: false, baseConcepts: [], diff --git a/src/etc/roles/dpub/docAppendixRole.js b/src/etc/roles/dpub/docAppendixRole.js index 9a65b58a..918cd1dd 100644 --- a/src/etc/roles/dpub/docAppendixRole.js +++ b/src/etc/roles/dpub/docAppendixRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const docAppendixRole: RoleDefinition = { +const docAppendixRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: false, baseConcepts: [], diff --git a/src/etc/roles/dpub/docBacklinkRole.js b/src/etc/roles/dpub/docBacklinkRole.js index 4c673922..19d5102f 100644 --- a/src/etc/roles/dpub/docBacklinkRole.js +++ b/src/etc/roles/dpub/docBacklinkRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const docBacklinkRole: RoleDefinition = { +const docBacklinkRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: true, baseConcepts: [], diff --git a/src/etc/roles/dpub/docBiblioentryRole.js b/src/etc/roles/dpub/docBiblioentryRole.js index 6297ef9a..67cf7ce2 100644 --- a/src/etc/roles/dpub/docBiblioentryRole.js +++ b/src/etc/roles/dpub/docBiblioentryRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const docBiblioentryRole: RoleDefinition = { +const docBiblioentryRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: true, baseConcepts: [], diff --git a/src/etc/roles/dpub/docBibliographyRole.js b/src/etc/roles/dpub/docBibliographyRole.js index 16ccf7e3..0dd6e177 100644 --- a/src/etc/roles/dpub/docBibliographyRole.js +++ b/src/etc/roles/dpub/docBibliographyRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const docBibliographyRole: RoleDefinition = { +const docBibliographyRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: false, baseConcepts: [], diff --git a/src/etc/roles/dpub/docBibliorefRole.js b/src/etc/roles/dpub/docBibliorefRole.js index 2f9f3190..6adeb1a8 100644 --- a/src/etc/roles/dpub/docBibliorefRole.js +++ b/src/etc/roles/dpub/docBibliorefRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const docBibliorefRole: RoleDefinition = { +const docBibliorefRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: true, baseConcepts: [], diff --git a/src/etc/roles/dpub/docChapterRole.js b/src/etc/roles/dpub/docChapterRole.js index 388aa899..63deccfa 100644 --- a/src/etc/roles/dpub/docChapterRole.js +++ b/src/etc/roles/dpub/docChapterRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const docChapterRole: RoleDefinition = { +const docChapterRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: false, baseConcepts: [], diff --git a/src/etc/roles/dpub/docColophonRole.js b/src/etc/roles/dpub/docColophonRole.js index 6295db70..4b7bc269 100644 --- a/src/etc/roles/dpub/docColophonRole.js +++ b/src/etc/roles/dpub/docColophonRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const docColophonRole: RoleDefinition = { +const docColophonRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: false, baseConcepts: [], diff --git a/src/etc/roles/dpub/docConclusionRole.js b/src/etc/roles/dpub/docConclusionRole.js index dd880470..37a124a1 100644 --- a/src/etc/roles/dpub/docConclusionRole.js +++ b/src/etc/roles/dpub/docConclusionRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const docConclusionRole: RoleDefinition = { +const docConclusionRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: false, baseConcepts: [], diff --git a/src/etc/roles/dpub/docCoverRole.js b/src/etc/roles/dpub/docCoverRole.js index e784d21c..2bec771e 100644 --- a/src/etc/roles/dpub/docCoverRole.js +++ b/src/etc/roles/dpub/docCoverRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const docCoverRole: RoleDefinition = { +const docCoverRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: false, baseConcepts: [], diff --git a/src/etc/roles/dpub/docCreditRole.js b/src/etc/roles/dpub/docCreditRole.js index 1597694f..8f40ef47 100644 --- a/src/etc/roles/dpub/docCreditRole.js +++ b/src/etc/roles/dpub/docCreditRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const docCreditRole: RoleDefinition = { +const docCreditRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: false, baseConcepts: [], diff --git a/src/etc/roles/dpub/docCreditsRole.js b/src/etc/roles/dpub/docCreditsRole.js index f674d8e4..0d1b29ee 100644 --- a/src/etc/roles/dpub/docCreditsRole.js +++ b/src/etc/roles/dpub/docCreditsRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const docCreditsRole: RoleDefinition = { +const docCreditsRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: false, baseConcepts: [], diff --git a/src/etc/roles/dpub/docDedicationRole.js b/src/etc/roles/dpub/docDedicationRole.js index 3c610e51..cfcb4e1f 100644 --- a/src/etc/roles/dpub/docDedicationRole.js +++ b/src/etc/roles/dpub/docDedicationRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const docDedicationRole: RoleDefinition = { +const docDedicationRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: false, baseConcepts: [], diff --git a/src/etc/roles/dpub/docEndnoteRole.js b/src/etc/roles/dpub/docEndnoteRole.js index 24e533df..99a8f324 100644 --- a/src/etc/roles/dpub/docEndnoteRole.js +++ b/src/etc/roles/dpub/docEndnoteRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const docEndnoteRole: RoleDefinition = { +const docEndnoteRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: false, baseConcepts: [], diff --git a/src/etc/roles/dpub/docEndnotesRole.js b/src/etc/roles/dpub/docEndnotesRole.js index d4887cf7..830ec70a 100644 --- a/src/etc/roles/dpub/docEndnotesRole.js +++ b/src/etc/roles/dpub/docEndnotesRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const docEndnotesRole: RoleDefinition = { +const docEndnotesRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: false, baseConcepts: [], diff --git a/src/etc/roles/dpub/docEpigraphRole.js b/src/etc/roles/dpub/docEpigraphRole.js index 9790fd86..487db0f6 100644 --- a/src/etc/roles/dpub/docEpigraphRole.js +++ b/src/etc/roles/dpub/docEpigraphRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const docEpigraphRole: RoleDefinition = { +const docEpigraphRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: false, baseConcepts: [], diff --git a/src/etc/roles/dpub/docEpilogueRole.js b/src/etc/roles/dpub/docEpilogueRole.js index 68bc75ef..4b2889c8 100644 --- a/src/etc/roles/dpub/docEpilogueRole.js +++ b/src/etc/roles/dpub/docEpilogueRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const docEpilogueRole: RoleDefinition = { +const docEpilogueRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: false, baseConcepts: [], diff --git a/src/etc/roles/dpub/docErrataRole.js b/src/etc/roles/dpub/docErrataRole.js index b14ab41e..fac39a4f 100644 --- a/src/etc/roles/dpub/docErrataRole.js +++ b/src/etc/roles/dpub/docErrataRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const docErrataRole: RoleDefinition = { +const docErrataRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: false, baseConcepts: [], diff --git a/src/etc/roles/dpub/docExampleRole.js b/src/etc/roles/dpub/docExampleRole.js index 4d465613..5b1a211e 100644 --- a/src/etc/roles/dpub/docExampleRole.js +++ b/src/etc/roles/dpub/docExampleRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const docExampleRole: RoleDefinition = { +const docExampleRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: false, baseConcepts: [], diff --git a/src/etc/roles/dpub/docFootnoteRole.js b/src/etc/roles/dpub/docFootnoteRole.js index d716702e..f8f3fcd5 100644 --- a/src/etc/roles/dpub/docFootnoteRole.js +++ b/src/etc/roles/dpub/docFootnoteRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const docFootnoteRole: RoleDefinition = { +const docFootnoteRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: false, baseConcepts: [], diff --git a/src/etc/roles/dpub/docForewordRole.js b/src/etc/roles/dpub/docForewordRole.js index a49e15f9..652331b3 100644 --- a/src/etc/roles/dpub/docForewordRole.js +++ b/src/etc/roles/dpub/docForewordRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const docForewordRole: RoleDefinition = { +const docForewordRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: false, baseConcepts: [], diff --git a/src/etc/roles/dpub/docGlossaryRole.js b/src/etc/roles/dpub/docGlossaryRole.js index 080380d1..567d2739 100644 --- a/src/etc/roles/dpub/docGlossaryRole.js +++ b/src/etc/roles/dpub/docGlossaryRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const docGlossaryRole: RoleDefinition = { +const docGlossaryRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: false, baseConcepts: [], diff --git a/src/etc/roles/dpub/docGlossrefRole.js b/src/etc/roles/dpub/docGlossrefRole.js index 9825e658..c4271cae 100644 --- a/src/etc/roles/dpub/docGlossrefRole.js +++ b/src/etc/roles/dpub/docGlossrefRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const docGlossrefRole: RoleDefinition = { +const docGlossrefRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: true, baseConcepts: [], diff --git a/src/etc/roles/dpub/docIndexRole.js b/src/etc/roles/dpub/docIndexRole.js index 839398f3..0f222827 100644 --- a/src/etc/roles/dpub/docIndexRole.js +++ b/src/etc/roles/dpub/docIndexRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const docIndexRole: RoleDefinition = { +const docIndexRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: false, baseConcepts: [], diff --git a/src/etc/roles/dpub/docIntroductionRole.js b/src/etc/roles/dpub/docIntroductionRole.js index 51a4a1b0..c8c930f7 100644 --- a/src/etc/roles/dpub/docIntroductionRole.js +++ b/src/etc/roles/dpub/docIntroductionRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const docIntroductionRole: RoleDefinition = { +const docIntroductionRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: false, baseConcepts: [], diff --git a/src/etc/roles/dpub/docNoterefRole.js b/src/etc/roles/dpub/docNoterefRole.js index b34338f9..e57b47e3 100644 --- a/src/etc/roles/dpub/docNoterefRole.js +++ b/src/etc/roles/dpub/docNoterefRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const docNoterefRole: RoleDefinition = { +const docNoterefRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: true, baseConcepts: [], diff --git a/src/etc/roles/dpub/docNoticeRole.js b/src/etc/roles/dpub/docNoticeRole.js index 44570579..e5a04d78 100644 --- a/src/etc/roles/dpub/docNoticeRole.js +++ b/src/etc/roles/dpub/docNoticeRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const docNoticeRole: RoleDefinition = { +const docNoticeRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: false, baseConcepts: [], diff --git a/src/etc/roles/dpub/docPagebreakRole.js b/src/etc/roles/dpub/docPagebreakRole.js index 2c39141c..b18dcd97 100644 --- a/src/etc/roles/dpub/docPagebreakRole.js +++ b/src/etc/roles/dpub/docPagebreakRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const docPagebreakRole: RoleDefinition = { +const docPagebreakRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: true, baseConcepts: [], diff --git a/src/etc/roles/dpub/docPagelistRole.js b/src/etc/roles/dpub/docPagelistRole.js index c38a375f..b4c29260 100644 --- a/src/etc/roles/dpub/docPagelistRole.js +++ b/src/etc/roles/dpub/docPagelistRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const docPagelistRole: RoleDefinition = { +const docPagelistRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: false, baseConcepts: [], diff --git a/src/etc/roles/dpub/docPartRole.js b/src/etc/roles/dpub/docPartRole.js index f5e39678..c8e10d39 100644 --- a/src/etc/roles/dpub/docPartRole.js +++ b/src/etc/roles/dpub/docPartRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const docPartRole: RoleDefinition = { +const docPartRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: true, baseConcepts: [], diff --git a/src/etc/roles/dpub/docPrefaceRole.js b/src/etc/roles/dpub/docPrefaceRole.js index eb792191..7c3c23e9 100644 --- a/src/etc/roles/dpub/docPrefaceRole.js +++ b/src/etc/roles/dpub/docPrefaceRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const docPrefaceRole: RoleDefinition = { +const docPrefaceRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: false, baseConcepts: [], diff --git a/src/etc/roles/dpub/docPrologueRole.js b/src/etc/roles/dpub/docPrologueRole.js index c971a8bc..40110bf3 100644 --- a/src/etc/roles/dpub/docPrologueRole.js +++ b/src/etc/roles/dpub/docPrologueRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const docPrologueRole: RoleDefinition = { +const docPrologueRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: false, baseConcepts: [], diff --git a/src/etc/roles/dpub/docPullquoteRole.js b/src/etc/roles/dpub/docPullquoteRole.js index 1df2f081..fb51dac8 100644 --- a/src/etc/roles/dpub/docPullquoteRole.js +++ b/src/etc/roles/dpub/docPullquoteRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const docPullquoteRole: RoleDefinition = { +const docPullquoteRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: false, baseConcepts: [], diff --git a/src/etc/roles/dpub/docQnaRole.js b/src/etc/roles/dpub/docQnaRole.js index 149fec42..2855583b 100644 --- a/src/etc/roles/dpub/docQnaRole.js +++ b/src/etc/roles/dpub/docQnaRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const docQnaRole: RoleDefinition = { +const docQnaRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: false, baseConcepts: [], diff --git a/src/etc/roles/dpub/docSubtitleRole.js b/src/etc/roles/dpub/docSubtitleRole.js index c3393c53..953a2cba 100644 --- a/src/etc/roles/dpub/docSubtitleRole.js +++ b/src/etc/roles/dpub/docSubtitleRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const docSubtitleRole: RoleDefinition = { +const docSubtitleRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: false, baseConcepts: [], diff --git a/src/etc/roles/dpub/docTipRole.js b/src/etc/roles/dpub/docTipRole.js index cf7c2c52..7914d06a 100644 --- a/src/etc/roles/dpub/docTipRole.js +++ b/src/etc/roles/dpub/docTipRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const docTipRole: RoleDefinition = { +const docTipRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: false, baseConcepts: [], diff --git a/src/etc/roles/dpub/docTocRole.js b/src/etc/roles/dpub/docTocRole.js index 17e31754..f5273ac4 100644 --- a/src/etc/roles/dpub/docTocRole.js +++ b/src/etc/roles/dpub/docTocRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const docTocRole: RoleDefinition = { +const docTocRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: false, baseConcepts: [], diff --git a/src/etc/roles/literal/alertRole.js b/src/etc/roles/literal/alertRole.js index c798a406..961b7c8a 100644 --- a/src/etc/roles/literal/alertRole.js +++ b/src/etc/roles/literal/alertRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const alertRole: RoleDefinition = { +const alertRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: false, baseConcepts: [], diff --git a/src/etc/roles/literal/alertdialogRole.js b/src/etc/roles/literal/alertdialogRole.js index 85005c3c..ad16f251 100644 --- a/src/etc/roles/literal/alertdialogRole.js +++ b/src/etc/roles/literal/alertdialogRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const alertdialogRole: RoleDefinition = { +const alertdialogRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: true, baseConcepts: [], diff --git a/src/etc/roles/literal/applicationRole.js b/src/etc/roles/literal/applicationRole.js index 0bbb9331..93b73ccf 100644 --- a/src/etc/roles/literal/applicationRole.js +++ b/src/etc/roles/literal/applicationRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const applicationRole: RoleDefinition = { +const applicationRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: true, baseConcepts: [ diff --git a/src/etc/roles/literal/articleRole.js b/src/etc/roles/literal/articleRole.js index e734a9cb..81b28d4d 100644 --- a/src/etc/roles/literal/articleRole.js +++ b/src/etc/roles/literal/articleRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const articleRole: RoleDefinition = { +const articleRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: false, baseConcepts: [], diff --git a/src/etc/roles/literal/bannerRole.js b/src/etc/roles/literal/bannerRole.js index cea9c0ce..42862d5a 100644 --- a/src/etc/roles/literal/bannerRole.js +++ b/src/etc/roles/literal/bannerRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const bannerRole: RoleDefinition = { +const bannerRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: false, baseConcepts: [], diff --git a/src/etc/roles/literal/buttonRole.js b/src/etc/roles/literal/buttonRole.js index 385ab52b..50236378 100644 --- a/src/etc/roles/literal/buttonRole.js +++ b/src/etc/roles/literal/buttonRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const buttonRole: RoleDefinition = { +const buttonRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: true, baseConcepts: [ diff --git a/src/etc/roles/literal/cellRole.js b/src/etc/roles/literal/cellRole.js index 2129711b..41ad26e1 100644 --- a/src/etc/roles/literal/cellRole.js +++ b/src/etc/roles/literal/cellRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const cellRole: RoleDefinition = { +const cellRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: false, baseConcepts: [ diff --git a/src/etc/roles/literal/checkboxRole.js b/src/etc/roles/literal/checkboxRole.js index 3d900466..aad738d4 100644 --- a/src/etc/roles/literal/checkboxRole.js +++ b/src/etc/roles/literal/checkboxRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const checkboxRole: RoleDefinition = { +const checkboxRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: true, baseConcepts: [], diff --git a/src/etc/roles/literal/columnheaderRole.js b/src/etc/roles/literal/columnheaderRole.js index 4c7238a3..0f5dce2c 100644 --- a/src/etc/roles/literal/columnheaderRole.js +++ b/src/etc/roles/literal/columnheaderRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const columnheaderRole: RoleDefinition = { +const columnheaderRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: true, baseConcepts: [ diff --git a/src/etc/roles/literal/comboboxRole.js b/src/etc/roles/literal/comboboxRole.js index 7d2e8676..0fbbc918 100644 --- a/src/etc/roles/literal/comboboxRole.js +++ b/src/etc/roles/literal/comboboxRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const comboboxRole: RoleDefinition = { +const comboboxRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: true, baseConcepts: [], diff --git a/src/etc/roles/literal/complementaryRole.js b/src/etc/roles/literal/complementaryRole.js index 37156283..dfa036be 100644 --- a/src/etc/roles/literal/complementaryRole.js +++ b/src/etc/roles/literal/complementaryRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const complementaryRole: RoleDefinition = { +const complementaryRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: false, baseConcepts: [], diff --git a/src/etc/roles/literal/contentinfoRole.js b/src/etc/roles/literal/contentinfoRole.js index a236f4bc..7b45b529 100644 --- a/src/etc/roles/literal/contentinfoRole.js +++ b/src/etc/roles/literal/contentinfoRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const contentinfoRole: RoleDefinition = { +const contentinfoRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: false, baseConcepts: [], diff --git a/src/etc/roles/literal/definitionRole.js b/src/etc/roles/literal/definitionRole.js index 62719259..7a804db7 100644 --- a/src/etc/roles/literal/definitionRole.js +++ b/src/etc/roles/literal/definitionRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const definitionRole: RoleDefinition = { +const definitionRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: false, baseConcepts: [], diff --git a/src/etc/roles/literal/dialogRole.js b/src/etc/roles/literal/dialogRole.js index 3cdec221..15630156 100644 --- a/src/etc/roles/literal/dialogRole.js +++ b/src/etc/roles/literal/dialogRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const dialogRole: RoleDefinition = { +const dialogRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: true, baseConcepts: [], diff --git a/src/etc/roles/literal/directoryRole.js b/src/etc/roles/literal/directoryRole.js index 00305a17..c08bebfc 100644 --- a/src/etc/roles/literal/directoryRole.js +++ b/src/etc/roles/literal/directoryRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const directoryRole: RoleDefinition = { +const directoryRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: false, baseConcepts: [], diff --git a/src/etc/roles/literal/documentRole.js b/src/etc/roles/literal/documentRole.js index 8345668f..162416b8 100644 --- a/src/etc/roles/literal/documentRole.js +++ b/src/etc/roles/literal/documentRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const documentRole: RoleDefinition = { +const documentRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: false, baseConcepts: [], diff --git a/src/etc/roles/literal/feedRole.js b/src/etc/roles/literal/feedRole.js index 85c5ec9c..85c65460 100644 --- a/src/etc/roles/literal/feedRole.js +++ b/src/etc/roles/literal/feedRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const feedRole: RoleDefinition = { +const feedRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: false, baseConcepts: [], diff --git a/src/etc/roles/literal/figureRole.js b/src/etc/roles/literal/figureRole.js index 25dec0ab..90416038 100644 --- a/src/etc/roles/literal/figureRole.js +++ b/src/etc/roles/literal/figureRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const figureRole: RoleDefinition = { +const figureRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: false, baseConcepts: [], diff --git a/src/etc/roles/literal/formRole.js b/src/etc/roles/literal/formRole.js index 178dcfc0..ceb7e04d 100644 --- a/src/etc/roles/literal/formRole.js +++ b/src/etc/roles/literal/formRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const formRole: RoleDefinition = { +const formRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: false, baseConcepts: [], diff --git a/src/etc/roles/literal/gridRole.js b/src/etc/roles/literal/gridRole.js index 973d4d54..0395d53a 100644 --- a/src/etc/roles/literal/gridRole.js +++ b/src/etc/roles/literal/gridRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const gridRole: RoleDefinition = { +const gridRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: true, baseConcepts: [ diff --git a/src/etc/roles/literal/gridcellRole.js b/src/etc/roles/literal/gridcellRole.js index 9d154bb7..2a76325a 100644 --- a/src/etc/roles/literal/gridcellRole.js +++ b/src/etc/roles/literal/gridcellRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const gridcellRole: RoleDefinition = { +const gridcellRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: true, baseConcepts: [ diff --git a/src/etc/roles/literal/groupRole.js b/src/etc/roles/literal/groupRole.js index 6d14a318..372e95d5 100644 --- a/src/etc/roles/literal/groupRole.js +++ b/src/etc/roles/literal/groupRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const groupRole: RoleDefinition = { +const groupRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: false, baseConcepts: [], diff --git a/src/etc/roles/literal/headingRole.js b/src/etc/roles/literal/headingRole.js index 8da265cc..f3f524a5 100644 --- a/src/etc/roles/literal/headingRole.js +++ b/src/etc/roles/literal/headingRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const headingRole: RoleDefinition = { +const headingRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: true, baseConcepts: [], diff --git a/src/etc/roles/literal/imgRole.js b/src/etc/roles/literal/imgRole.js index 0d75a06f..0c5fe697 100644 --- a/src/etc/roles/literal/imgRole.js +++ b/src/etc/roles/literal/imgRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const imgRole: RoleDefinition = { +const imgRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: true, baseConcepts: [], diff --git a/src/etc/roles/literal/linkRole.js b/src/etc/roles/literal/linkRole.js index 6da27537..e0fddc26 100644 --- a/src/etc/roles/literal/linkRole.js +++ b/src/etc/roles/literal/linkRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const linkRole: RoleDefinition = { +const linkRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: true, baseConcepts: [], diff --git a/src/etc/roles/literal/listRole.js b/src/etc/roles/literal/listRole.js index bb8a66d1..64580805 100644 --- a/src/etc/roles/literal/listRole.js +++ b/src/etc/roles/literal/listRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const listRole: RoleDefinition = { +const listRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: false, baseConcepts: [ diff --git a/src/etc/roles/literal/listboxRole.js b/src/etc/roles/literal/listboxRole.js index c656dab0..f16d4314 100644 --- a/src/etc/roles/literal/listboxRole.js +++ b/src/etc/roles/literal/listboxRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const listboxRole: RoleDefinition = { +const listboxRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: true, baseConcepts: [], diff --git a/src/etc/roles/literal/listitemRole.js b/src/etc/roles/literal/listitemRole.js index 984dc789..24a90959 100644 --- a/src/etc/roles/literal/listitemRole.js +++ b/src/etc/roles/literal/listitemRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const listitemRole: RoleDefinition = { +const listitemRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: false, baseConcepts: [ diff --git a/src/etc/roles/literal/logRole.js b/src/etc/roles/literal/logRole.js index 67eec90e..abd9fe0a 100644 --- a/src/etc/roles/literal/logRole.js +++ b/src/etc/roles/literal/logRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const logRole: RoleDefinition = { +const logRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: true, baseConcepts: [], diff --git a/src/etc/roles/literal/mainRole.js b/src/etc/roles/literal/mainRole.js index 4f051b18..76469a36 100644 --- a/src/etc/roles/literal/mainRole.js +++ b/src/etc/roles/literal/mainRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const mainRole: RoleDefinition = { +const mainRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: false, baseConcepts: [], diff --git a/src/etc/roles/literal/marqueeRole.js b/src/etc/roles/literal/marqueeRole.js index fc50c08c..6fd49cc6 100644 --- a/src/etc/roles/literal/marqueeRole.js +++ b/src/etc/roles/literal/marqueeRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const marqueeRole: RoleDefinition = { +const marqueeRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: true, baseConcepts: [], diff --git a/src/etc/roles/literal/mathRole.js b/src/etc/roles/literal/mathRole.js index af5926e3..f214dac2 100644 --- a/src/etc/roles/literal/mathRole.js +++ b/src/etc/roles/literal/mathRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const mathRole: RoleDefinition = { +const mathRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: false, baseConcepts: [], diff --git a/src/etc/roles/literal/menuRole.js b/src/etc/roles/literal/menuRole.js index 91a8d9a3..d963a636 100644 --- a/src/etc/roles/literal/menuRole.js +++ b/src/etc/roles/literal/menuRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const menuRole: RoleDefinition = { +const menuRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: false, baseConcepts: [], diff --git a/src/etc/roles/literal/menubarRole.js b/src/etc/roles/literal/menubarRole.js index e63f7d1b..12543f1e 100644 --- a/src/etc/roles/literal/menubarRole.js +++ b/src/etc/roles/literal/menubarRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const menubarRole: RoleDefinition = { +const menubarRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: false, baseConcepts: [], diff --git a/src/etc/roles/literal/menuitemRole.js b/src/etc/roles/literal/menuitemRole.js index a5654466..f5a407b6 100644 --- a/src/etc/roles/literal/menuitemRole.js +++ b/src/etc/roles/literal/menuitemRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const menuitemRole: RoleDefinition = { +const menuitemRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: true, baseConcepts: [], diff --git a/src/etc/roles/literal/menuitemcheckboxRole.js b/src/etc/roles/literal/menuitemcheckboxRole.js index a6f5b08d..ddb2717b 100644 --- a/src/etc/roles/literal/menuitemcheckboxRole.js +++ b/src/etc/roles/literal/menuitemcheckboxRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const menuitemcheckboxRole: RoleDefinition = { +const menuitemcheckboxRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: true, baseConcepts: [], diff --git a/src/etc/roles/literal/menuitemradioRole.js b/src/etc/roles/literal/menuitemradioRole.js index 1e644a85..ba1ba967 100644 --- a/src/etc/roles/literal/menuitemradioRole.js +++ b/src/etc/roles/literal/menuitemradioRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const menuitemradioRole: RoleDefinition = { +const menuitemradioRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: true, baseConcepts: [], diff --git a/src/etc/roles/literal/navigationRole.js b/src/etc/roles/literal/navigationRole.js index 5127e516..48409049 100644 --- a/src/etc/roles/literal/navigationRole.js +++ b/src/etc/roles/literal/navigationRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const navigationRole: RoleDefinition = { +const navigationRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: false, baseConcepts: [], diff --git a/src/etc/roles/literal/noneRole.js b/src/etc/roles/literal/noneRole.js index 0ef390b6..3d04f69f 100644 --- a/src/etc/roles/literal/noneRole.js +++ b/src/etc/roles/literal/noneRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const noneRole: RoleDefinition = { +const noneRole: ARIARoleDefinition = { abstract: false, baseConcepts: [], childrenPresentational: false, diff --git a/src/etc/roles/literal/noteRole.js b/src/etc/roles/literal/noteRole.js index 29272a40..0b884e5e 100644 --- a/src/etc/roles/literal/noteRole.js +++ b/src/etc/roles/literal/noteRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const noteRole: RoleDefinition = { +const noteRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: false, baseConcepts: [], diff --git a/src/etc/roles/literal/optionRole.js b/src/etc/roles/literal/optionRole.js index 19943cfb..d8c9068b 100644 --- a/src/etc/roles/literal/optionRole.js +++ b/src/etc/roles/literal/optionRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const optionRole: RoleDefinition = { +const optionRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: true, baseConcepts: [ diff --git a/src/etc/roles/literal/presentationRole.js b/src/etc/roles/literal/presentationRole.js index b1b03995..102953df 100644 --- a/src/etc/roles/literal/presentationRole.js +++ b/src/etc/roles/literal/presentationRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const presentationRole: RoleDefinition = { +const presentationRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: false, baseConcepts: [], diff --git a/src/etc/roles/literal/progressbarRole.js b/src/etc/roles/literal/progressbarRole.js index 99fb9b53..8fe652e8 100644 --- a/src/etc/roles/literal/progressbarRole.js +++ b/src/etc/roles/literal/progressbarRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const progressbarRole: RoleDefinition = { +const progressbarRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: true, baseConcepts: [], diff --git a/src/etc/roles/literal/radioRole.js b/src/etc/roles/literal/radioRole.js index abcc8c05..d69e8265 100644 --- a/src/etc/roles/literal/radioRole.js +++ b/src/etc/roles/literal/radioRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const radioRole: RoleDefinition = { +const radioRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: true, baseConcepts: [], diff --git a/src/etc/roles/literal/radiogroupRole.js b/src/etc/roles/literal/radiogroupRole.js index 492f51a1..05a457d2 100644 --- a/src/etc/roles/literal/radiogroupRole.js +++ b/src/etc/roles/literal/radiogroupRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const radiogroupRole: RoleDefinition = { +const radiogroupRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: true, baseConcepts: [], diff --git a/src/etc/roles/literal/regionRole.js b/src/etc/roles/literal/regionRole.js index 920d4d70..474cdaea 100644 --- a/src/etc/roles/literal/regionRole.js +++ b/src/etc/roles/literal/regionRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const regionRole: RoleDefinition = { +const regionRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: true, baseConcepts: [], diff --git a/src/etc/roles/literal/rowRole.js b/src/etc/roles/literal/rowRole.js index 44bd085a..efb83eb2 100644 --- a/src/etc/roles/literal/rowRole.js +++ b/src/etc/roles/literal/rowRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const rowRole: RoleDefinition = { +const rowRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: false, baseConcepts: [ diff --git a/src/etc/roles/literal/rowgroupRole.js b/src/etc/roles/literal/rowgroupRole.js index 9c4dfa6a..1d1d1380 100644 --- a/src/etc/roles/literal/rowgroupRole.js +++ b/src/etc/roles/literal/rowgroupRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const rowgroupRole: RoleDefinition = { +const rowgroupRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: false, baseConcepts: [ diff --git a/src/etc/roles/literal/rowheaderRole.js b/src/etc/roles/literal/rowheaderRole.js index e43a99f3..5440144d 100644 --- a/src/etc/roles/literal/rowheaderRole.js +++ b/src/etc/roles/literal/rowheaderRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const rowheaderRole: RoleDefinition = { +const rowheaderRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: true, baseConcepts: [ diff --git a/src/etc/roles/literal/scrollbarRole.js b/src/etc/roles/literal/scrollbarRole.js index 3c85d4b4..55d8299a 100644 --- a/src/etc/roles/literal/scrollbarRole.js +++ b/src/etc/roles/literal/scrollbarRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const scrollbarRole: RoleDefinition = { +const scrollbarRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: false, baseConcepts: [], diff --git a/src/etc/roles/literal/searchRole.js b/src/etc/roles/literal/searchRole.js index 49c175bf..d7b0f236 100644 --- a/src/etc/roles/literal/searchRole.js +++ b/src/etc/roles/literal/searchRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const searchRole: RoleDefinition = { +const searchRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: false, baseConcepts: [], diff --git a/src/etc/roles/literal/searchboxRole.js b/src/etc/roles/literal/searchboxRole.js index 45391030..75e05ad3 100644 --- a/src/etc/roles/literal/searchboxRole.js +++ b/src/etc/roles/literal/searchboxRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const searchboxRole: RoleDefinition = { +const searchboxRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: true, baseConcepts: [ diff --git a/src/etc/roles/literal/separatorRole.js b/src/etc/roles/literal/separatorRole.js index 8cbe19a3..fd193376 100644 --- a/src/etc/roles/literal/separatorRole.js +++ b/src/etc/roles/literal/separatorRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const separatorRole: RoleDefinition = { +const separatorRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: false, baseConcepts: [], diff --git a/src/etc/roles/literal/sliderRole.js b/src/etc/roles/literal/sliderRole.js index e98daae9..7c9f99aa 100644 --- a/src/etc/roles/literal/sliderRole.js +++ b/src/etc/roles/literal/sliderRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const sliderRole: RoleDefinition = { +const sliderRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: true, baseConcepts: [], diff --git a/src/etc/roles/literal/spinbuttonRole.js b/src/etc/roles/literal/spinbuttonRole.js index 288aa21f..d59b16a8 100644 --- a/src/etc/roles/literal/spinbuttonRole.js +++ b/src/etc/roles/literal/spinbuttonRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const spinbuttonRole: RoleDefinition = { +const spinbuttonRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: true, baseConcepts: [], diff --git a/src/etc/roles/literal/statusRole.js b/src/etc/roles/literal/statusRole.js index dd1267e3..7a366aee 100644 --- a/src/etc/roles/literal/statusRole.js +++ b/src/etc/roles/literal/statusRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const statusRole: RoleDefinition = { +const statusRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: false, baseConcepts: [], diff --git a/src/etc/roles/literal/switchRole.js b/src/etc/roles/literal/switchRole.js index fe77a1d6..cddc81ea 100644 --- a/src/etc/roles/literal/switchRole.js +++ b/src/etc/roles/literal/switchRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const switchRole: RoleDefinition = { +const switchRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: true, baseConcepts: [], diff --git a/src/etc/roles/literal/tabRole.js b/src/etc/roles/literal/tabRole.js index bb4be70d..fd26aa1d 100644 --- a/src/etc/roles/literal/tabRole.js +++ b/src/etc/roles/literal/tabRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const tabRole: RoleDefinition = { +const tabRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: false, baseConcepts: [], diff --git a/src/etc/roles/literal/tableRole.js b/src/etc/roles/literal/tableRole.js index 105b0094..95481a3a 100644 --- a/src/etc/roles/literal/tableRole.js +++ b/src/etc/roles/literal/tableRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const tableRole: RoleDefinition = { +const tableRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: true, baseConcepts: [ diff --git a/src/etc/roles/literal/tablistRole.js b/src/etc/roles/literal/tablistRole.js index ae779033..d26b608c 100644 --- a/src/etc/roles/literal/tablistRole.js +++ b/src/etc/roles/literal/tablistRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const tablistRole: RoleDefinition = { +const tablistRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: false, baseConcepts: [], diff --git a/src/etc/roles/literal/tabpanelRole.js b/src/etc/roles/literal/tabpanelRole.js index 87696f01..493b10e9 100644 --- a/src/etc/roles/literal/tabpanelRole.js +++ b/src/etc/roles/literal/tabpanelRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const tabpanelRole: RoleDefinition = { +const tabpanelRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: true, baseConcepts: [], diff --git a/src/etc/roles/literal/termRole.js b/src/etc/roles/literal/termRole.js index c3c5d245..cd21037a 100644 --- a/src/etc/roles/literal/termRole.js +++ b/src/etc/roles/literal/termRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const termRole: RoleDefinition = { +const termRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: false, baseConcepts: [], diff --git a/src/etc/roles/literal/textboxRole.js b/src/etc/roles/literal/textboxRole.js index 5c6a62df..fa65523b 100644 --- a/src/etc/roles/literal/textboxRole.js +++ b/src/etc/roles/literal/textboxRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const textboxRole: RoleDefinition = { +const textboxRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: true, baseConcepts: [], diff --git a/src/etc/roles/literal/timerRole.js b/src/etc/roles/literal/timerRole.js index 66ace53d..c93d0bb2 100644 --- a/src/etc/roles/literal/timerRole.js +++ b/src/etc/roles/literal/timerRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const timerRole: RoleDefinition = { +const timerRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: true, baseConcepts: [], diff --git a/src/etc/roles/literal/toolbarRole.js b/src/etc/roles/literal/toolbarRole.js index cdcf18bb..ecf5afb0 100644 --- a/src/etc/roles/literal/toolbarRole.js +++ b/src/etc/roles/literal/toolbarRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const toolbarRole: RoleDefinition = { +const toolbarRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: false, baseConcepts: [], diff --git a/src/etc/roles/literal/tooltipRole.js b/src/etc/roles/literal/tooltipRole.js index 0a12c76f..6ca8d703 100644 --- a/src/etc/roles/literal/tooltipRole.js +++ b/src/etc/roles/literal/tooltipRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const tooltipRole: RoleDefinition = { +const tooltipRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: true, baseConcepts: [], diff --git a/src/etc/roles/literal/treeRole.js b/src/etc/roles/literal/treeRole.js index bd7aeb24..aed8406f 100644 --- a/src/etc/roles/literal/treeRole.js +++ b/src/etc/roles/literal/treeRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const treeRole: RoleDefinition = { +const treeRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: true, baseConcepts: [], diff --git a/src/etc/roles/literal/treegridRole.js b/src/etc/roles/literal/treegridRole.js index 6bf1ca5c..5f091160 100644 --- a/src/etc/roles/literal/treegridRole.js +++ b/src/etc/roles/literal/treegridRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const treegridRole: RoleDefinition = { +const treegridRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: false, baseConcepts: [], diff --git a/src/etc/roles/literal/treeitemRole.js b/src/etc/roles/literal/treeitemRole.js index d1dfb7c9..2e89c959 100644 --- a/src/etc/roles/literal/treeitemRole.js +++ b/src/etc/roles/literal/treeitemRole.js @@ -1,7 +1,7 @@ /** * @flow */ -const treeitemRole: RoleDefinition = { +const treeitemRole: ARIARoleDefinition = { abstract: false, accessibleNameRequired: true, baseConcepts: [], diff --git a/src/index.js b/src/index.js index f6524d64..9ead151c 100644 --- a/src/index.js +++ b/src/index.js @@ -4,6 +4,12 @@ import rolesMap from './rolesMap'; import elementRoleMap from './elementRoleMap'; import roleElementMap from './roleElementMap'; +export type ARIARoleDefintionKey = + ARIAAbstractRole + | ARIARole + | ARIADPubRole; + + export const aria = ariaPropsMap; export const dom = domMap; export const roles = rolesMap; diff --git a/src/roleElementMap.js b/src/roleElementMap.js index 92bafbda..a824be17 100644 --- a/src/roleElementMap.js +++ b/src/roleElementMap.js @@ -3,16 +3,17 @@ */ import rolesMap from './rolesMap'; +import type { ARIARoleDefintionKey } from './index'; -type RelationConceptSet = Set; +type ARIARelationConceptSet = Set; -type RoleElementRelationMap = Map; +type RoleElementRelationMap = Map; const roleElementMap: RoleElementRelationMap = new Map([]); [...rolesMap.keys()] .forEach(( - key: string, + key: ARIARoleDefintionKey, ): void => { const role = rolesMap.get(key); if (role) { @@ -21,7 +22,7 @@ const roleElementMap: RoleElementRelationMap = new Map([]); ...role.relatedConcepts, ] .forEach(( - relation: RoleRelation, + relation: ARIARoleRelation, ): void => { if (relation.module === 'HTML') { const concept = relation.concept; diff --git a/src/rolesMap.js b/src/rolesMap.js index 741081e2..44351251 100644 --- a/src/rolesMap.js +++ b/src/rolesMap.js @@ -5,8 +5,9 @@ import ariaAbstractRoles from './etc/roles/ariaAbstractRoles'; import ariaLiteralRoles from './etc/roles/ariaLiteralRoles'; import ariaDpubRoles from './etc/roles/ariaDpubRoles'; +import type { ARIARoleDefintionKey } from './index'; -type MapOfRoleDefinitions = Map; +type MapOfRoleDefinitions = Map; const rolesMap: MapOfRoleDefinitions = new Map([]); [ @@ -16,13 +17,16 @@ const rolesMap: MapOfRoleDefinitions = new Map([]); ].forEach(roleSet => { roleSet.forEach( ( - roleDefinition: RoleDefinition, - name: string + roleDefinition: ARIARoleDefinition, + name: ARIARoleDefintionKey, ) => rolesMap.set(name, roleDefinition) ); }); -rolesMap.forEach((roleDefinition: RoleDefinition, name: string) => { +rolesMap.forEach(( + roleDefinition: ARIARoleDefinition, + name: ARIARoleDefintionKey, +) => { // Conglomerate the properties for (let superClassIter of roleDefinition.superClass) { for (let superClassName of superClassIter) {