babelacc

compare different implementations of the text alternative computation  https://p.ce9e.org/babelacc/
git clone https://git.ce9e.org/babelacc.git

commit
21b0a3e064bf18b7d8530857c203e28fd399549f
parent
495a2025f59d11d76cd89b85573c914c1ae0e84e
Author
Tobias Bengfort <tobias.bengfort@posteo.de>
Date
2018-02-03 15:20
build

Diffstat

M babel.js 1780 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--

1 files changed, 1741 insertions, 39 deletions


diff --git a/babel.js b/babel.js

@@ -345,11 +345,13 @@ global.goog = {
  345   345 global.axs = {
  346   346 	browserUtils: {},
  347   347 	color: {},
   -1   348 	constants: {},
  348   349 	dom: {},
  349   350 	utils: {},
  350   351 	properties: {},
  351   352 };
  352   353 
   -1   354 require('accessibility-developer-tools/src/js/Constants');
  353   355 require('accessibility-developer-tools/src/js/AccessibilityUtils');
  354   356 require('accessibility-developer-tools/src/js/BrowserUtils');
  355   357 require('accessibility-developer-tools/src/js/Color');
@@ -359,7 +361,7 @@ require('accessibility-developer-tools/src/js/Properties');
  359   361 module.exports = global.axs;
  360   362 
  361   363 }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
  362    -1 },{"accessibility-developer-tools/src/js/AccessibilityUtils":3,"accessibility-developer-tools/src/js/BrowserUtils":4,"accessibility-developer-tools/src/js/Color":5,"accessibility-developer-tools/src/js/DOMUtils":6,"accessibility-developer-tools/src/js/Properties":7}],3:[function(require,module,exports){
   -1   364 },{"accessibility-developer-tools/src/js/AccessibilityUtils":3,"accessibility-developer-tools/src/js/BrowserUtils":4,"accessibility-developer-tools/src/js/Color":5,"accessibility-developer-tools/src/js/Constants":6,"accessibility-developer-tools/src/js/DOMUtils":7,"accessibility-developer-tools/src/js/Properties":8}],3:[function(require,module,exports){
  363   365 // Copyright 2012 Google Inc.
  364   366 //
  365   367 // Licensed under the Apache License, Version 2.0 (the "License");
@@ -2222,6 +2224,1690 @@ axs.color.YCC_CUBE_FACES_WHITE = [ { p0: axs.color.WHITE_YCC, p1: axs.color.CYAN
 2222  2224                                    { p0: axs.color.WHITE_YCC, p1: axs.color.YELLOW_YCC, p2: axs.color.CYAN_YCC } ];
 2223  2225 
 2224  2226 },{}],6:[function(require,module,exports){
   -1  2227 // Copyright 2012 Google Inc.
   -1  2228 //
   -1  2229 // Licensed under the Apache License, Version 2.0 (the "License");
   -1  2230 // you may not use this file except in compliance with the License.
   -1  2231 // You may obtain a copy of the License at
   -1  2232 //
   -1  2233 //      http://www.apache.org/licenses/LICENSE-2.0
   -1  2234 //
   -1  2235 // Unless required by applicable law or agreed to in writing, software
   -1  2236 // distributed under the License is distributed on an "AS IS" BASIS,
   -1  2237 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   -1  2238 // See the License for the specific language governing permissions and
   -1  2239 // limitations under the License.
   -1  2240 
   -1  2241 goog.provide('axs.constants');
   -1  2242 goog.provide('axs.constants.AuditResult');
   -1  2243 goog.provide('axs.constants.Severity');
   -1  2244 
   -1  2245 /** @type {Object.<string, Object>} */
   -1  2246 axs.constants.ARIA_ROLES = {
   -1  2247     "alert": {
   -1  2248         "namefrom": [ "author" ],
   -1  2249         "parent": [ "region" ]
   -1  2250     },
   -1  2251     "alertdialog": {
   -1  2252         "namefrom": [ "author" ],
   -1  2253         "namerequired": true,
   -1  2254         "parent": [ "alert", "dialog" ]
   -1  2255     },
   -1  2256     "application": {
   -1  2257         "namefrom": [ "author" ],
   -1  2258         "namerequired": true,
   -1  2259         "parent": [ "landmark" ]
   -1  2260     },
   -1  2261     "article": {
   -1  2262         "namefrom": [ "author" ],
   -1  2263         "parent": [ "document", "region" ]
   -1  2264     },
   -1  2265     "banner": {
   -1  2266         "namefrom": [ "author" ],
   -1  2267         "parent": [ "landmark" ]
   -1  2268     },
   -1  2269     "button": {
   -1  2270         "childpresentational": true,
   -1  2271         "namefrom": [ "contents", "author" ],
   -1  2272         "namerequired": true,
   -1  2273         "parent": [ "command" ],
   -1  2274         "properties": [ "aria-expanded", "aria-pressed" ]
   -1  2275     },
   -1  2276     "checkbox": {
   -1  2277         "namefrom": [ "contents", "author" ],
   -1  2278         "namerequired": true,
   -1  2279         "parent": [ "input" ],
   -1  2280         "requiredProperties": [ "aria-checked" ],
   -1  2281         "properties": [ "aria-checked" ]
   -1  2282     },
   -1  2283     "columnheader": {
   -1  2284         "namefrom": [ "contents", "author" ],
   -1  2285         "namerequired": true,
   -1  2286         "parent": [ "gridcell", "sectionhead", "widget" ],
   -1  2287         "properties": [ "aria-sort" ],
   -1  2288         "scope": [ "row" ]
   -1  2289     },
   -1  2290     "combobox": {
   -1  2291         "mustcontain": [ "listbox", "textbox" ],
   -1  2292         "namefrom": [ "author" ],
   -1  2293         "namerequired": true,
   -1  2294         "parent": [ "select" ],
   -1  2295         "requiredProperties": [ "aria-expanded" ],
   -1  2296         "properties": [ "aria-expanded", "aria-autocomplete", "aria-required" ]
   -1  2297     },
   -1  2298     "command": {
   -1  2299         "abstract": true,
   -1  2300         "namefrom": [ "author" ],
   -1  2301         "parent": [ "widget" ]
   -1  2302     },
   -1  2303     "complementary": {
   -1  2304         "namefrom": [ "author" ],
   -1  2305         "parent": [ "landmark" ]
   -1  2306     },
   -1  2307     "composite": {
   -1  2308         "abstract": true,
   -1  2309         "childpresentational": false,
   -1  2310         "namefrom": [ "author" ],
   -1  2311         "parent": [ "widget" ],
   -1  2312         "properties": [ "aria-activedescendant" ]
   -1  2313     },
   -1  2314     "contentinfo": {
   -1  2315         "namefrom": [ "author" ],
   -1  2316         "parent": [ "landmark" ]
   -1  2317     },
   -1  2318     "definition": {
   -1  2319         "namefrom": [ "author" ],
   -1  2320         "parent": [ "section" ]
   -1  2321     },
   -1  2322     "dialog": {
   -1  2323         "namefrom": [ "author" ],
   -1  2324         "namerequired": true,
   -1  2325         "parent": [ "window" ]
   -1  2326     },
   -1  2327     "directory": {
   -1  2328         "namefrom": [ "contents", "author" ],
   -1  2329         "parent": [ "list" ]
   -1  2330     },
   -1  2331     "document": {
   -1  2332         "namefrom": [ " author" ],
   -1  2333         "namerequired": true,
   -1  2334         "parent": [ "structure" ],
   -1  2335         "properties": [ "aria-expanded" ]
   -1  2336     },
   -1  2337     "form": {
   -1  2338         "namefrom": [ "author" ],
   -1  2339         "parent": [ "landmark" ]
   -1  2340     },
   -1  2341     "grid": {
   -1  2342         "mustcontain": [ "row", "rowgroup" ],
   -1  2343         "namefrom": [ "author" ],
   -1  2344         "namerequired": true,
   -1  2345         "parent": [ "composite", "region" ],
   -1  2346         "properties": [ "aria-level", "aria-multiselectable", "aria-readonly" ]
   -1  2347     },
   -1  2348     "gridcell": {
   -1  2349         "namefrom": [ "contents", "author" ],
   -1  2350         "namerequired": true,
   -1  2351         "parent": [ "section", "widget" ],
   -1  2352         "properties": [ "aria-readonly", "aria-required", "aria-selected" ],
   -1  2353         "scope": [ "row" ]
   -1  2354     },
   -1  2355     "group": {
   -1  2356         "namefrom": [ " author" ],
   -1  2357         "parent": [ "section" ],
   -1  2358         "properties": [ "aria-activedescendant" ]
   -1  2359     },
   -1  2360     "heading": {
   -1  2361         "namerequired": true,
   -1  2362         "parent": [ "sectionhead" ],
   -1  2363         "properties": [ "aria-level" ]
   -1  2364     },
   -1  2365     "img": {
   -1  2366         "childpresentational": true,
   -1  2367         "namefrom": [ "author" ],
   -1  2368         "namerequired": true,
   -1  2369         "parent": [ "section" ]
   -1  2370     },
   -1  2371     "input": {
   -1  2372         "abstract": true,
   -1  2373         "namefrom": [ "author" ],
   -1  2374         "parent": [ "widget" ]
   -1  2375     },
   -1  2376     "landmark": {
   -1  2377         "abstract": true,
   -1  2378         "namefrom": [ "contents", "author" ],
   -1  2379         "namerequired": false,
   -1  2380         "parent": [ "region" ]
   -1  2381     },
   -1  2382     "link": {
   -1  2383         "namefrom": [ "contents", "author" ],
   -1  2384         "namerequired": true,
   -1  2385         "parent": [ "command" ],
   -1  2386         "properties": [ "aria-expanded" ]
   -1  2387     },
   -1  2388     "list": {
   -1  2389         "mustcontain": [ "group", "listitem" ],
   -1  2390         "namefrom": [ "author" ],
   -1  2391         "parent": [ "region" ]
   -1  2392     },
   -1  2393     "listbox": {
   -1  2394         "mustcontain": [ "option" ],
   -1  2395         "namefrom": [ "author" ],
   -1  2396         "namerequired": true,
   -1  2397         "parent": [ "list", "select" ],
   -1  2398         "properties": [ "aria-multiselectable", "aria-required" ]
   -1  2399     },
   -1  2400     "listitem": {
   -1  2401         "namefrom": [ "contents", "author" ],
   -1  2402         "namerequired": true,
   -1  2403         "parent": [ "section" ],
   -1  2404         "properties": [ "aria-level", "aria-posinset", "aria-setsize" ],
   -1  2405         "scope": [ "list" ]
   -1  2406     },
   -1  2407     "log": {
   -1  2408         "namefrom": [ " author" ],
   -1  2409         "namerequired": true,
   -1  2410         "parent": [ "region" ]
   -1  2411     },
   -1  2412     "main": {
   -1  2413         "namefrom": [ "author" ],
   -1  2414         "parent": [ "landmark" ]
   -1  2415     },
   -1  2416     "marquee": {
   -1  2417         "namerequired": true,
   -1  2418         "parent": [ "section" ]
   -1  2419     },
   -1  2420     "math": {
   -1  2421         "childpresentational": true,
   -1  2422         "namefrom": [ "author" ],
   -1  2423         "parent": [ "section" ]
   -1  2424     },
   -1  2425     "menu": {
   -1  2426         "mustcontain": [
   -1  2427             "group",
   -1  2428             "menuitemradio",
   -1  2429             "menuitem",
   -1  2430             "menuitemcheckbox"
   -1  2431         ],
   -1  2432         "namefrom": [ "author" ],
   -1  2433         "namerequired": true,
   -1  2434         "parent": [ "list", "select" ]
   -1  2435     },
   -1  2436     "menubar": {
   -1  2437         "namefrom": [ "author" ],
   -1  2438         "parent": [ "menu" ]
   -1  2439     },
   -1  2440     "menuitem": {
   -1  2441         "namefrom": [ "contents", "author" ],
   -1  2442         "namerequired": true,
   -1  2443         "parent": [ "command" ],
   -1  2444         "scope": [ "menu", "menubar" ]
   -1  2445     },
   -1  2446     "menuitemcheckbox": {
   -1  2447         "namefrom": [ "contents", "author" ],
   -1  2448         "namerequired": true,
   -1  2449         "parent": [ "checkbox", "menuitem" ],
   -1  2450         "scope": [ "menu", "menubar" ]
   -1  2451     },
   -1  2452     "menuitemradio": {
   -1  2453         "namefrom": [ "contents", "author" ],
   -1  2454         "namerequired": true,
   -1  2455         "parent": [ "menuitemcheckbox", "radio" ],
   -1  2456         "scope": [ "menu", "menubar" ]
   -1  2457     },
   -1  2458     "navigation": {
   -1  2459         "namefrom": [ "author" ],
   -1  2460         "parent": [ "landmark" ]
   -1  2461     },
   -1  2462     "note": {
   -1  2463         "namefrom": [ "author" ],
   -1  2464         "parent": [ "section" ]
   -1  2465     },
   -1  2466     "option": {
   -1  2467         "namefrom": [ "contents", "author" ],
   -1  2468         "namerequired": true,
   -1  2469         "parent": [ "input" ],
   -1  2470         "properties": [
   -1  2471             "aria-checked",
   -1  2472             "aria-posinset",
   -1  2473             "aria-selected",
   -1  2474             "aria-setsize"
   -1  2475         ]
   -1  2476     },
   -1  2477     "presentation": {
   -1  2478         "parent": [ "structure" ]
   -1  2479     },
   -1  2480     "progressbar": {
   -1  2481         "childpresentational": true,
   -1  2482         "namefrom": [ "author" ],
   -1  2483         "namerequired": true,
   -1  2484         "parent": [ "range" ]
   -1  2485     },
   -1  2486     "radio": {
   -1  2487         "namefrom": [ "contents", "author" ],
   -1  2488         "namerequired": true,
   -1  2489         "parent": [ "checkbox", "option" ]
   -1  2490     },
   -1  2491     "radiogroup": {
   -1  2492         "mustcontain": [ "radio" ],
   -1  2493         "namefrom": [ "author" ],
   -1  2494         "namerequired": true,
   -1  2495         "parent": [ "select" ],
   -1  2496         "properties": [ "aria-required" ]
   -1  2497     },
   -1  2498     "range": {
   -1  2499         "abstract": true,
   -1  2500         "namefrom": [ "author" ],
   -1  2501         "parent": [ "widget" ],
   -1  2502         "properties": [
   -1  2503             "aria-valuemax",
   -1  2504             "aria-valuemin",
   -1  2505             "aria-valuenow",
   -1  2506             "aria-valuetext"
   -1  2507         ]
   -1  2508     },
   -1  2509     "region": {
   -1  2510         "namefrom": [ " author" ],
   -1  2511         "parent": [ "section" ]
   -1  2512     },
   -1  2513     "roletype": {
   -1  2514         "abstract": true,
   -1  2515         "properties": [
   -1  2516             "aria-atomic",
   -1  2517             "aria-busy",
   -1  2518             "aria-controls",
   -1  2519             "aria-describedby",
   -1  2520             "aria-disabled",
   -1  2521             "aria-dropeffect",
   -1  2522             "aria-flowto",
   -1  2523             "aria-grabbed",
   -1  2524             "aria-haspopup",
   -1  2525             "aria-hidden",
   -1  2526             "aria-invalid",
   -1  2527             "aria-label",
   -1  2528             "aria-labelledby",
   -1  2529             "aria-live",
   -1  2530             "aria-owns",
   -1  2531             "aria-relevant"
   -1  2532         ]
   -1  2533     },
   -1  2534     "row": {
   -1  2535         "mustcontain": [ "columnheader", "gridcell", "rowheader" ],
   -1  2536         "namefrom": [ "contents", "author" ],
   -1  2537         "parent": [ "group", "widget" ],
   -1  2538         "properties": [ "aria-level", "aria-selected" ],
   -1  2539         "scope": [ "grid", "rowgroup", "treegrid" ]
   -1  2540     },
   -1  2541     "rowgroup": {
   -1  2542         "mustcontain": [ "row" ],
   -1  2543         "namefrom": [ "contents", "author" ],
   -1  2544         "parent": [ "group" ],
   -1  2545         "scope": [ "grid" ]
   -1  2546     },
   -1  2547     "rowheader": {
   -1  2548         "namefrom": [ "contents", "author" ],
   -1  2549         "namerequired": true,
   -1  2550         "parent": [ "gridcell", "sectionhead", "widget" ],
   -1  2551         "properties": [ "aria-sort" ],
   -1  2552         "scope": [ "row" ]
   -1  2553     },
   -1  2554     "search": {
   -1  2555         "namefrom": [ "author" ],
   -1  2556         "parent": [ "landmark" ]
   -1  2557     },
   -1  2558     "section": {
   -1  2559         "abstract": true,
   -1  2560         "namefrom": [ "contents", "author" ],
   -1  2561         "parent": [ "structure" ],
   -1  2562         "properties": [ "aria-expanded" ]
   -1  2563     },
   -1  2564     "sectionhead": {
   -1  2565         "abstract": true,
   -1  2566         "namefrom": [ "contents", "author" ],
   -1  2567         "parent": [ "structure" ],
   -1  2568         "properties": [ "aria-expanded" ]
   -1  2569     },
   -1  2570     "select": {
   -1  2571         "abstract": true,
   -1  2572         "namefrom": [ "author" ],
   -1  2573         "parent": [ "composite", "group", "input" ]
   -1  2574     },
   -1  2575     "separator": {
   -1  2576         "childpresentational": true,
   -1  2577         "namefrom": [ "author" ],
   -1  2578         "parent": [ "structure" ],
   -1  2579         "properties": [ "aria-expanded", "aria-orientation" ]
   -1  2580     },
   -1  2581     "scrollbar": {
   -1  2582         "childpresentational": true,
   -1  2583         "namefrom": [ "author" ],
   -1  2584         "namerequired": false,
   -1  2585         "parent": [ "input", "range" ],
   -1  2586         "requiredProperties": [
   -1  2587             "aria-controls",
   -1  2588             "aria-orientation",
   -1  2589             "aria-valuemax",
   -1  2590             "aria-valuemin",
   -1  2591             "aria-valuenow"
   -1  2592         ],
   -1  2593         "properties": [
   -1  2594             "aria-controls",
   -1  2595             "aria-orientation",
   -1  2596             "aria-valuemax",
   -1  2597             "aria-valuemin",
   -1  2598             "aria-valuenow"
   -1  2599         ]
   -1  2600     },
   -1  2601     "slider": {
   -1  2602         "childpresentational": true,
   -1  2603         "namefrom": [ "author" ],
   -1  2604         "namerequired": true,
   -1  2605         "parent": [ "input", "range" ],
   -1  2606         "requiredProperties": [ "aria-valuemax", "aria-valuemin", "aria-valuenow" ],
   -1  2607         "properties": [
   -1  2608             "aria-valuemax",
   -1  2609             "aria-valuemin",
   -1  2610             "aria-valuenow",
   -1  2611             "aria-orientation"
   -1  2612         ]
   -1  2613     },
   -1  2614     "spinbutton": {
   -1  2615         "namefrom": [ "author" ],
   -1  2616         "namerequired": true,
   -1  2617         "parent": [ "input", "range" ],
   -1  2618         "requiredProperties": [ "aria-valuemax", "aria-valuemin", "aria-valuenow" ],
   -1  2619         "properties": [
   -1  2620             "aria-valuemax",
   -1  2621             "aria-valuemin",
   -1  2622             "aria-valuenow",
   -1  2623             "aria-required"
   -1  2624         ]
   -1  2625     },
   -1  2626     "status": {
   -1  2627         "parent": [ "region" ]
   -1  2628     },
   -1  2629     "structure": {
   -1  2630         "abstract": true,
   -1  2631         "parent": [ "roletype" ]
   -1  2632     },
   -1  2633     "tab": {
   -1  2634         "namefrom": [ "contents", "author" ],
   -1  2635         "parent": [ "sectionhead", "widget" ],
   -1  2636         "properties": [ "aria-selected" ],
   -1  2637         "scope": [ "tablist" ]
   -1  2638     },
   -1  2639     "tablist": {
   -1  2640         "mustcontain": [ "tab" ],
   -1  2641         "namefrom": [ "author" ],
   -1  2642         "parent": [ "composite", "directory" ],
   -1  2643         "properties": [ "aria-level" ]
   -1  2644     },
   -1  2645     "tabpanel": {
   -1  2646         "namefrom": [ "author" ],
   -1  2647         "namerequired": true,
   -1  2648         "parent": [ "region" ]
   -1  2649     },
   -1  2650     "textbox": {
   -1  2651         "namefrom": [ "author" ],
   -1  2652         "namerequired": true,
   -1  2653         "parent": [ "input" ],
   -1  2654         "properties": [
   -1  2655             "aria-activedescendant",
   -1  2656             "aria-autocomplete",
   -1  2657             "aria-multiline",
   -1  2658             "aria-readonly",
   -1  2659             "aria-required"
   -1  2660         ]
   -1  2661     },
   -1  2662     "timer": {
   -1  2663         "namefrom": [ "author" ],
   -1  2664         "namerequired": true,
   -1  2665         "parent": [ "status" ]
   -1  2666     },
   -1  2667     "toolbar": {
   -1  2668         "namefrom": [ "author" ],
   -1  2669         "parent": [ "group" ]
   -1  2670     },
   -1  2671     "tooltip": {
   -1  2672         "namerequired": true,
   -1  2673         "parent": [ "section" ]
   -1  2674     },
   -1  2675     "tree": {
   -1  2676         "mustcontain": [ "group", "treeitem" ],
   -1  2677         "namefrom": [ "author" ],
   -1  2678         "namerequired": true,
   -1  2679         "parent": [ "select" ],
   -1  2680         "properties": [ "aria-multiselectable", "aria-required" ]
   -1  2681     },
   -1  2682     "treegrid": {
   -1  2683         "mustcontain": [ "row" ],
   -1  2684         "namefrom": [ "author" ],
   -1  2685         "namerequired": true,
   -1  2686         "parent": [ "grid", "tree" ]
   -1  2687     },
   -1  2688     "treeitem": {
   -1  2689         "namefrom": [ "contents", "author" ],
   -1  2690         "namerequired": true,
   -1  2691         "parent": [ "listitem", "option" ],
   -1  2692         "scope": [ "group", "tree" ]
   -1  2693     },
   -1  2694     "widget": {
   -1  2695         "abstract": true,
   -1  2696         "parent": [ "roletype" ]
   -1  2697     },
   -1  2698     "window": {
   -1  2699         "abstract": true,
   -1  2700         "namefrom": [ " author" ],
   -1  2701         "parent": [ "roletype" ],
   -1  2702         "properties": [ "aria-expanded" ]
   -1  2703     }
   -1  2704 };
   -1  2705 
   -1  2706 axs.constants.WIDGET_ROLES = {};
   -1  2707 
   -1  2708 /**
   -1  2709  * Squashes the parent hierarchy on to role object.
   -1  2710  * @param {Object} role
   -1  2711  * @param {Object} set
   -1  2712  * @private
   -1  2713  */
   -1  2714 axs.constants.addAllParentRolesToSet_ = function(role, set) {
   -1  2715   if (!role['parent'])
   -1  2716       return;
   -1  2717   var parents = role['parent'];
   -1  2718   for (var j = 0; j < parents.length; j++) {
   -1  2719     var parentRoleName = parents[j];
   -1  2720     set[parentRoleName] = true;
   -1  2721     axs.constants.addAllParentRolesToSet_(
   -1  2722         axs.constants.ARIA_ROLES[parentRoleName], set);
   -1  2723   }
   -1  2724 };
   -1  2725 
   -1  2726 /**
   -1  2727  * Adds all properties and requiredProperties from parent hierarchy.
   -1  2728  * @param {Object} role
   -1  2729  * @param {string} propertiesName
   -1  2730  * @param {Object} propertiesSet
   -1  2731  * @private
   -1  2732  */
   -1  2733 axs.constants.addAllPropertiesToSet_ = function(role, propertiesName,
   -1  2734     propertiesSet) {
   -1  2735   var properties = role[propertiesName];
   -1  2736   if (properties) {
   -1  2737     for (var i = 0; i < properties.length; i++)
   -1  2738       propertiesSet[properties[i]] = true;
   -1  2739   }
   -1  2740   if (role['parent']) {
   -1  2741     var parents = role['parent'];
   -1  2742     for (var j = 0; j < parents.length; j++) {
   -1  2743       var parentRoleName = parents[j];
   -1  2744       axs.constants.addAllPropertiesToSet_(
   -1  2745           axs.constants.ARIA_ROLES[parentRoleName], propertiesName,
   -1  2746           propertiesSet);
   -1  2747     }
   -1  2748   }
   -1  2749 };
   -1  2750 
   -1  2751 // TODO make a AriaRole object etc.
   -1  2752 for (var roleName in axs.constants.ARIA_ROLES) {
   -1  2753     var role = axs.constants.ARIA_ROLES[roleName];
   -1  2754 
   -1  2755     var propertiesSet = {};
   -1  2756     axs.constants.addAllPropertiesToSet_(role, 'properties', propertiesSet);
   -1  2757     role['propertiesSet'] = propertiesSet;
   -1  2758 
   -1  2759     var requiredPropertiesSet = {};
   -1  2760     axs.constants.addAllPropertiesToSet_(role, 'requiredProperties', requiredPropertiesSet);
   -1  2761     role['requiredPropertiesSet'] = requiredPropertiesSet;
   -1  2762     var parentRolesSet = {};
   -1  2763     axs.constants.addAllParentRolesToSet_(role, parentRolesSet);
   -1  2764     role['allParentRolesSet'] = parentRolesSet;
   -1  2765     if ('widget' in parentRolesSet)
   -1  2766         axs.constants.WIDGET_ROLES[roleName] = role;
   -1  2767 }
   -1  2768 
   -1  2769 // BEGIN ARIA_PROPERTIES_AUTOGENERATED
   -1  2770 /** @type {Object.<string, Object>} */
   -1  2771 axs.constants.ARIA_PROPERTIES = {
   -1  2772     "activedescendant": {
   -1  2773         "type": "property",
   -1  2774         "valueType": "idref"
   -1  2775     },
   -1  2776     "atomic": {
   -1  2777         "defaultValue": "false",
   -1  2778         "type": "property",
   -1  2779         "valueType": "boolean"
   -1  2780     },
   -1  2781     "autocomplete": {
   -1  2782         "defaultValue": "none",
   -1  2783         "type": "property",
   -1  2784         "valueType": "token",
   -1  2785         "values": [
   -1  2786             "inline",
   -1  2787             "list",
   -1  2788             "both",
   -1  2789             "none"
   -1  2790         ]
   -1  2791     },
   -1  2792     "busy": {
   -1  2793         "defaultValue": "false",
   -1  2794         "type": "state",
   -1  2795         "valueType": "boolean"
   -1  2796     },
   -1  2797     "checked": {
   -1  2798         "defaultValue": "undefined",
   -1  2799         "type": "state",
   -1  2800         "valueType": "token",
   -1  2801         "values": [
   -1  2802             "true",
   -1  2803             "false",
   -1  2804             "mixed",
   -1  2805             "undefined"
   -1  2806         ]
   -1  2807     },
   -1  2808     "controls": {
   -1  2809         "type": "property",
   -1  2810         "valueType": "idref_list"
   -1  2811     },
   -1  2812     "describedby": {
   -1  2813         "type": "property",
   -1  2814         "valueType": "idref_list"
   -1  2815     },
   -1  2816     "disabled": {
   -1  2817         "defaultValue": "false",
   -1  2818         "type": "state",
   -1  2819         "valueType": "boolean"
   -1  2820     },
   -1  2821     "dropeffect": {
   -1  2822         "defaultValue": "none",
   -1  2823         "type": "property",
   -1  2824         "valueType": "token_list",
   -1  2825         "values": [
   -1  2826             "copy",
   -1  2827             "move",
   -1  2828             "link",
   -1  2829             "execute",
   -1  2830             "popup",
   -1  2831             "none"
   -1  2832         ]
   -1  2833     },
   -1  2834     "expanded": {
   -1  2835         "defaultValue": "undefined",
   -1  2836         "type": "state",
   -1  2837         "valueType": "token",
   -1  2838         "values": [
   -1  2839             "true",
   -1  2840             "false",
   -1  2841             "undefined"
   -1  2842         ]
   -1  2843     },
   -1  2844     "flowto": {
   -1  2845         "type": "property",
   -1  2846         "valueType": "idref_list"
   -1  2847     },
   -1  2848     "grabbed": {
   -1  2849         "defaultValue": "undefined",
   -1  2850         "type": "state",
   -1  2851         "valueType": "token",
   -1  2852         "values": [
   -1  2853             "true",
   -1  2854             "false",
   -1  2855             "undefined"
   -1  2856         ]
   -1  2857     },
   -1  2858     "haspopup": {
   -1  2859         "defaultValue": "false",
   -1  2860         "type": "property",
   -1  2861         "valueType": "boolean"
   -1  2862     },
   -1  2863     "hidden": {
   -1  2864         "defaultValue": "false",
   -1  2865         "type": "state",
   -1  2866         "valueType": "boolean"
   -1  2867     },
   -1  2868     "invalid": {
   -1  2869         "defaultValue": "false",
   -1  2870         "type": "state",
   -1  2871         "valueType": "token",
   -1  2872         "values": [
   -1  2873             "grammar",
   -1  2874             "false",
   -1  2875             "spelling",
   -1  2876             "true"
   -1  2877         ]
   -1  2878     },
   -1  2879     "label": {
   -1  2880         "type": "property",
   -1  2881         "valueType": "string"
   -1  2882     },
   -1  2883     "labelledby": {
   -1  2884         "type": "property",
   -1  2885         "valueType": "idref_list"
   -1  2886     },
   -1  2887     "level": {
   -1  2888         "type": "property",
   -1  2889         "valueType": "integer"
   -1  2890     },
   -1  2891     "live": {
   -1  2892         "defaultValue": "off",
   -1  2893         "type": "property",
   -1  2894         "valueType": "token",
   -1  2895         "values": [
   -1  2896             "off",
   -1  2897             "polite",
   -1  2898             "assertive"
   -1  2899         ]
   -1  2900     },
   -1  2901     "multiline": {
   -1  2902         "defaultValue": "false",
   -1  2903         "type": "property",
   -1  2904         "valueType": "boolean"
   -1  2905     },
   -1  2906     "multiselectable": {
   -1  2907         "defaultValue": "false",
   -1  2908         "type": "property",
   -1  2909         "valueType": "boolean"
   -1  2910     },
   -1  2911     "orientation": {
   -1  2912         "defaultValue": "vertical",
   -1  2913         "type": "property",
   -1  2914         "valueType": "token",
   -1  2915         "values": [
   -1  2916             "horizontal",
   -1  2917             "vertical"
   -1  2918         ]
   -1  2919     },
   -1  2920     "owns": {
   -1  2921         "type": "property",
   -1  2922         "valueType": "idref_list"
   -1  2923     },
   -1  2924     "posinset": {
   -1  2925         "type": "property",
   -1  2926         "valueType": "integer"
   -1  2927     },
   -1  2928     "pressed": {
   -1  2929         "defaultValue": "undefined",
   -1  2930         "type": "state",
   -1  2931         "valueType": "token",
   -1  2932         "values": [
   -1  2933             "true",
   -1  2934             "false",
   -1  2935             "mixed",
   -1  2936             "undefined"
   -1  2937         ]
   -1  2938     },
   -1  2939     "readonly": {
   -1  2940         "defaultValue": "false",
   -1  2941         "type": "property",
   -1  2942         "valueType": "boolean"
   -1  2943     },
   -1  2944     "relevant": {
   -1  2945         "defaultValue": "additions text",
   -1  2946         "type": "property",
   -1  2947         "valueType": "token_list",
   -1  2948         "values": [
   -1  2949             "additions",
   -1  2950             "removals",
   -1  2951             "text",
   -1  2952             "all"
   -1  2953         ]
   -1  2954     },
   -1  2955     "required": {
   -1  2956         "defaultValue": "false",
   -1  2957         "type": "property",
   -1  2958         "valueType": "boolean"
   -1  2959     },
   -1  2960     "selected": {
   -1  2961         "defaultValue": "undefined",
   -1  2962         "type": "state",
   -1  2963         "valueType": "token",
   -1  2964         "values": [
   -1  2965             "true",
   -1  2966             "false",
   -1  2967             "undefined"
   -1  2968         ]
   -1  2969     },
   -1  2970     "setsize": {
   -1  2971         "type": "property",
   -1  2972         "valueType": "integer"
   -1  2973     },
   -1  2974     "sort": {
   -1  2975         "defaultValue": "none",
   -1  2976         "type": "property",
   -1  2977         "valueType": "token",
   -1  2978         "values": [
   -1  2979             "ascending",
   -1  2980             "descending",
   -1  2981             "none",
   -1  2982             "other"
   -1  2983         ]
   -1  2984     },
   -1  2985     "valuemax": {
   -1  2986         "type": "property",
   -1  2987         "valueType": "decimal"
   -1  2988     },
   -1  2989     "valuemin": {
   -1  2990         "type": "property",
   -1  2991         "valueType": "decimal"
   -1  2992     },
   -1  2993     "valuenow": {
   -1  2994         "type": "property",
   -1  2995         "valueType": "decimal"
   -1  2996     },
   -1  2997     "valuetext": {
   -1  2998         "type": "property",
   -1  2999         "valueType": "string"
   -1  3000     }
   -1  3001 };
   -1  3002 // END ARIA_PROPERTIES_AUTOGENERATED
   -1  3003 
   -1  3004 (function() {
   -1  3005 // pull values lists into sets
   -1  3006 for (var propertyName in axs.constants.ARIA_PROPERTIES) {
   -1  3007     var propertyDetails = axs.constants.ARIA_PROPERTIES[propertyName];
   -1  3008     if (!propertyDetails.values)
   -1  3009         continue;
   -1  3010     var valuesSet = {};
   -1  3011     for (var i = 0; i < propertyDetails.values.length; i++)
   -1  3012         valuesSet[propertyDetails.values[i]] = true;
   -1  3013     propertyDetails.valuesSet = valuesSet;
   -1  3014 }
   -1  3015 })();
   -1  3016 
   -1  3017 /**
   -1  3018  * All of the states and properties which apply globally.
   -1  3019  * @type {Object<!string, !boolean>}
   -1  3020  */
   -1  3021 axs.constants.GLOBAL_PROPERTIES = axs.constants.ARIA_ROLES['roletype'].propertiesSet;
   -1  3022 
   -1  3023 /**
   -1  3024  * A constant indicating no role name.
   -1  3025  * @type {string}
   -1  3026  */
   -1  3027 axs.constants.NO_ROLE_NAME = ' ';
   -1  3028 
   -1  3029 /**
   -1  3030  * A mapping from ARIA role names to their message ids.
   -1  3031  * Copied from ChromeVox:
   -1  3032  * http://code.google.com/p/google-axs-chrome/source/browse/trunk/chromevox/common/aria_util.js
   -1  3033  * @type {Object.<string, string>}
   -1  3034  */
   -1  3035 axs.constants.WIDGET_ROLE_TO_NAME = {
   -1  3036   'alert' : 'aria_role_alert',
   -1  3037   'alertdialog' : 'aria_role_alertdialog',
   -1  3038   'button' : 'aria_role_button',
   -1  3039   'checkbox' : 'aria_role_checkbox',
   -1  3040   'columnheader' : 'aria_role_columnheader',
   -1  3041   'combobox' : 'aria_role_combobox',
   -1  3042   'dialog' : 'aria_role_dialog',
   -1  3043   'grid' : 'aria_role_grid',
   -1  3044   'gridcell' : 'aria_role_gridcell',
   -1  3045   'link' : 'aria_role_link',
   -1  3046   'listbox' : 'aria_role_listbox',
   -1  3047   'log' : 'aria_role_log',
   -1  3048   'marquee' : 'aria_role_marquee',
   -1  3049   'menu' : 'aria_role_menu',
   -1  3050   'menubar' : 'aria_role_menubar',
   -1  3051   'menuitem' : 'aria_role_menuitem',
   -1  3052   'menuitemcheckbox' : 'aria_role_menuitemcheckbox',
   -1  3053   'menuitemradio' : 'aria_role_menuitemradio',
   -1  3054   'option' : axs.constants.NO_ROLE_NAME,
   -1  3055   'progressbar' : 'aria_role_progressbar',
   -1  3056   'radio' : 'aria_role_radio',
   -1  3057   'radiogroup' : 'aria_role_radiogroup',
   -1  3058   'rowheader' : 'aria_role_rowheader',
   -1  3059   'scrollbar' : 'aria_role_scrollbar',
   -1  3060   'slider' : 'aria_role_slider',
   -1  3061   'spinbutton' : 'aria_role_spinbutton',
   -1  3062   'status' : 'aria_role_status',
   -1  3063   'tab' : 'aria_role_tab',
   -1  3064   'tabpanel' : 'aria_role_tabpanel',
   -1  3065   'textbox' : 'aria_role_textbox',
   -1  3066   'timer' : 'aria_role_timer',
   -1  3067   'toolbar' : 'aria_role_toolbar',
   -1  3068   'tooltip' : 'aria_role_tooltip',
   -1  3069   'treeitem' : 'aria_role_treeitem'
   -1  3070 };
   -1  3071 
   -1  3072 
   -1  3073 /**
   -1  3074  * @type {Object.<string, string>}
   -1  3075  * Copied from ChromeVox:
   -1  3076  * http://code.google.com/p/google-axs-chrome/source/browse/trunk/chromevox/common/aria_util.js
   -1  3077  */
   -1  3078 axs.constants.STRUCTURE_ROLE_TO_NAME = {
   -1  3079   'article' : 'aria_role_article',
   -1  3080   'application' : 'aria_role_application',
   -1  3081   'banner' : 'aria_role_banner',
   -1  3082   'columnheader' : 'aria_role_columnheader',
   -1  3083   'complementary' : 'aria_role_complementary',
   -1  3084   'contentinfo' : 'aria_role_contentinfo',
   -1  3085   'definition' : 'aria_role_definition',
   -1  3086   'directory' : 'aria_role_directory',
   -1  3087   'document' : 'aria_role_document',
   -1  3088   'form' : 'aria_role_form',
   -1  3089   'group' : 'aria_role_group',
   -1  3090   'heading' : 'aria_role_heading',
   -1  3091   'img' : 'aria_role_img',
   -1  3092   'list' : 'aria_role_list',
   -1  3093   'listitem' : 'aria_role_listitem',
   -1  3094   'main' : 'aria_role_main',
   -1  3095   'math' : 'aria_role_math',
   -1  3096   'navigation' : 'aria_role_navigation',
   -1  3097   'note' : 'aria_role_note',
   -1  3098   'region' : 'aria_role_region',
   -1  3099   'rowheader' : 'aria_role_rowheader',
   -1  3100   'search' : 'aria_role_search',
   -1  3101   'separator' : 'aria_role_separator'
   -1  3102 };
   -1  3103 
   -1  3104 
   -1  3105 /**
   -1  3106  * @type {Array.<Object>}
   -1  3107  * Copied from ChromeVox:
   -1  3108  * http://code.google.com/p/google-axs-chrome/source/browse/trunk/chromevox/common/aria_util.js
   -1  3109  */
   -1  3110 axs.constants.ATTRIBUTE_VALUE_TO_STATUS = [
   -1  3111   { name: 'aria-autocomplete', values:
   -1  3112       {'inline' : 'aria_autocomplete_inline',
   -1  3113        'list' : 'aria_autocomplete_list',
   -1  3114        'both' : 'aria_autocomplete_both'} },
   -1  3115   { name: 'aria-checked', values:
   -1  3116       {'true' : 'aria_checked_true',
   -1  3117        'false' : 'aria_checked_false',
   -1  3118        'mixed' : 'aria_checked_mixed'} },
   -1  3119   { name: 'aria-disabled', values:
   -1  3120       {'true' : 'aria_disabled_true'} },
   -1  3121   { name: 'aria-expanded', values:
   -1  3122       {'true' : 'aria_expanded_true',
   -1  3123        'false' : 'aria_expanded_false'} },
   -1  3124   { name: 'aria-invalid', values:
   -1  3125       {'true' : 'aria_invalid_true',
   -1  3126        'grammar' : 'aria_invalid_grammar',
   -1  3127        'spelling' : 'aria_invalid_spelling'} },
   -1  3128   { name: 'aria-multiline', values:
   -1  3129       {'true' : 'aria_multiline_true'} },
   -1  3130   { name: 'aria-multiselectable', values:
   -1  3131       {'true' : 'aria_multiselectable_true'} },
   -1  3132   { name: 'aria-pressed', values:
   -1  3133       {'true' : 'aria_pressed_true',
   -1  3134        'false' : 'aria_pressed_false',
   -1  3135        'mixed' : 'aria_pressed_mixed'} },
   -1  3136   { name: 'aria-readonly', values:
   -1  3137       {'true' : 'aria_readonly_true'} },
   -1  3138   { name: 'aria-required', values:
   -1  3139       {'true' : 'aria_required_true'} },
   -1  3140   { name: 'aria-selected', values:
   -1  3141       {'true' : 'aria_selected_true',
   -1  3142        'false' : 'aria_selected_false'} }
   -1  3143 ];
   -1  3144 
   -1  3145 /**
   -1  3146  * Copied from ChromeVox:
   -1  3147  * http://code.google.com/p/google-axs-chrome/source/browse/trunk/chromevox/common/dom_util.js
   -1  3148  * @type {Object}
   -1  3149  */
   -1  3150 axs.constants.INPUT_TYPE_TO_INFORMATION_TABLE_MSG = {
   -1  3151   'button' : 'input_type_button',
   -1  3152   'checkbox' : 'input_type_checkbox',
   -1  3153   'color' : 'input_type_color',
   -1  3154   'datetime' : 'input_type_datetime',
   -1  3155   'datetime-local' : 'input_type_datetime_local',
   -1  3156   'date' : 'input_type_date',
   -1  3157   'email' : 'input_type_email',
   -1  3158   'file' : 'input_type_file',
   -1  3159   'image' : 'input_type_image',
   -1  3160   'month' : 'input_type_month',
   -1  3161   'number' : 'input_type_number',
   -1  3162   'password' : 'input_type_password',
   -1  3163   'radio' : 'input_type_radio',
   -1  3164   'range' : 'input_type_range',
   -1  3165   'reset' : 'input_type_reset',
   -1  3166   'search' : 'input_type_search',
   -1  3167   'submit' : 'input_type_submit',
   -1  3168   'tel' : 'input_type_tel',
   -1  3169   'text' : 'input_type_text',
   -1  3170   'url' : 'input_type_url',
   -1  3171   'week' : 'input_type_week'
   -1  3172 };
   -1  3173 
   -1  3174 
   -1  3175 /**
   -1  3176  * Copied from ChromeVox:
   -1  3177  * http://code.google.com/p/google-axs-chrome/source/browse/trunk/chromevox/common/dom_util.js
   -1  3178  * @type {Object}
   -1  3179  */
   -1  3180 axs.constants.TAG_TO_INFORMATION_TABLE_VERBOSE_MSG = {
   -1  3181   'A' : 'tag_link',
   -1  3182   'BUTTON' : 'tag_button',
   -1  3183   'H1' : 'tag_h1',
   -1  3184   'H2' : 'tag_h2',
   -1  3185   'H3' : 'tag_h3',
   -1  3186   'H4' : 'tag_h4',
   -1  3187   'H5' : 'tag_h5',
   -1  3188   'H6' : 'tag_h6',
   -1  3189   'LI' : 'tag_li',
   -1  3190   'OL' : 'tag_ol',
   -1  3191   'SELECT' : 'tag_select',
   -1  3192   'TEXTAREA' : 'tag_textarea',
   -1  3193   'UL' : 'tag_ul',
   -1  3194   'SECTION' : 'tag_section',
   -1  3195   'NAV' : 'tag_nav',
   -1  3196   'ARTICLE' : 'tag_article',
   -1  3197   'ASIDE' : 'tag_aside',
   -1  3198   'HGROUP' : 'tag_hgroup',
   -1  3199   'HEADER' : 'tag_header',
   -1  3200   'FOOTER' : 'tag_footer',
   -1  3201   'TIME' : 'tag_time',
   -1  3202   'MARK' : 'tag_mark'
   -1  3203 };
   -1  3204 
   -1  3205 /**
   -1  3206  * Copied from ChromeVox:
   -1  3207  * http://code.google.com/p/google-axs-chrome/source/browse/trunk/chromevox/common/dom_util.js
   -1  3208  * @type {Object}
   -1  3209  */
   -1  3210 axs.constants.TAG_TO_INFORMATION_TABLE_BRIEF_MSG = {
   -1  3211   'BUTTON' : 'tag_button',
   -1  3212   'SELECT' : 'tag_select',
   -1  3213   'TEXTAREA' : 'tag_textarea'
   -1  3214 };
   -1  3215 
   -1  3216 axs.constants.MIXED_VALUES = {
   -1  3217     "true": true,
   -1  3218     "false": true,
   -1  3219     "mixed": true
   -1  3220 };
   -1  3221 
   -1  3222 /** @enum {string} */
   -1  3223 axs.constants.Severity = {
   -1  3224     INFO: 'Info',
   -1  3225     WARNING: 'Warning',
   -1  3226     SEVERE: 'Severe'
   -1  3227 };
   -1  3228 
   -1  3229 /** @enum {string} */
   -1  3230 axs.constants.AuditResult = {
   -1  3231     PASS: 'PASS',
   -1  3232     FAIL: 'FAIL',
   -1  3233     NA: 'NA'
   -1  3234 };
   -1  3235 
   -1  3236 /** @enum {boolean} */
   -1  3237 axs.constants.InlineElements = {
   -1  3238     // fontstyle
   -1  3239     'TT': true,
   -1  3240     'I': true,
   -1  3241     'B': true,
   -1  3242     'BIG': true,
   -1  3243     'SMALL': true,
   -1  3244 
   -1  3245     // phrase
   -1  3246     'EM': true,
   -1  3247     'STRONG': true,
   -1  3248     'DFN': true,
   -1  3249     'CODE': true,
   -1  3250     'SAMP': true,
   -1  3251     'KBD': true,
   -1  3252     'VAR': true,
   -1  3253     'CITE': true,
   -1  3254     'ABBR': true,
   -1  3255     'ACRONYM': true,
   -1  3256 
   -1  3257     // special
   -1  3258     'A': true,
   -1  3259     'IMG': true,
   -1  3260     'OBJECT': true,
   -1  3261     'BR': true,
   -1  3262     'SCRIPT': true,
   -1  3263     'MAP': true,
   -1  3264     'Q': true,
   -1  3265     'SUB': true,
   -1  3266     'SUP': true,
   -1  3267     'SPAN': true,
   -1  3268     'BDO': true,
   -1  3269 
   -1  3270     // formctrl
   -1  3271     'INPUT': true,
   -1  3272     'SELECT': true,
   -1  3273     'TEXTAREA': true,
   -1  3274     'LABEL': true,
   -1  3275     'BUTTON': true
   -1  3276  };
   -1  3277 
   -1  3278  /** @enum {boolean} */
   -1  3279 axs.constants.NATIVELY_DISABLEABLE = {
   -1  3280     // W3C and WHATWG https://html.spec.whatwg.org/#enabling-and-disabling-form-controls:-the-disabled-attribute
   -1  3281     'BUTTON': true,
   -1  3282     'INPUT': true,
   -1  3283     'SELECT': true,
   -1  3284     'TEXTAREA': true,
   -1  3285     'FIELDSET': true,
   -1  3286 
   -1  3287     // W3C http://www.w3.org/TR/html5/disabled-elements.html#disabled-elements
   -1  3288     'OPTGROUP': true,
   -1  3289     'OPTION': true
   -1  3290 };
   -1  3291 
   -1  3292 /**
   -1  3293  * Maps ARIA attributes to their exactly equivalent HTML attributes.
   -1  3294  * @type {Object.<string, string>}
   -1  3295  */
   -1  3296 axs.constants.ARIA_TO_HTML_ATTRIBUTE = {
   -1  3297   'aria-checked' : 'checked',
   -1  3298   'aria-disabled' : 'disabled',
   -1  3299   'aria-hidden' : 'hidden',
   -1  3300   'aria-expanded' : 'open',
   -1  3301   'aria-valuemax' : 'max',
   -1  3302   'aria-valuemin' : 'min',
   -1  3303   'aria-readonly' : 'readonly',
   -1  3304   'aria-required' : 'required',
   -1  3305   'aria-selected' : 'selected',
   -1  3306   'aria-valuenow' : 'value'
   -1  3307 };
   -1  3308 
   -1  3309 /**
   -1  3310  * Holds information about implicit ARIA semantics for a given HTML element type.
   -1  3311  * This object has the following properties:
   -1  3312  * <ul>
   -1  3313  * <li>`role` will contain the implicit role if it exists, otherwise empty string.</li>
   -1  3314  * <li>`allowed` contains the roles that can reasonably be applied to this element.
   -1  3315  *    Note: A tag that can take any role is signified by a '*' wildcard in the array. It is not
   -1  3316  *    an error if the array contains other roles but currently this has no meaning. In future it may
   -1  3317  *    be used to indicate recommended roles.
   -1  3318  * </li>
   -1  3319  * <li>`selector` is present if this is a 'subclass' of the base HTML element, i.e. its semantics are
   -1  3320  *    modified by context or attributes. It can be used with the selectors API to find and/or match
   -1  3321  *    elements.
   -1  3322  * </li>
   -1  3323  * <li>`reserved` will be true if this is a semantically strong element that you may not modify with any
   -1  3324  *    ARIA attributes, including role or global attributes.
   -1  3325  * </li>
   -1  3326  * </ul>
   -1  3327  *
   -1  3328  * @typedef {{ role: string,
   -1  3329  *             allowed: Array.<string>,
   -1  3330  *             selector: string,
   -1  3331  *             reserved:  boolean }}
   -1  3332  */
   -1  3333 axs.constants.HtmlInfo;
   -1  3334 /**
   -1  3335  * A lookup table which maps uppercase tagName to information about implicit ARIA semantics.
   -1  3336  * This table is based on the document: http://w3c.github.io/aria-in-html/
   -1  3337  * It is not complete and never can be. Complex scenarios require specific handling not provided here.
   -1  3338  * Any element not listed here:
   -1  3339  *    - has no implicit role
   -1  3340  *    - can take any role
   -1  3341  *    e.g. em,strong,small,s,cite,q,dfn,abbr,time,code,var,samp,kbd,sub and sup,i,b,u,mark ,ruby,rt,rp,bdi,bdo,br,wbr
   -1  3342  *
   -1  3343  * Where there is any ambiguity this table will endeavor to provide for the most broad case (to avoid
   -1  3344  *    false failures in conformance checking).
   -1  3345  *
   -1  3346  * For example 'table' can take any role however in practice it should only be given the role 'grid' when
   -1  3347  *    being used as a data grid or 'presentation' when used for layout. This lookup ignores these nuances and
   -1  3348  *    allows all roles.
   -1  3349  *
   -1  3350  * @type {Object.<string, Array.<axs.constants.HtmlInfo>>}
   -1  3351  */
   -1  3352 axs.constants.TAG_TO_IMPLICIT_SEMANTIC_INFO = {
   -1  3353     'A': [{
   -1  3354         role: 'link',
   -1  3355         allowed: [
   -1  3356         'button',
   -1  3357         'checkbox',
   -1  3358         'menuitem',
   -1  3359         'menuitemcheckbox',
   -1  3360         'menuitemradio',
   -1  3361         'tab',
   -1  3362         'treeitem'],
   -1  3363         selector: 'a[href]'
   -1  3364     }],
   -1  3365     'ADDRESS': [{
   -1  3366         role: '',
   -1  3367         allowed: [
   -1  3368         'contentinfo',
   -1  3369         'presentation']
   -1  3370     }],
   -1  3371     'AREA': [{
   -1  3372         role: 'link',
   -1  3373         selector: 'area[href]'
   -1  3374     }],
   -1  3375     'ARTICLE': [{
   -1  3376         role: 'article',
   -1  3377         allowed: [
   -1  3378         'presentation',
   -1  3379         'article',
   -1  3380         'document',
   -1  3381         'application',
   -1  3382         'main']
   -1  3383     }],
   -1  3384     'ASIDE': [{
   -1  3385         role: 'complementary',
   -1  3386         allowed: [
   -1  3387         'note',
   -1  3388         'complementary',
   -1  3389         'search',
   -1  3390         'presentation']
   -1  3391     }],
   -1  3392     'AUDIO': [{
   -1  3393         role: '',
   -1  3394         allowed: ['application', 'presentation']
   -1  3395     }],
   -1  3396     'BASE': [{
   -1  3397         role: '',
   -1  3398         reserved: true
   -1  3399     }],
   -1  3400     'BODY': [{
   -1  3401         role: 'document',
   -1  3402         allowed: ['presentation']
   -1  3403     }],
   -1  3404     'BUTTON': [{
   -1  3405         role: 'button',
   -1  3406         allowed: [
   -1  3407         'link',
   -1  3408         'menuitem',
   -1  3409         'menuitemcheckbox',
   -1  3410         'menuitemradio',
   -1  3411         'radio'],
   -1  3412         selector: 'button:not([aria-pressed]):not([type="menu"])'
   -1  3413     }, {
   -1  3414         role: 'button',
   -1  3415         allowed: ['button'],
   -1  3416         selector: 'button[aria-pressed]'
   -1  3417     }, {
   -1  3418         role: 'button',
   -1  3419         attributes: {
   -1  3420             'aria-haspopup': true
   -1  3421         },
   -1  3422         allowed: [
   -1  3423         'link',
   -1  3424         'menuitem',
   -1  3425         'menuitemcheckbox',
   -1  3426         'menuitemradio',
   -1  3427         'radio'],
   -1  3428         selector: 'button[type="menu"]'
   -1  3429     }],
   -1  3430     'CAPTION': [{
   -1  3431         role: '',
   -1  3432         allowed: ['presentation']
   -1  3433     }],
   -1  3434     'COL': [{
   -1  3435         role: '',
   -1  3436         reserved: true
   -1  3437     }],
   -1  3438     'COLGROUP': [{
   -1  3439         role: '',
   -1  3440         reserved: true
   -1  3441     }],
   -1  3442     'DATALIST': [{
   -1  3443         role: 'listbox',
   -1  3444         attributes: {
   -1  3445             'aria-multiselectable': false
   -1  3446         },
   -1  3447         allowed: ['presentation']
   -1  3448     }],
   -1  3449     'DEL': [{
   -1  3450         role: '',
   -1  3451         allowed: ['*']
   -1  3452     }],
   -1  3453     'DD': [{
   -1  3454         role: '',
   -1  3455         allowed: ['presentation']
   -1  3456     }],
   -1  3457     'DT': [{
   -1  3458         role: '',
   -1  3459         allowed: ['presentation']
   -1  3460     }],
   -1  3461     'DETAILS': [{
   -1  3462         role: 'group',
   -1  3463         allowed: [
   -1  3464         'group',
   -1  3465         'presentation']
   -1  3466     }],
   -1  3467     'DIALOG': [{  // updated 'allowed' from: http://www.w3.org/html/wg/drafts/html/master/interactive-elements.html#the-dialog-element
   -1  3468         role: 'dialog',
   -1  3469         allowed: ['dialog', 'alert', 'alertdialog', 'application', 'log', 'marquee', 'status'],
   -1  3470         selector: 'dialog[open]'
   -1  3471     }, {
   -1  3472         role: 'dialog',
   -1  3473         attributes: {
   -1  3474             'aria-hidden': true
   -1  3475         },
   -1  3476         allowed: ['dialog', 'alert', 'alertdialog', 'application', 'log', 'marquee', 'status'],
   -1  3477         selector: 'dialog:not([open])'
   -1  3478     }],
   -1  3479     'DIV': [{
   -1  3480         role: '',
   -1  3481         allowed: ['*']
   -1  3482     }],
   -1  3483     'DL': [{
   -1  3484         role: 'list',
   -1  3485         allowed: ['presentation']
   -1  3486     }],
   -1  3487     'EMBED': [{
   -1  3488         role: '',
   -1  3489         allowed: [
   -1  3490         'application',
   -1  3491         'document',
   -1  3492         'img',
   -1  3493         'presentation']
   -1  3494     }],
   -1  3495     'FIGURE': [{
   -1  3496         role: '',
   -1  3497         allowed: ['*']
   -1  3498     }],
   -1  3499     'FOOTER': [{
   -1  3500         role: '',
   -1  3501         allowed: ['contentinfo', 'presentation']
   -1  3502     }],
   -1  3503     'FORM': [{
   -1  3504         role: 'form',
   -1  3505         allowed: ['presentation']
   -1  3506     }],
   -1  3507     'P': [{
   -1  3508         role: '',
   -1  3509         allowed: ['*']
   -1  3510     }],
   -1  3511     'PRE': [{
   -1  3512         role: '',
   -1  3513         allowed: ['*']
   -1  3514     }],
   -1  3515     'BLOCKQUOTE': [{
   -1  3516         role: '',
   -1  3517         allowed: ['*']
   -1  3518     }],
   -1  3519     H1: [{
   -1  3520         role: 'heading'
   -1  3521     }],
   -1  3522     H2: [{
   -1  3523         role: 'heading'
   -1  3524     }],
   -1  3525     H3: [{
   -1  3526         role: 'heading'
   -1  3527     }],
   -1  3528     H4: [{
   -1  3529         role: 'heading'
   -1  3530     }],
   -1  3531     H5: [{
   -1  3532         role: 'heading'
   -1  3533     }],
   -1  3534     H6: [{
   -1  3535         role: 'heading'
   -1  3536     }],
   -1  3537     'HEAD': [{
   -1  3538         role: '',
   -1  3539         reserved: true
   -1  3540     }],
   -1  3541     'HEADER': [{
   -1  3542         role: '',
   -1  3543         allowed: [
   -1  3544         'banner',
   -1  3545         'presentation']
   -1  3546     }],
   -1  3547     'HR': [{
   -1  3548         role: 'separator',
   -1  3549         allowed: ['presentation']
   -1  3550     }],
   -1  3551     'HTML': [{
   -1  3552         role: '',
   -1  3553         reserved: true
   -1  3554     }],
   -1  3555     'IFRAME': [{
   -1  3556         role: '',
   -1  3557         allowed: [
   -1  3558         'application',
   -1  3559         'document',
   -1  3560         'img',
   -1  3561         'presentation'],
   -1  3562         selector: 'iframe:not([seamless])'
   -1  3563     }, {
   -1  3564         role: '',
   -1  3565         allowed: [
   -1  3566         'application',
   -1  3567         'document',
   -1  3568         'img',
   -1  3569         'presentation',
   -1  3570         'group'],
   -1  3571         selector: 'iframe[seamless]'
   -1  3572     }],
   -1  3573     'IMG': [{
   -1  3574         role: 'presentation',
   -1  3575         reserved: true,
   -1  3576         selector: 'img[alt=""]'
   -1  3577     }, {
   -1  3578         role: 'img',
   -1  3579         allowed: ['*'],
   -1  3580         selector: 'img[alt]:not([alt=""])'
   -1  3581     }],
   -1  3582     'INPUT': [{
   -1  3583         role: 'button',
   -1  3584         allowed: [
   -1  3585         'link',
   -1  3586         'menuitem',
   -1  3587         'menuitemcheckbox',
   -1  3588         'menuitemradio',
   -1  3589         'radio'],
   -1  3590         selector: 'input[type="button"]:not([aria-pressed])'
   -1  3591     }, {
   -1  3592         role: 'button',
   -1  3593         allowed: ['button'],
   -1  3594         selector: 'input[type="button"][aria-pressed]'
   -1  3595     }, {
   -1  3596         role: 'checkbox',
   -1  3597         allowed: ['checkbox'],
   -1  3598         selector: 'input[type="checkbox"]'
   -1  3599     }, {
   -1  3600         role: '',
   -1  3601         selector: 'input[type="color"]'
   -1  3602     }, {
   -1  3603         role: '',
   -1  3604         selector: 'input[type="date"]'
   -1  3605     }, {
   -1  3606         role: '',
   -1  3607         selector: 'input[type="datetime"]'
   -1  3608     }, {
   -1  3609         role: 'textbox',
   -1  3610         selector: 'input[type="email"]:not([list])'
   -1  3611     }, {
   -1  3612         role: '',
   -1  3613         selector: 'input[type="file"]'
   -1  3614     }, {
   -1  3615         role: '',
   -1  3616         reserved: true,
   -1  3617         selector: 'input[type="hidden"]'
   -1  3618     }, {
   -1  3619         role: 'button',
   -1  3620         allowed: ['button'],
   -1  3621         selector: 'input[type="image"][aria-pressed]'
   -1  3622     }, {
   -1  3623         role: 'button',
   -1  3624         allowed: [
   -1  3625         'link',
   -1  3626         'menuitem',
   -1  3627         'menuitemcheckbox',
   -1  3628         'menuitemradio',
   -1  3629         'radio'],
   -1  3630         selector: 'input[type="image"]:not([aria-pressed])'
   -1  3631     }, {
   -1  3632         role: '',
   -1  3633         selector: 'input[type="month"]'
   -1  3634     }, {
   -1  3635         role: '',
   -1  3636         selector: 'input[type="number"]'
   -1  3637     }, {
   -1  3638         role: 'textbox',
   -1  3639         selector: 'input[type="password"]'
   -1  3640     }, {
   -1  3641         role: 'radio',
   -1  3642         allowed: ['menuitemradio'],
   -1  3643         selector: 'input[type="radio"]'
   -1  3644     }, {
   -1  3645         role: 'slider',
   -1  3646         selector: 'input[type="range"]'
   -1  3647     }, {
   -1  3648         role: 'button',
   -1  3649         selector: 'input[type="reset"]'
   -1  3650     }, {
   -1  3651         role: 'combobox',  // aria-owns is set to the same value as the list attribute
   -1  3652         selector: 'input[type="search"][list]'
   -1  3653     }, {
   -1  3654         role: 'textbox',
   -1  3655         selector: 'input[type="search"]:not([list])'
   -1  3656     }, {
   -1  3657         role: 'button',
   -1  3658         selector: 'input[type="submit"]'
   -1  3659     }, {
   -1  3660         role: 'combobox',  // aria-owns is set to the same value as the list attribute
   -1  3661         selector: 'input[type="tel"][list]'
   -1  3662     }, {
   -1  3663         role: 'textbox',
   -1  3664         selector: 'input[type="tel"]:not([list])'
   -1  3665     }, {
   -1  3666         role: 'combobox',  // aria-owns is set to the same value as the list attribute
   -1  3667         selector: 'input[type="text"][list]'
   -1  3668     }, {
   -1  3669         role: 'textbox',
   -1  3670         selector: 'input[type="text"]:not([list])'
   -1  3671     }, {
   -1  3672         role: 'textbox',
   -1  3673         selector: 'input:not([type])'
   -1  3674     }, {
   -1  3675         role: '',
   -1  3676         selector: 'input[type="time"]'
   -1  3677     }, {
   -1  3678         role: 'combobox',  // aria-owns is set to the same value as the list attribute
   -1  3679         selector: 'input[type="url"][list]'
   -1  3680     }, {
   -1  3681         role: 'textbox',
   -1  3682         selector: 'input[type="url"]:not([list])'
   -1  3683     }, {
   -1  3684         role: '',
   -1  3685         selector: 'input[type="week"]'
   -1  3686     }],
   -1  3687     'INS': [{
   -1  3688         role: '',
   -1  3689         allowed: ['*']
   -1  3690     }],
   -1  3691     'KEYGEN': [{
   -1  3692         role: ''
   -1  3693     }],
   -1  3694     'LABEL': [{
   -1  3695         role: '',
   -1  3696         allowed: ['presentation']
   -1  3697     }],
   -1  3698     'LI': [{
   -1  3699         role: 'listitem',
   -1  3700         allowed: [
   -1  3701         'menuitem',
   -1  3702         'menuitemcheckbox',
   -1  3703         'menuitemradio',
   -1  3704         'option',
   -1  3705         'tab',
   -1  3706         'treeitem',
   -1  3707         'presentation'],
   -1  3708         selector: 'ol:not([role="presentation"])>li, ul:not([role="presentation"])>li'
   -1  3709     }, {
   -1  3710         role: 'listitem',
   -1  3711         allowed: [
   -1  3712         'listitem',
   -1  3713         'menuitem',
   -1  3714         'menuitemcheckbox',
   -1  3715         'menuitemradio',
   -1  3716         'option',
   -1  3717         'tab',
   -1  3718         'treeitem',
   -1  3719         'presentation'],
   -1  3720         selector: 'ol[role="presentation"]>li, ul[role="presentation"]>li'
   -1  3721     }],
   -1  3722     'LINK': [{
   -1  3723         role: 'link',
   -1  3724         reserved: true,
   -1  3725         selector: 'link[href]'
   -1  3726     }],
   -1  3727     'MAIN': [{
   -1  3728         role: '',
   -1  3729         allowed: [
   -1  3730         'main',
   -1  3731         'presentation']
   -1  3732     }],
   -1  3733     'MAP': [{
   -1  3734         role: '',
   -1  3735         reserved: true
   -1  3736     }],
   -1  3737     'MATH': [{
   -1  3738         role: '',
   -1  3739         allowed: ['presentation']
   -1  3740     }],
   -1  3741     'MENU': [{
   -1  3742         role: 'toolbar',
   -1  3743         selector: 'menu[type="toolbar"]'
   -1  3744     }],
   -1  3745     'MENUITEM': [{
   -1  3746         role: 'menuitem',
   -1  3747         selector: 'menuitem[type="command"]'
   -1  3748     }, {
   -1  3749         role: 'menuitemcheckbox',
   -1  3750         selector: 'menuitem[type="checkbox"]'
   -1  3751     }, {
   -1  3752         role: 'menuitemradio',
   -1  3753         selector: 'menuitem[type="radio"]'
   -1  3754     }],
   -1  3755     'META': [{
   -1  3756         role: '',
   -1  3757         reserved: true
   -1  3758     }],
   -1  3759     'METER': [{
   -1  3760         role: 'progressbar',
   -1  3761         allowed: ['presentation']
   -1  3762     }],
   -1  3763     'NAV': [{
   -1  3764         role: 'navigation',
   -1  3765         allowed: ['navigation', 'presentation']
   -1  3766     }],
   -1  3767     'NOSCRIPT': [{
   -1  3768         role: '',
   -1  3769         reserved: true
   -1  3770     }],
   -1  3771     'OBJECT': [{
   -1  3772         role: '',
   -1  3773         allowed: ['application', 'document', 'img', 'presentation']
   -1  3774     }],
   -1  3775     'OL': [{
   -1  3776         role: 'list',
   -1  3777         allowed: ['directory', 'group', 'listbox', 'menu', 'menubar', 'tablist', 'toolbar', 'tree', 'presentation']
   -1  3778     }],
   -1  3779     'OPTGROUP': [{
   -1  3780         role: '',
   -1  3781         allowed: ['presentation']
   -1  3782     }],
   -1  3783     'OPTION': [{
   -1  3784         role: 'option'
   -1  3785     }],
   -1  3786     'OUTPUT': [{
   -1  3787         role: 'status',
   -1  3788         allowed: ['*']
   -1  3789     }],
   -1  3790     'PARAM': [{
   -1  3791         role: '',
   -1  3792         reserved: true
   -1  3793     }],
   -1  3794     'PICTURE': [{
   -1  3795         role: '',
   -1  3796         reserved: true
   -1  3797     }],
   -1  3798     'PROGRESS': [{
   -1  3799         role: 'progressbar',
   -1  3800         allowed: ['presentation']
   -1  3801     }],
   -1  3802     'SCRIPT': [{
   -1  3803         role: '',
   -1  3804         reserved: true
   -1  3805     }],
   -1  3806     'SECTION': [{
   -1  3807         role: 'region',
   -1  3808         allowed: [
   -1  3809         'alert',
   -1  3810         'alertdialog',
   -1  3811         'application',
   -1  3812         'contentinfo',
   -1  3813         'dialog',
   -1  3814         'document',
   -1  3815         'log',
   -1  3816         'marquee',
   -1  3817         'search',
   -1  3818         'status',
   -1  3819         'presentation']
   -1  3820     }],
   -1  3821     'SELECT': [{
   -1  3822         role: 'listbox'
   -1  3823     }],
   -1  3824     'SOURCE': [{
   -1  3825         role: '',
   -1  3826         reserved: true
   -1  3827     }],
   -1  3828     'SPAN': [{
   -1  3829         role: '',
   -1  3830         allowed: ['*']
   -1  3831     }],
   -1  3832     'STYLE': [{
   -1  3833         role: '',
   -1  3834         reserved: true
   -1  3835     }],
   -1  3836     'SVG': [{
   -1  3837         role: '',
   -1  3838         allowed: [
   -1  3839         'application',
   -1  3840         'document',
   -1  3841         'img',
   -1  3842         'presentation']
   -1  3843     }],
   -1  3844     'SUMMARY': [{
   -1  3845         role: '',
   -1  3846         allowed: ['presentation']
   -1  3847     }],
   -1  3848     'TABLE': [{
   -1  3849         role: '',
   -1  3850         allowed: ['*']
   -1  3851     }],
   -1  3852     'TEMPLATE': [{
   -1  3853         role: '',
   -1  3854         reserved: true
   -1  3855     }],
   -1  3856     'TEXTAREA': [{
   -1  3857         role: 'textbox'
   -1  3858     }],
   -1  3859     'TBODY': [{
   -1  3860         role: 'rowgroup',
   -1  3861         allowed: ['*']
   -1  3862     }],
   -1  3863     'THEAD': [{
   -1  3864         role: 'rowgroup',
   -1  3865         allowed: ['*']
   -1  3866     }],
   -1  3867     'TFOOT': [{
   -1  3868         role: 'rowgroup',
   -1  3869         allowed: ['*']
   -1  3870     }],
   -1  3871     'TITLE': [{
   -1  3872         role: '',
   -1  3873         reserved: true
   -1  3874     }],
   -1  3875     'TD': [{
   -1  3876         role: '',
   -1  3877         allowed: ['*']
   -1  3878     }],
   -1  3879     'TH': [{
   -1  3880         role: '',
   -1  3881         allowed: ['*']
   -1  3882     }],
   -1  3883     'TR': [{
   -1  3884         role: '',
   -1  3885         allowed: ['*']
   -1  3886     }],
   -1  3887     'TRACK': [{
   -1  3888         role: '',
   -1  3889         reserved: true
   -1  3890     }],
   -1  3891     'UL': [{
   -1  3892         role: 'list',
   -1  3893         allowed: [
   -1  3894         'directory',
   -1  3895         'group',
   -1  3896         'listbox',
   -1  3897         'menu',
   -1  3898         'menubar',
   -1  3899         'tablist',
   -1  3900         'toolbar',
   -1  3901         'tree',
   -1  3902         'presentation']
   -1  3903     }],
   -1  3904     'VIDEO': [{
   -1  3905         role: '',
   -1  3906         allowed: ['application', 'presentation']
   -1  3907     }]
   -1  3908 };
   -1  3909 
   -1  3910 },{}],7:[function(require,module,exports){
 2225  3911 // Copyright 2015 Google Inc.
 2226  3912 //
 2227  3913 // Licensed under the Apache License, Version 2.0 (the "License");
@@ -2435,7 +4121,7 @@ axs.dom.composedTreeSearch = function(node, end, callbacks, parentFlags, opt_sha
 2435  4121     return found;
 2436  4122 };
 2437  4123 
 2438    -1 },{}],7:[function(require,module,exports){
   -1  4124 },{}],8:[function(require,module,exports){
 2439  4125 // Copyright 2012 Google Inc.
 2440  4126 //
 2441  4127 // Licensed under the Apache License, Version 2.0 (the "License");
@@ -3364,7 +5050,7 @@ axs.properties.getNativelySupportedAttributes = function(element) {
 3364  5050     };
 3365  5051 })();
 3366  5052 
 3367    -1 },{}],8:[function(require,module,exports){
   -1  5053 },{}],9:[function(require,module,exports){
 3368  5054 var query = require('./lib/query.js');
 3369  5055 var name = require('./lib/name.js');
 3370  5056 
@@ -3380,7 +5066,7 @@ module.exports = {
 3380  5066 	closest: query.closest,
 3381  5067 };
 3382  5068 
 3383    -1 },{"./lib/name.js":10,"./lib/query.js":11}],9:[function(require,module,exports){
   -1  5069 },{"./lib/name.js":11,"./lib/query.js":12}],10:[function(require,module,exports){
 3384  5070 exports.attributes = {
 3385  5071 	// widget
 3386  5072 	'autocomplete': 'token',
@@ -3644,6 +5330,8 @@ exports.subRoles = {};
 3644  5330 for (var role in subRoles) {
 3645  5331 	exports.subRoles[role] = getSubRoles(role);
 3646  5332 }
   -1  5333 exports.subRoles['none'] = ['none', 'presentation'];
   -1  5334 exports.subRoles['presentation'] = ['presentation', 'none'];
 3647  5335 
 3648  5336 exports.nameFromContents = [
 3649  5337 	'button',
@@ -3682,7 +5370,7 @@ exports.labelable = [
 3682  5370 	'textarea',
 3683  5371 ];
 3684  5372 
 3685    -1 },{}],10:[function(require,module,exports){
   -1  5373 },{}],11:[function(require,module,exports){
 3686  5374 var constants = require('./constants.js');
 3687  5375 var query = require('./query.js');
 3688  5376 
@@ -3733,12 +5421,12 @@ var getLabelNode = function(node) {
 3733  5421 		}
 3734  5422 	}
 3735  5423 
 3736    -1 	var p = node.parentNode;
   -1  5424 	var p = node.parentElement;
 3737  5425 	while (p) {
 3738    -1 		if (p.tagName === 'LABEL') {
   -1  5426 		if (p.tagName.toLowerCase() === 'label') {
 3739  5427 			return p;
 3740  5428 		}
 3741    -1 		p = p.parentNode;
   -1  5429 		p = p.parentElement;
 3742  5430 	}
 3743  5431 };
 3744  5432 
@@ -3767,8 +5455,8 @@ var getName = function(el, recursive, referenced) {
 3767  5455 	if (!query.matches(el, 'presentation')) {
 3768  5456 		if (!ret && isLabelable(el)) {
 3769  5457 			var label = getLabelNode(el);
 3770    -1 			if (label) {
 3771    -1 				ret = getName(label, recursive, label);
   -1  5458 			if (!recursive && label) {
   -1  5459 				ret = getName(label, true, label);
 3772  5460 			}
 3773  5461 		}
 3774  5462 		if (!ret) {
@@ -3781,9 +5469,16 @@ var getName = function(el, recursive, referenced) {
 3781  5469 		// caption
 3782  5470 		// table
 3783  5471 	}
 3784    -1 	if (!ret) {
 3785    -1 		// FIXME: distinguish different input types
 3786    -1 		ret = el.value;
   -1  5472 	// FIXME only if this is embedded in a label
   -1  5473 	if (!ret && query.matches(el, 'input')) {
   -1  5474 		// combobox
   -1  5475 		// button
   -1  5476 		if (query.matches(el, 'range')) {
   -1  5477 			ret = query.getAttribute(el, 'valuetext') || query.getAttribute(el, 'valuenow') || el.value;
   -1  5478 		} else {
   -1  5479 			ret = el.value;
   -1  5480 		}
   -1  5481 		ret = '' + ret;
 3787  5482 	}
 3788  5483 	if (!ret && (recursive || allowNameFromContent(el))) {
 3789  5484 		ret = getContent(el, referenced);
@@ -3811,7 +5506,7 @@ var getDescription = function(el) {
 3811  5506 		ret = el.placeholder;
 3812  5507 	}
 3813  5508 
 3814    -1 	return ret;
   -1  5509 	return (ret || '').trim().replace(/\s+/g, ' ');
 3815  5510 };
 3816  5511 
 3817  5512 module.exports = {
@@ -3819,7 +5514,7 @@ module.exports = {
 3819  5514 	getDescription: getDescription,
 3820  5515 };
 3821  5516 
 3822    -1 },{"./constants.js":9,"./query.js":11}],11:[function(require,module,exports){
   -1  5517 },{"./constants.js":10,"./query.js":12}],12:[function(require,module,exports){
 3823  5518 var constants = require('./constants.js');
 3824  5519 var util = require('./util.js');
 3825  5520 
@@ -3885,7 +5580,7 @@ var getAttribute = function(el, key, _hiddenRoot) {
 3885  5580 
 3886  5581 	if (key === 'level') {
 3887  5582 		for (var i = 1; i <= 6; i++) {
 3888    -1 			if (el.tagName === 'H' + i) {
   -1  5583 			if (el.tagName.toLowerCase() === 'h' + i) {
 3889  5584 				return i;
 3890  5585 			}
 3891  5586 		}
@@ -3927,7 +5622,7 @@ var matches = function(el, selector) {
 3927  5622 	} else {
 3928  5623 		var candidates = getSubRoles(selector.split(','));
 3929  5624 		actual = _getRole(el, candidates);
 3930    -1 		return candidates.indexOf(actual) != -1;
   -1  5625 		return candidates.indexOf(actual) !== -1;
 3931  5626 	}
 3932  5627 };
 3933  5628 
@@ -3966,7 +5661,7 @@ module.exports = {
 3966  5661 	closest: closest,
 3967  5662 };
 3968  5663 
 3969    -1 },{"./constants.js":9,"./util.js":12}],12:[function(require,module,exports){
   -1  5664 },{"./constants.js":10,"./util.js":13}],13:[function(require,module,exports){
 3970  5665 var walkDOM = function(root, fn) {
 3971  5666 	if (fn(root) === false) {
 3972  5667 		return false;
@@ -3996,7 +5691,7 @@ module.exports = {
 3996  5691 	searchUp: searchUp,
 3997  5692 };
 3998  5693 
 3999    -1 },{}],13:[function(require,module,exports){
   -1  5694 },{}],14:[function(require,module,exports){
 4000  5695 /*! aXe v2.6.1
 4001  5696  * Copyright (c) 2017 Deque Systems, Inc.
 4002  5697  *
@@ -12856,7 +14551,7 @@ module.exports = {
12856 14551     }()
12857 14552   });
12858 14553 })(typeof window === 'object' ? window : this);
12859    -1 },{}],14:[function(require,module,exports){
   -1 14554 },{}],15:[function(require,module,exports){
12860 14555 var ariaApi = require('aria-api');
12861 14556 var accdc = require('../lib/accdc');
12862 14557 var axe = require('axe-core');
@@ -12866,24 +14561,40 @@ var form = document.querySelector('#ba-form');
12866 14561 var preview = document.querySelector('#ba-preview');
12867 14562 var results = document.querySelector('#ba-results');
12868 14563 
   -1 14564 var ex = function(fn, args, _this) {
   -1 14565 	try {
   -1 14566 		return fn.apply(_this, args);
   -1 14567 	} catch (error) {
   -1 14568 		return error;
   -1 14569 	}
   -1 14570 };
   -1 14571 
12869 14572 var implementations = {
12870 14573 	'aria-api': function(el) {
12871 14574 		return {
12872    -1 			name: ariaApi.getName(el),
12873    -1 			desc: ariaApi.getDescription(el)
   -1 14575 			name: ex(ariaApi.getName, [el]),
   -1 14576 			desc: ex(ariaApi.getDescription, [el]),
   -1 14577 			role: ex(ariaApi.getRole, [el]),
12874 14578 		};
12875 14579 	},
12876 14580 	'accdc': accdc.calcNames,
12877 14581 	'axe': function(el) {
12878 14582 		return {
12879    -1 			name: axe.commons.text.accessibleText(el),
12880    -1 			desc: null,
   -1 14583 			name: ex(axe.commons.text.accessibleText, [el]),
   -1 14584 			desc: '-',
   -1 14585 			role: el.getAttribute('role') || ex(axe.commons.aria.implicitRole, [el]),
12881 14586 		};
12882 14587 	},
12883 14588 	'axs': function(el) {
12884 14589 		return {
12885    -1 			name: axs.properties.findTextAlternatives(el, {}),
12886    -1 			desc: null,
   -1 14590 			name: ex(axs.properties.findTextAlternatives, [el, {}]),
   -1 14591 			desc: '-',
   -1 14592 			role: ex(function() {
   -1 14593 				var roles = axs.utils.getRoles(el, true);
   -1 14594 				if (roles) {
   -1 14595 					return roles.roles.map(x => x.name).join(' ');
   -1 14596 				}
   -1 14597 			})
12887 14598 		};
12888 14599 	},
12889 14600 };
@@ -12899,24 +14610,15 @@ var run = function(html) {
12899 14610 	results.innerHTML = '';
12900 14611 
12901 14612 	return Promise.all(Object.keys(implementations).map(function(key) {
12902    -1 		var promise;
12903    -1 
12904    -1 		try {
12905    -1 			p = implementations[key](preview);
12906    -1 			promise = Promise.resolve(p);
12907    -1 		} catch (error) {
12908    -1 			promise = Promise.resolve({
12909    -1 				name: error,
12910    -1 				description: error,
12911    -1 			});
12912    -1 		}
   -1 14613 		var p = implementations[key](preview.children[0] || preview);
12913 14614 
12914    -1 		return promise.then(function(result) {
   -1 14615 		return Promise.resolve(p).then(function(result) {
12915 14616 			var tr = document.createElement('tr');
12916 14617 
12917 14618 			tr.appendChild(createTd(key));
12918 14619 			tr.appendChild(createTd(result.name));
12919 14620 			tr.appendChild(createTd(result.desc));
   -1 14621 			tr.appendChild(createTd(result.role));
12920 14622 
12921 14623 			results.appendChild(tr);
12922 14624 		});
@@ -12943,4 +14645,4 @@ var resize = function(event) {
12943 14645 form.input.addEventListener('keydown', resize);
12944 14646 resize({target: form.input});
12945 14647 
12946    -1 },{"../lib/accdc":1,"../lib/axs":2,"aria-api":8,"axe-core":13}]},{},[14]);
   -1 14648 },{"../lib/accdc":1,"../lib/axs":2,"aria-api":9,"axe-core":14}]},{},[15]);