aria-api

access ARIA information from JavaScript
git clone https://git.ce9e.org/aria-api.git

commit
7dc21772d888acab74c362d9070bc3c2eb58075c
parent
1d6c96ad81713cf8a2f8716d2c4f7b7efbe3bbcd
Author
Tobias Bengfort <tobias.bengfort@posteo.de>
Date
2024-02-03 10:41
wpt: add more test suites

Diffstat

M test/test-wpt.js 28 +++++++++++++++++++++++++++-
M test/wpt.js 150 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
M wpt.py 32 +++++++++++++++++++++++++-------

3 files changed, 202 insertions, 8 deletions


diff --git a/test/test-wpt.js b/test/test-wpt.js

@@ -3,8 +3,34 @@
    3     3 describe('wpt', () => {
    4     4 	var testbed = document.createElement('div');
    5     5 	var known_failing = [
   -1     6 		// whitespace
    6     7 		'Name test case 660',
    7     8 		'Name test case 659',
   -1     9 
   -1    10 		'el-form',  // <form> should always have the role form, but only be exposed as a landmark if it also has a name
   -1    11 		'el-th',  // incomplete selectors for columnheader
   -1    12 
   -1    13 		// name required
   -1    14 		'fallback role w/ region with no label',
   -1    15 		'form without label',
   -1    16 		'region without label',
   -1    17 
   -1    18 		// role conflicts
   -1    19 		'focusable heading role none with tabindex=-1',
   -1    20 		'focusable heading role none with tabindex=0',
   -1    21 		'heading role none with global attr aria-label',
   -1    22 		'p role none with global attr aria-label (prohibited role)',
   -1    23 
   -1    24 		// required parents
   -1    25 		'orphaned columnheader outside the context of row',
   -1    26 		'orphaned rowheader outside the context of row',
   -1    27 		'orphaned gridcell outside the context of row',
   -1    28 		'orphaned option outside the context of listbox',
   -1    29 
   -1    30 		// complectaed generic selectors
   -1    31 		'el-aside-in-section-without-name',
   -1    32 		'el-footer',
   -1    33 		'el-header',
    8    34 	];
    9    35 
   10    36 	var withId = function(element, fn) {
@@ -29,7 +55,7 @@ describe('wpt', () => {
   29    55 					'html': testbed.innerHTML,
   30    56 					'name': element.dataset.expectedlabel,
   31    57 					'description': element.dataset.expecteddescription,
   32    -1 					'role': element.dataset.expectedrole,
   -1    58 					'role': element.dataset.expectedrole ?? data.role,
   33    59 					'selector': `#${element.id}`,
   34    60 				});
   35    61 			});

diff --git a/test/wpt.js b/test/wpt.js

@@ -1162,3 +1162,153 @@ window.wpt["accname"] = [
 1162  1162 		"selector": ".ex"
 1163  1163 	}
 1164  1164 ];
   -1  1165 window.wpt["wai-aria"] = [
   -1  1166 	{
   -1  1167 		"filename": "invalid-roles.html",
   -1  1168 		"title": "Invalid Role Verification Tests",
   -1  1169 		"html": "<p>Verifies Invalid Roles from <a href=\"https://w3c.github.io/aria/#document-handling_author-errors_roles\">9.1 Roles - handling author errors</a></p>\n\n<nav role=\"foo\" data-testname=\"invalid role name foo\" data-expectedrole=\"navigation\" class=\"ex\">x</nav>\n<nav role=\"foo bar\" data-testname=\"multiple invalid role names\" data-expectedrole=\"navigation\" class=\"ex\">x</nav>\n\n<!-- todo: additional invalid roles:\n\n- whitespace tests (including line breaks, tabs, zero-width space, braille space)\n- diacritics\n- zero-width joiners (e.g. ZWJ like emoji variants use)\n- non-western chars\n- RTL strings (Hebrew & Arabic)\n- escaped chars, URL-encoded chars\n- backslash closing quote and other obvious hack attempts\n- etc.\n\n-->",
   -1  1170 		"selector": ".ex"
   -1  1171 	},
   -1  1172 	{
   -1  1173 		"filename": "list-roles.html",
   -1  1174 		"title": "List-related Role Verification Tests",
   -1  1175 		"html": "<p>Tests <a href=\"https://w3c.github.io/aria/#list\">list</a> and related roles.</p>\n\n<div role=\"list\" data-testname=\"first simple list\" data-expectedrole=\"list\" class=\"ex\">\n  <div role=\"listitem\" data-testname=\"first simple listitem\" data-expectedrole=\"listitem\" class=\"ex\">x</div>\n  <div role=\"listitem\" data-testname=\"last simple listitem\" data-expectedrole=\"listitem\" class=\"ex\">x</div>\n</div>",
   -1  1176 		"selector": ".ex"
   -1  1177 	},
   -1  1178 	{
   -1  1179 		"filename": "synonym-roles.html",
   -1  1180 		"title": "Region Role Verification Tests",
   -1  1181 		"html": "<p>Tests synonym roles image/img and none/presentation via <a href=\"https://w3c.github.io/core-aam/#roleMappingComputedRole\">Core-AAM Computed Role</a>.</p>\n\n<!-- spec resolution https://github.com/w3c/core-aam/issues/166 -->\n\n<div role=\"none\" id=\"none\" data-expectedrole=\"none\" data-testname=\"none role == computedrole none\" class=\"ex\">x</div><!-- preferred -->\n<div role=\"presentation\" id=\"presentation\" data-expectedrole=\"none\" data-testname=\"synonym presentation role == computedrole none\" class=\"ex\">x</div><!-- synonym -->\n\n<div role=\"image\" id=\"image\" data-expectedrole=\"image\" data-testname=\"image role == computedrole image\" class=\"ex\">x</div><!-- preferred -->\n<div role=\"img\" id=\"img\" data-expectedrole=\"image\" data-testname=\"synonym img role == computedrole image\" class=\"ex\">x</div><!-- synonym -->\n\n<!-- `directory` synonym deprecated in ARIA 1.2; these examples should all return computedrole `list` -->\n<ul role=\"list\" id=\"list2\" data-expectedrole=\"list\" data-testname=\"list role == computedrole list\" class=\"ex\"><li>x</li></ul>\n<ul role=\"directory\" id=\"directory\" data-expectedrole=\"list\" data-testname=\"directory role == computedrole list\" class=\"ex\"><li>x</li></ul>\n<div role=\"directory\" id=\"div\" data-expectedrole=\"list\" data-testname=\"div w/directory role == computedrole list\" class=\"ex\"><div role=\"listitem\">x</div></div>",
   -1  1182 		"selector": ".ex"
   -1  1183 	},
   -1  1184 	{
   -1  1185 		"filename": "region-roles.html",
   -1  1186 		"title": "Region Role Verification Tests",
   -1  1187 		"html": "<p>Tests <a href=\"https://w3c.github.io/aria/#region\">region</a> and related roles, as well as the \"name from author\" rule in <a href=\"https://w3c.github.io/aria/#document-handling_author-errors_roles\">9.1 Roles - handling author errors</a>.</p>\n\n<!-- no label -->\n<nav role=\"region\" data-testname=\"region without label\" data-expectedrole=\"navigation\" class=\"ex\">x</nav>\n\n<!-- w/ label -->\n<nav role=\"region\" data-testname=\"region with label\" data-expectedrole=\"region\" aria-label=\"x\" class=\"ex\">x</nav>",
   -1  1188 		"selector": ".ex"
   -1  1189 	},
   -1  1190 	{
   -1  1191 		"filename": "form-roles.html",
   -1  1192 		"title": "Form Role Verification Tests",
   -1  1193 		"html": "<p>Verifies <a href=\"https://w3c.github.io/aria/#document-handling_author-errors_roles\">9.1 Roles - handling author errors</a> and the <a href=\"https://w3c.github.io/aria/#form\">form</a> role.</p>\n\n\n<!-- no label -->\n<nav role=\"form\" data-testname=\"form without label\" data-expectedrole=\"navigation\" class=\"ex\">x</nav>\n\n<!-- w/ label -->\n<nav role=\"form\" data-testname=\"form with label\" data-expectedrole=\"form\" aria-label=\"x\" class=\"ex\">x</nav>",
   -1  1194 		"selector": ".ex"
   -1  1195 	},
   -1  1196 	{
   -1  1197 		"filename": "listbox-roles.html",
   -1  1198 		"title": "Listbox-related Role Verification Tests",
   -1  1199 		"html": "<p>Tests <a href=\"https://w3c.github.io/aria/#listbox\">listbox</a> and related roles.</p>\n\n<div role=\"listbox\" data-testname=\"div role is listbox\" data-expectedrole=\"listbox\" class=\"ex\">\n    <div role=\"option\" data-testname=\"role is option (in div listbox)\" data-expectedrole=\"option\" class=\"ex\">x</div>\n    <div role=\"group\" data-testname=\"role is group (in div listbox)\" data-expectedrole=\"group\" class=\"ex\">\n        <span role=\"option\" data-testname=\"role is option (in group, in div listbox)\" data-expectedrole=\"option\" class=\"ex\">x</span>\n        <span role=\"option\">x</span>\n    </div>\n    <div role=\"option\">x</div>\n</div>\n\n<ul role=\"listbox\" data-testname=\"ul role is listbox\" data-expectedrole=\"listbox\" class=\"ex\">\n    <li role=\"option\" data-testname=\"li role is option (in ul listbox)\" data-expectedrole=\"option\" class=\"ex\">\n        x\n    </li>\n    <li role=\"option\">\n        x\n    </li>\n</ul>\n\n<nav role=\"option\" data-testname=\"orphaned option outside the context of listbox\" data-expectedrole=\"navigation\"\n     class=\"ex\">x\n</nav>",
   -1  1200 		"selector": ".ex"
   -1  1201 	},
   -1  1202 	{
   -1  1203 		"filename": "grid-roles.html",
   -1  1204 		"title": "Grid Role Verification Tests",
   -1  1205 		"html": "<p>Tests <a href=\"https://w3c.github.io/aria/#grid\">grid</a> and related roles.</p>\n\n  <div role=\"grid\" data-testname=\"role is grid\" data-expectedrole=\"grid\" class=\"ex\">\n    <div role=\"row\" data-testname=\"role is row (in grid)\" data-expectedrole=\"row\" class=\"ex\">\n      <span role=\"columnheader\" data-testname=\"role is columnheader (in row, in grid)\" data-expectedrole=\"columnheader\" class=\"ex\">x</span>\n      <span role=\"columnheader\">x</span>\n    </div>\n    <div role=\"row\">\n      <span role=\"rowheader\" data-testname=\"role is rowheader (in row, in grid)\" data-expectedrole=\"rowheader\" class=\"ex\">x</span>\n      <span role=\"gridcell\" data-testname=\"role is gridcell (in row, in grid)\" data-expectedrole=\"gridcell\" class=\"ex\">x</span>\n    </div>\n  </div>\n\n  <div role=\"grid\">\n    <div role=\"rowgroup\" data-testname=\"role is rowgroup (in grid)\" data-expectedrole=\"rowgroup\" class=\"ex\">\n      <div role=\"row\" data-testname=\"role is row (in rowgroup, in grid)\" data-expectedrole=\"row\" class=\"ex\">\n        <span role=\"columnheader\" data-testname=\"role is columnheader (in row, in rowgroup, in grid)\" data-expectedrole=\"columnheader\" class=\"ex\">x</span>\n        <span role=\"columnheader\">x</span>\n        <span role=\"columnheader\">x</span>\n      </div>\n    </div>\n    <div role=\"rowgroup\">\n      <div role=\"row\">\n        <span role=\"rowheader\" data-testname=\"role is rowheader (in row, in rowgroup, in grid)\" data-expectedrole=\"rowheader\" class=\"ex\">x</span>\n        <span role=\"gridcell\" data-testname=\"role is gridcell (in row, in rowgroup, in grid)\" data-expectedrole=\"gridcell\" class=\"ex\">x</span>\n        <span role=\"gridcell\">x</span>\n      </div>\n    </div>\n  </div>\n\n  <div role=\"gridcell\" data-testname=\"orphaned gridcell outside the context of row\" data-expectedrole=\"none\" class=\"ex\">x</div>\n  <div role=\"rowheader\" data-testname=\"orphaned rowheader outside the context of row\" data-expectedrole=\"none\" class=\"ex\">x</div>\n  <div role=\"columnheader\" data-testname=\"orphaned columnheader outside the context of row\" data-expectedrole=\"none\" class=\"ex\">x</div>",
   -1  1206 		"selector": ".ex"
   -1  1207 	},
   -1  1208 	{
   -1  1209 		"filename": "role_none_conflict_resolution.html",
   -1  1210 		"title": "Role None Conflict Resolution Verification Tests",
   -1  1211 		"html": "<p>Verifies <a href=\"https://w3c.github.io/aria/#conflict_resolution_presentation_none\"></a>conflict resolution</a> requirements for the ARIA <a href=\"https://w3c.github.io/aria/#none\">none</a> and <a href=\"https://w3c.github.io/aria/#presentation\">presentation</a> roles.</p>\n\n<!-- none with label(global) on header -->\n<h1 role=\"none\" data-testname=\"heading role none with global attr aria-label\" data-expectedrole=\"heading\" aria-label=\"x\" class=\"ex\">x</h1>\n\n<!-- none with label(global) on paragraph -->\n<p role=\"none\" data-testname=\"p role none with global attr aria-label (prohibited role)\" data-expectedrole=\"paragraph\" aria-label=\"x\" class=\"ex\">x</p>\n<p role=\"none\" data-testname=\"p role none without global attr aria-label (prohibited role)\" data-expectedrole=\"none\" class=\"ex\">x</p>\n\n<!-- none with focusable header -->\n<h1 role=\"none\" data-testname=\"focusable heading role none with tabindex=0\" data-expectedrole=\"heading\" tabindex=\"0\" class=\"ex\">x</h1>\n<h1 role=\"none\" data-testname=\"focusable heading role none with tabindex=-1\" data-expectedrole=\"heading\" tabindex=\"-1\" class=\"ex\">x</h1>\n<h1 role=\"none\" data-testname=\"non-focusable heading role none\" data-expectedrole=\"none\" class=\"ex\">x</h1>\n\n<!-- none with non-global-->\n<h1 role=\"none\" data-testname=\"none with non-global\" data-expectedrole=\"none\" class=\"ex\" aria-level=\"2\"> Sample Content </h1>",
   -1  1212 		"selector": ".ex"
   -1  1213 	},
   -1  1214 	{
   -1  1215 		"filename": "abstract-roles.html",
   -1  1216 		"title": "Abstract Role Verification Tests",
   -1  1217 		"html": "<p>Tests <a href=\"https://w3c.github.io/aria/#abstract_roles\">Abstract Roles</a> and related <a href=\"https://w3c.github.io/aria/#document-handling_author-errors_roles\">9.1 Roles - handling author errors</a></p>\n\n  <nav role=\"command\" data-testname=\"command role\" data-expectedrole=\"navigation\" class=\"ex\">x</nav>\n  <nav role=\"composite\" data-testname=\"composite role\" data-expectedrole=\"navigation\" class=\"ex\">x</nav>\n  <nav role=\"input\" data-testname=\"input role\" data-expectedrole=\"navigation\" class=\"ex\">x</nav>\n  <nav role=\"landmark\" data-testname=\"landmark role\" data-expectedrole=\"navigation\" class=\"ex\">x</nav>\n  <nav role=\"range\" data-testname=\"range role\" data-expectedrole=\"navigation\" class=\"ex\">x</nav>\n  <nav role=\"roletype\" data-testname=\"roletype role\" data-expectedrole=\"navigation\" class=\"ex\">x</nav>\n  <nav role=\"section\" data-testname=\"section role\" data-expectedrole=\"navigation\" class=\"ex\">x</nav>\n  <nav role=\"sectionhead\" data-testname=\"sectionhead role\" data-expectedrole=\"navigation\" class=\"ex\">x</nav>\n  <nav role=\"select\" data-testname=\"select role\" data-expectedrole=\"navigation\" class=\"ex\">x</nav>\n  <nav role=\"structure\" data-testname=\"structure role\" data-expectedrole=\"navigation\" class=\"ex\">x</nav>\n  <nav role=\"widget\" data-testname=\"widget role\" data-expectedrole=\"navigation\" class=\"ex\">x</nav>\n  <nav role=\"window\" data-testname=\"window role\" data-expectedrole=\"navigation\" class=\"ex\">x</nav>",
   -1  1218 		"selector": ".ex"
   -1  1219 	},
   -1  1220 	{
   -1  1221 		"filename": "fallback-roles.html",
   -1  1222 		"title": "Fallback Role Verification Tests",
   -1  1223 		"html": "<p>Tests <a href=\"https://w3c.github.io/aria/#host_general_role\">8.1 Role Attribute</a> role token list selection and <a href=\"https://w3c.github.io/aria/#document-handling_author-errors_roles\">9.1 Roles - handling author errors</a>.</p>\n\n  <!-- known el and two known ARIA 1.0 roles -->\n  <nav role=\"region group\" data-testname=\"fallback role w/ region with no label\" data-expectedrole=\"group\" class=\"ex\">x</nav>\n  <nav role=\"region group\" data-testname=\"fallback role w/ region with label\" aria-label=\"x\" data-expectedrole=\"region\" class=\"ex\">x</nav>\n\n  <!-- known el and known ARIA 1.1 with 1.0 role backup -->\n  <div role=\"switch checkbox\" aria-checked=\"true\" data-testname=\"aria 1.1 switch role w/ fallback to aria 1.0 checkbox role\" aria-label=\"x\" data-expectedrole=\"switch\" class=\"ex\">x</div>\n\n  <!-- known el and invalid role token with valid backup -->\n  <div role=\"foo button\" data-testname=\"div[role=button] ignoring invalid foo role token\" aria-label=\"x\" data-expectedrole=\"button\" class=\"ex\">x</div>\n\n  <!-- unknown el and invalid role token with valid backup -->\n  <unknown role=\"foo button\" data-testname=\"unknown[role=button] ignoring invalid foo role token\" aria-label=\"x\" data-expectedrole=\"button\" class=\"ex\">x</unknown>\n\n  <!-- known el and invalid role(s) -->\n  <button role=\"foo\" data-testname=\"button ignoring single invalid role token\" aria-label=\"x\" data-expectedrole=\"button\" class=\"ex\">x</unknown>\n  <button role=\"foo bar\" data-testname=\"button ignoring multiple invalid role tokens\" aria-label=\"x\" data-expectedrole=\"button\" class=\"ex\">x</unknown>\n\n  <!-- known el with invalid punctuation -->\n  <div role=\"invalid, punctuation, tests, link, button\" data-testname=\"div[role=button] ignoring invalid foo role token including punctuation-contaminated known link role\" aria-label=\"x\" data-expectedrole=\"button\" class=\"ex\">x</div>\n\n\n\n  <!-- extra line breaks here to account for rendering of unicode diacritic etc char glitch tests -->\n\n\n\n  <div role=\"l\u0337\u0357\u030c\u0303\u035d\u0350\u0314\u031a\u0344\u0316\u033b\u0317\u0324\u033a\u031f\u0331\u035a\u0354\u0347\u034d\u0347\u032b\u0328\u0322\u032b\u031c\u0354\u0317\u031f\u0318\u032b\u031f\u0330\u0321\u033c\u0318i\u0335\u035d\u0342\u0358\u030d\u0350\u0314\u030d\u034c\u0310\u0307\u030f\u030e\u0328\u0332\u0321\u032f\u0320\u032e\u0348\u0356\u0325\u032e\u0332\u0353\u0326\u0317\u0317\u0331\u031e\u034d\u0317\u032a\u0359\u0347\u035an\u0336\u0300\u0342\u0343\u030b\u030a\u031c\u0332\u032b\u0347\u032e\u0349\u032c\u035c\u034e\u034e\u0355\u031d\u0331\u0354\u0319\u0328\u0331\u0326\u0327\u0330\u0326\u0320\u0330\u0322\u0323\u031dk\u0337\u0300\u0352\u0306\u0351\u0312\u0305\u0315\u0351\u0313\u0312\u0342\u033d\u0344\u033d\u0309\u0358\u0340\u035d\u0318\u0333\u0355\u0330\u034e\u032e\u0327\u0320\u0327\u0318\u032a\u0327\u0328\u0347\u0355\u0325\u032d\u035c\u033c\u033c\u031c\u0324\u032b\u0328\u0325\u0328\u033c\u0324\u0330\u0326\u0356\u032a \u0337\u0350\u0342\u0301\u035b\u0303\u0341\u030a\u0308\u034c\u0315\u0304\u0343\u031a\u030c\u0302\u035d\u0308\u0307\u0340\u030c\u0344\u0301\u0300\u0344\u030d\u0344\u0307\u0304\u030a\u0360\u0314\u0352\u033e\u033e\u0307\u0301\u0352\u033d\u0342\u033e\u032e\u0326\u0345\u0318\u0353\u032b\u031c\u0355\u0356\u0330\u035c\u0319\u0318\u0345\u0353\u0321\u033c\u034e\u0333\u0339\u0347\u032e\u035cg\u0338\u034b\u0351\u035d\u0311\u0315\u0343\u035b\u0313\u0309\u0314\u0309\u0351\u0307\u0301\u0344\u0309\u0303\u0301\u0311\u030d\u035d\u031b\u0302\u0315\u0312\u0350\u031a\u035b\u0357\u0311\u030f\u0343\u031a\u033e\u034c\u0308\u0305\u0301\u0307\u033a\u0328\u0326\u0323\u0327\u0347\u0348\u0359\u0347\u0327\u0327\u034e\u0355\u0320\u031e\u0333\u0339\u0345\u0327\u0323r\u0336\u030b\u033e\u0340\u0358\u0360\u0301\u0341\u0312\u0340\u0340\u0351\u0358\u030e\u0340\u030c\u031b\u0308\u0300\u030d\u0360\u0302\u030f\u030a\u030e\u0350\u0358\u0352\u0357\u0357\u0340\u0324\u0332\u0318\u032e\u031f\u032d\u0332o\u0334\u030f\u030a\u034b\u0350\u0310\u0346\u0358\u0308\u033f\u0312\u030a\u0304\u0351\u0344\u0314\u034b\u0314\u0303\u0350\u0343\u0313\u0360\u035b\u0358\u0301\u034a\u0309\u0351\u030a\u0314\u0346\u031e\u031d\u0320\u0319\u0327\u032c\u0321\u0322\u0317\u034d\u034d\u0349\u0321\u033a\u0354\u0359\u0322\u032b\u031d\u0330\u032e\u031c\u0329\u035c\u0319\u0345\u0333\u0349\u033b\u033b\u033c\u034du\u0334\u0307\u0308\u0360\u0352\u0331\u032f\u031e\u031e\u031e\u033a\u033c\u0333\u0333\u035a\u031ep\u0336\u035d\u0302\u0310\u030c\u030f\u034c\u0344\u035d\u0357\u033e\u035d\u034c\u033f\u0313\u0358\u0352\u030b\u0306\u0346\u031a\u033e\u035b\u031b\u0310\u0344\u0343\u034b\u0300\u0349\u032e\u0319\u032f\u032e\u0331\u0349\u0316\u035a\u0349\u0329\u0331\u033a\u0329\u0326\u033a\u0348\u032b\u034d\u0354\u0332\u0323\u0317\u031f\u031c \u0336\u030d\u0344\u0357\u0350\u0300\u030a\u030f\u035b\u0303\u0344\u034b\u035d\u0305\u0354\u035a\u0329\u032c\u0348  button\" data-testname=\"div[role=button] ignoring invalid unicode diacritics etc on link and group role tokens\" aria-label=\"x\" data-expectedrole=\"button\" class=\"ex\">x</div>\n\n\n  <!-- known el and known role with whitespace edge cases -->\n  <div role=\" button\" data-testname=\"div[role=button] ignoring tab char\" aria-label=\"x\" data-expectedrole=\"button\" class=\"ex\">x</div>\n  <div role=\"\nbutton\" data-testname=\"div[role=button] ignoring line break\" aria-label=\"x\" data-expectedrole=\"button\" class=\"ex\">x</div>\n  <div role=\"\u2800 button\" data-testname=\"div[role=button] ignoring braille whitespace char\" aria-label=\"x\" data-expectedrole=\"button\" class=\"ex\">x</div>",
   -1  1224 		"selector": ".ex"
   -1  1225 	}
   -1  1226 ];
   -1  1227 window.wpt["graphics-aria"] = [
   -1  1228 	{
   -1  1229 		"filename": "graphics-roles.html",
   -1  1230 		"title": "",
   -1  1231 		"html": "<p>Tests the concrete roles defined in the <a href=\"https://www.w3.org/TR/graphics-aria-1.0/#role_definitions\">ARIA Graphics Module</a> role definitions.</p>\n\n<div role=\"graphics-document\" data-expectedrole=\"graphics-document\" class=\"ex\">x</div>\n<div role=\"graphics-object\" data-expectedrole=\"graphics-object\" class=\"ex\">x</div>\n<div role=\"graphics-symbol\" data-expectedrole=\"graphics-symbol\" class=\"ex\">x</div>",
   -1  1232 		"selector": ".ex"
   -1  1233 	}
   -1  1234 ];
   -1  1235 window.wpt["dpub-aria"] = [];
   -1  1236 window.wpt["core-aam"] = [
   -1  1237 	{
   -1  1238 		"filename": "aria-label-manual.html",
   -1  1239 		"title": "aria-label",
   -1  1240 		"html": "<p>This test examines the ARIA properties for aria-label.</p>\n    <div role='group' id='test' aria-label='hello world'>content</div>",
   -1  1241 		"selector": "#test",
   -1  1242 		"name": "hello world"
   -1  1243 	},
   -1  1244 	{
   -1  1245 		"filename": "aria-labelledby-manual.html",
   -1  1246 		"title": "aria-labelledby",
   -1  1247 		"html": "<p>This test examines the ARIA properties for aria-labelledby.</p>\n    <div role='group' id='test' aria-labelledby='label'>content</div>\n  <div id='label'>hello world</div>",
   -1  1248 		"selector": "#test",
   -1  1249 		"name": "hello world"
   -1  1250 	},
   -1  1251 	{
   -1  1252 		"filename": "aria-describedby-manual.html",
   -1  1253 		"title": "aria-describedby",
   -1  1254 		"html": "<p>This test examines the ARIA properties for aria-describedby.</p>\n    <div role='group' id='test' aria-describedby='description'>content</div>\n  <div id='description'>hello world</div>",
   -1  1255 		"selector": "#test",
   -1  1256 		"description": "hello world"
   -1  1257 	},
   -1  1258 	{
   -1  1259 		"filename": "rowgroup-no-name-from-contents-manual.html",
   -1  1260 		"title": "rowgroup no name from contents",
   -1  1261 		"html": "<p>This test examines the ARIA properties for rowgroup with no author-provided name.</p>\n    <div role='grid'>\n    <div role='rowgroup' id='test'>\n      <div role='row'>\n        <div role='cell'>content</div>\n      </div>\n      <div role='row'>\n        <div role='cell'>content</div>\n      </div>\n    </div>\n  </div>",
   -1  1262 		"selector": "#test",
   -1  1263 		"name": ""
   -1  1264 	}
   -1  1265 ];
   -1  1266 window.wpt["graphics-aam"] = [];
   -1  1267 window.wpt["dpub-aam"] = [];
   -1  1268 window.wpt["html-aam"] = [
   -1  1269 	{
   -1  1270 		"filename": "roles.html",
   -1  1271 		"title": "HTML-AAM Role Verification Tests",
   -1  1272 		"html": "<p>Tests the computedrole mappings defined in <a href=\"https://w3c.github.io/html-aam/\">HTML-AAM</a>. Most test names correspond to a unique ID defined in the spec.<p>\n\n<p>These should remain in alphabetical order, and include all HTML tagnames. If a tag is not tested here, include a pointer to the file where it is tested, such as: <code>&lt;!-- caption -&gt; ./table-roles.html --&gt;</code></p>\n\n\n<!-- a (w/ and w/o href) -> ./roles-contextual.html -->\n<!-- todo: abbr -->\n<address data-testname=\"el-address\" data-expectedrole=\"group\" class=\"ex\">x</address>\n<!-- area -> ./fragile/area-role.html -->\n<article data-testname=\"el-article\" data-expectedrole=\"article\" class=\"ex\">x</article>\n<!-- aside -> ./roles-contextual.html -->\n<!-- todo: audio -->\n<!-- todo: autonomous custom element -->\n<!-- b -> ./roles-generic.html -->\n<!-- base (not mapped) -->\n<!-- bdi -> ./roles-generic.html -->\n<!-- bdo -> ./roles-generic.html -->\n<blockquote data-testname=\"el-blockquote\" data-expectedrole=\"blockquote\" class=\"ex\">x</blockquote>\n<!-- todo: body -->\n<!-- br (not mapped) -->\n<button data-testname=\"el-button\" data-expectedrole=\"button\" class=\"ex\">x</button>\n<!-- todo: canvas -->\n<!-- caption -> ./table-roles.html -->\n<!-- todo: cite -->\n<code data-testname=\"el-code\" data-expectedrole=\"code\" class=\"ex\">x</code>\n<!-- todo: col -->\n<!-- todo: colgroup -->\n<!-- data -> ./roles-generic.html -->\n<!-- todo: datalist -->\n\n<!-- el-dd -->\n<dl>\n  <dt>x</dt>\n  <dd data-testname=\"el-dd\" data-expectedrole=\"definition\" class=\"ex\">x</dd>\n</dl>\n\n<del data-testname=\"el-del\" data-expectedrole=\"deletion\" class=\"ex\">x</del>\n<details data-testname=\"el-details\" data-expectedrole=\"group\" class=\"ex\"><summary>x</summary>x</details>\n<dfn data-testname=\"el-dfn\" data-expectedrole=\"term\" class=\"ex\">x</dfn>\n<!-- div -> ./roles-generic.html -->\n<!-- todo: dl -->\n\n<!-- el-dt -->\n<dl>\n  <dt data-testname=\"el-dt\" data-expectedrole=\"term\" class=\"ex\">x</dt>\n  <dd>x</dd>\n</dl>\n\n<em data-testname=\"el-em\" data-expectedrole=\"emphasis\" class=\"ex\">x</em>\n<!-- todo: embed -->\n<fieldset data-testname=\"el-fieldset\" data-expectedrole=\"group\" class=\"ex\"><legend>x</legend><input></fieldset>\n<!-- todo: figcaption -->\n<figure data-testname=\"el-figure\" data-expectedrole=\"figure\" class=\"ex\"><img src=\"#\" alt=\"x\"><figcaption>x</figcaption></figure>\n<!-- footer -> ./roles-contextual.html -->\n<form data-testname=\"el-form\" data-expectedrole=\"form\" class=\"ex\"><input></form>\n<!-- todo: form-associated custom element -->\n\n<!-- el-h1-h6 -->\n<h1 data-testname=\"el-h1\" data-expectedrole=\"heading\" class=\"ex\">x</h1>\n<h2 data-testname=\"el-h2\" data-expectedrole=\"heading\" class=\"ex\">x</h2>\n<h3 data-testname=\"el-h3\" data-expectedrole=\"heading\" class=\"ex\">x</h3>\n<h4 data-testname=\"el-h4\" data-expectedrole=\"heading\" class=\"ex\">x</h4>\n<h5 data-testname=\"el-h5\" data-expectedrole=\"heading\" class=\"ex\">x</h5>\n<h6 data-testname=\"el-h6\" data-expectedrole=\"heading\" class=\"ex\">x</h6>\n\n<!-- head (not mapped) -->\n\n<!-- header -> ./roles-contextual.html -->\n<hgroup data-testname=\"el-hgroup\" data-expectedrole=\"group\" class=\"ex\"><h1>x</h1></hgroup>\n<hr data-testname=\"el-hr\" data-expectedrole=\"separator\" class=\"ex\">\n<!-- todo: html -->\n<!-- i -> ./roles-generic.html -->\n<!-- todo: iframe -->\n<img src=\"#\" alt=\"x\" data-testname=\"el-img\" data-expectedrole=\"image\" class=\"ex\">\n\n<!-- Implementations might also be valid if ignored rather than returning 'none' for the following images. -->\n<img src=\"#\" alt data-testname=\"el-img-alt-no-value\" data-expectedrole=\"none\" class=\"ex\">\n<img src=\"#\" alt=\"\" data-testname=\"el-img-empty-alt\" data-expectedrole=\"none\" class=\"ex\">\n\n<input type=\"button\" value=\"x\" data-testname=\"el-input-button\" data-expectedrole=\"button\" class=\"ex\">\n<input type=\"checkbox\" data-testname=\"el-input-checkbox\" data-expectedrole=\"checkbox\" class=\"ex\">\n<!-- todo: input type=\"color\" -->\n<!-- todo: input type=\"date\" -->\n<!-- todo: input type=\"datetime\" -->\n<!-- todo: input type=\"datetime-local\" -->\n<input type=\"email\" data-testname=\"el-input-email\" data-expectedrole=\"textbox\" class=\"ex\">\n<!-- todo: input type=\"file\" -->\n<!-- input type=\"hidden\" (not mapped) -->\n<!-- todo: input type=\"month\" -->\n\n<!-- Blocked: HTML-AAM Issue #467 -->\n<!-- <input type=\"number\" data-testname=\"el-input-number\" data-expectedrole=\"spinbutton\" class=\"ex\"> -->\n\n<!-- todo: input type=\"password\" -->\n<input type=\"radio\" data-testname=\"el-input-radio\" data-expectedrole=\"radio\" class=\"ex\">\n<input type=\"range\" data-testname=\"el-input-range\" data-expectedrole=\"slider\" class=\"ex\">\n<input type=\"reset\" value=\"x\" data-testname=\"el-input-reset\" data-expectedrole=\"button\" class=\"ex\">\n<input type=\"search\" data-testname=\"el-input-search\" data-expectedrole=\"searchbox\" class=\"ex\">\n<input type=\"submit\" value=\"x\" data-testname=\"el-input-submit\" data-expectedrole=\"button\" class=\"ex\">\n<input type=\"tel\" data-testname=\"el-input-tel\" data-expectedrole=\"textbox\" class=\"ex\">\n<input type=\"text\" data-testname=\"el-input-text\" data-expectedrole=\"textbox\" class=\"ex\">\n<!-- todo: input (type attribute in the Text, Search, Telephone, URL, or E-mail states with a suggestions source element) -->\n<!-- todo: input type=\"time\" -->\n<input type=\"url\" data-testname=\"el-input-url\" data-expectedrole=\"textbox\" class=\"ex\">\n<!-- todo: input type=\"week\" -->\n<ins data-testname=\"el-ins\" data-expectedrole=\"insertion\" class=\"ex\">x</ins>\n<!-- todo: kbd -->\n<!-- todo: label -->\n<!-- todo: legend -->\n\n<!-- el-li -->\n<!-- li (orphaned) -> ./roles-generic.html -->\n<ul><li data-testname=\"el-li-in-ul\" data-expectedrole=\"listitem\" class=\"ex\">x</li><li>x</li></ul>\n<ol><li data-testname=\"el-li-in-ol\" data-expectedrole=\"listitem\" class=\"ex\">x</li><li>x</li></ol>\n\n<!-- link (not mapped) -->\n<main data-testname=\"el-main\" data-expectedrole=\"main\" class=\"ex\">x</main>\n<!-- map (not mapped) -->\n<mark data-testname=\"el-mark\" data-expectedrole=\"mark\" class=\"ex\">x</mark>\n<!-- todo: math -->\n<menu data-testname=\"el-menu\" data-expectedrole=\"list\" class=\"ex\"><li>x</li></menu>\n<!-- meta (not mapped) -->\n<meter data-testname=\"el-meter\" data-expectedrole=\"meter\" class=\"ex\" min=\"0\" max=\"100\" low=\"20\" high=\"80\" optimum=\"60\" value=\"50\">x</meter>\n<nav data-testname=\"el-nav\" data-expectedrole=\"navigation\" class=\"ex\">x</nav>\n<!-- noscript (not mapped) -->\n<!-- object (not mapped) -->\n<ol data-testname=\"el-ol\" data-expectedrole=\"list\" class=\"ex\"><li>x</li><li>x</li></ol>\n\n<!-- optgroup -> ./fragile/optgroup-role.html -->\n\n<!-- option -->\n<select>\n  <option data-testname=\"el-option\" data-expectedrole=\"option\" class=\"ex\">x</option>\n  <option>x</option>\n</select>\n\n<output data-testname=\"el-output\" data-expectedrole=\"status\" class=\"ex\">x</output>\n<p data-testname=\"el-p\" data-expectedrole=\"paragraph\" class=\"ex\">x</p>\n<!-- param (not mapped) -->\n<!-- todo: picture -->\n<!-- pre -> ./roles-generic.html -->\n<progress data-testname=\"el-progress\" data-expectedrole=\"progressbar\" class=\"ex\">x</progress>\n<!-- q -> ./roles-generic.html -->\n<!-- todo: rp -> /ruby-aam? -->\n<!-- todo: rt -> /ruby-aam? -->\n<!-- todo: ruby -> /ruby-aam? -->\n<s data-testname=\"el-s\" data-expectedrole=\"deletion\" class=\"ex\">x</s>\n<!-- samp -> ./roles-generic.html -->\n<!-- script (not mapped) -->\n<search data-testname=\"el-search\" data-expectedrole=\"search\" class=\"ex\">x</search>\n<!-- section -> ./roles-contextual.html -->\n\n<!-- Blocked: HTML-AAM Issue #467 -->\n<!-- <select data-testname=\"el-select-combobox\" data-expectedrole=\"combobox\" class=\"ex\"><option>a1</option><option>a2</option></select>-->\n\n<select data-testname=\"el-select-listbox\" size=\"2\" data-expectedrole=\"listbox\" class=\"ex\"><option>b1</option><option>b2</option></select>\n\n<!-- slot (not mapped) -->\n<!-- small -> ./roles-generic.html -->\n<!-- source (not mapped) -->\n<!-- span -> ./roles-generic.html -->\n<strong data-testname=\"el-strong\" data-expectedrole=\"strong\" class=\"ex\">x</strong>\n<!-- style (not mapped) -->\n<sub data-testname=\"el-sub\" data-expectedrole=\"subscript\" class=\"ex\">x</sub>\n<!-- todo: summary -->\n<sup data-testname=\"el-sup\" data-expectedrole=\"superscript\" class=\"ex\">x</sup>\n<!-- todo: svg (see /graphics-aam and /svg-aam tests) -->\n<!-- table -> ./table-roles.html -->\n<!-- tbody -> ./table-roles.html -->\n<!-- td -> ./table-roles.html -->\n<!-- template (not mapped) -->\n<!-- tfoot -> ./table-roles.html -->\n<!-- th -> ./table-roles.html -->\n<!-- thead -> ./table-roles.html -->\n<time data-testname=\"el-time\" data-expectedrole=\"time\" class=\"ex\">x</time>\n<!-- title (not mapped) -->\n<!-- tr -> ./table-roles.html -->\n<textarea data-testname=\"el-textarea\" data-expectedrole=\"textbox\" class=\"ex\">x</textarea>\n<!-- track (not mapped) -->\n<!-- u -> ./roles-generic.html -->\n<ul data-testname=\"el-ul\" data-expectedrole=\"list\" class=\"ex\"><li>x</li><li>x</li></ul>\n<!-- var (not mapped) -->\n<!-- todo: video -->\n<!-- wbr (not mapped) -->",
   -1  1273 		"selector": ".ex"
   -1  1274 	},
   -1  1275 	{
   -1  1276 		"filename": "roles-generic.html",
   -1  1277 		"title": "HTML-AAM Generic Role Verification Tests",
   -1  1278 		"html": "<p>Tests ONLY the <code>generic</code> mappings defined in <a href=\"https://w3c.github.io/html-aam/\">HTML-AAM</a>. Most test names correspond to a unique ID defined in the spec.<p>\n\n<p>These should remain in alphabetical order by tagname.</p>\n\n<!-- a -> ./roles-contextual.html -->\n<!-- aside -> ./roles-contextual.html -->\n<b data-testname=\"el-b\" class=\"ex-generic\">x</b>\n<bdi data-testname=\"el-bdi\" class=\"ex-generic\">x</bdi>\n<bdo data-testname=\"el-bdo\" class=\"ex-generic\">x</bdo>\n<data value=\"1\" data-testname=\"el-data\" class=\"ex-generic\">x</data>\n<div open data-testname=\"el-div\" class=\"ex-generic\">x</div>\n<!-- footer -> ./roles-contextual.html -->\n<!-- header -> ./roles-contextual.html -->\n<i data-testname=\"el-i\" class=\"ex-generic\">x</i>\n<li data-testname=\"el-li-orphaned\" class=\"ex-generic\">x</li><!-- todo: should orphaned roles be tested in a new ./roles-orphaned.html file? -->\n<pre data-testname=\"el-pre\" class=\"ex-generic\">x</pre>\n<q data-testname=\"el-q\" class=\"ex-generic\">x</q>\n<samp data-testname=\"el-samp\" class=\"ex-generic\">x</samp>\n<!-- section -> ./roles-contextual.html -->\n<small data-testname=\"el-small\" class=\"ex-generic\">x</small>\n<span data-testname=\"el-span\" class=\"ex-generic\">x</span>\n<u data-testname=\"el-u\" class=\"ex-generic\">x</u>",
   -1  1279 		"role": "generic",
   -1  1280 		"selector": ".ex-generic"
   -1  1281 	},
   -1  1282 	{
   -1  1283 		"filename": "table-roles.html",
   -1  1284 		"title": "HTML-AAM Role Verification Tests",
   -1  1285 		"html": "<p>Tests the computedrole mappings for the table-related roles defined in <a href=\"https://w3c.github.io/html-aam/\">HTML-AAM</a>. Most test names correspond to unique ID defined in the spec.<p>\n\n<table data-testname=\"el-table\" data-expectedrole=\"table\" class=\"ex\">\n  <caption data-testname=\"el-caption\" data-expectedrole=\"caption\" class=\"ex\">caption</caption>\n  <thead data-testname=\"el-thead\" data-expectedrole=\"rowgroup\" class=\"ex\">\n    <tr data-testname=\"el-tr-thead\" data-expectedrole=\"row\" class=\"ex\">\n      <th data-testname=\"el-th\" data-expectedrole=\"columnheader\" class=\"ex\">a</th>\n      <th>b</th>\n      <th>c</th>\n    </tr>\n  </thead>\n  <tbody data-testname=\"el-tbody\" data-expectedrole=\"rowgroup\" class=\"ex\">\n    <tr data-testname=\"el-tr-tbody\" data-expectedrole=\"row\" class=\"ex\">\n      <th data-testname=\"el-th-in-row\" data-expectedrole=\"rowheader\" class=\"ex\">1</th>\n      <td data-testname=\"el-td\" data-expectedrole=\"cell\" class=\"ex\">2</td>\n      <td>3</td>\n    </tr>\n    <tr>\n      <th>4</th>\n      <td>5</td>\n      <td>6</td>\n    </tr>\n  </tbody>\n  <tfoot data-testname=\"el-tfoot\" data-expectedrole=\"rowgroup\" class=\"ex\">\n    <tr>\n      <th>x</th>\n      <th>y</th>\n      <th>z</th>\n    </tr>\n  </tfoot>\n</table>",
   -1  1286 		"selector": ".ex"
   -1  1287 	},
   -1  1288 	{
   -1  1289 		"filename": "roles-contextual.html",
   -1  1290 		"title": "HTML-AAM Contextual-Specific Role Verification Tests",
   -1  1291 		"html": "<p>Tests contextual computedrole mappings defined in <a href=\"https://w3c.github.io/html-aam/\">HTML-AAM</a>, where the returned computed role is expected to change based on the context. Most test names correspond to a unique ID defined in the spec.<p>\n\n<p>These should remain in alphabetical order.</code></p>\n\n\n<!-- el-a -->\n<a href=\"#\" data-testname=\"el-a\" data-expectedrole=\"link\" class=\"ex\">x</a>\n<a data-testname=\"el-a-no-href\" class=\"ex-generic\">x</a>\n\n<!-- el-aside -->\n<nav>\n  <aside data-testname=\"el-aside-in-section-with-name\" data-expectedrole=\"complementary\" aria-label=\"x\" class=\"ex\">x</aside>\n  <aside data-testname=\"el-aside-in-section-without-name\" class=\"ex-generic\">x</aside>\n</nav>\n<aside data-testname=\"el-aside-ancestorbodymain\" data-expectedrole=\"complementary\" class=\"ex\">x</aside>\n\n<!-- el-footer -->\n<nav>\n  <footer data-testname=\"el-footer\" aria-label=\"x\" class=\"ex-generic\">x</aside>\n</nav>\n<footer data-testname=\"el-footer-ancestorbody\" data-expectedrole=\"contentinfo\" class=\"ex\">x</footer>\n\n<!-- el-header -->\n<nav>\n  <header data-testname=\"el-header\" aria-label=\"x\" class=\"ex-generic\">x</header>\n</nav>\n<header data-testname=\"el-header-ancestorbody\" data-expectedrole=\"banner\" class=\"ex\">x</header>\n\n<!-- el-section -->\n<section data-testname=\"el-section\" aria-label=\"x\" data-expectedrole=\"region\" class=\"ex\">x</section>\n<section data-testname=\"el-section-no-name\" class=\"ex-generic\">x</section>",
   -1  1292 		"selector": ".ex"
   -1  1293 	},
   -1  1294 	{
   -1  1295 		"filename": "roles-contextual.html",
   -1  1296 		"title": "HTML-AAM Contextual-Specific Role Verification Tests",
   -1  1297 		"html": "<p>Tests contextual computedrole mappings defined in <a href=\"https://w3c.github.io/html-aam/\">HTML-AAM</a>, where the returned computed role is expected to change based on the context. Most test names correspond to a unique ID defined in the spec.<p>\n\n<p>These should remain in alphabetical order.</code></p>\n\n\n<!-- el-a -->\n<a href=\"#\" data-testname=\"el-a\" data-expectedrole=\"link\" class=\"ex\">x</a>\n<a data-testname=\"el-a-no-href\" class=\"ex-generic\">x</a>\n\n<!-- el-aside -->\n<nav>\n  <aside data-testname=\"el-aside-in-section-with-name\" data-expectedrole=\"complementary\" aria-label=\"x\" class=\"ex\">x</aside>\n  <aside data-testname=\"el-aside-in-section-without-name\" class=\"ex-generic\">x</aside>\n</nav>\n<aside data-testname=\"el-aside-ancestorbodymain\" data-expectedrole=\"complementary\" class=\"ex\">x</aside>\n\n<!-- el-footer -->\n<nav>\n  <footer data-testname=\"el-footer\" aria-label=\"x\" class=\"ex-generic\">x</aside>\n</nav>\n<footer data-testname=\"el-footer-ancestorbody\" data-expectedrole=\"contentinfo\" class=\"ex\">x</footer>\n\n<!-- el-header -->\n<nav>\n  <header data-testname=\"el-header\" aria-label=\"x\" class=\"ex-generic\">x</header>\n</nav>\n<header data-testname=\"el-header-ancestorbody\" data-expectedrole=\"banner\" class=\"ex\">x</header>\n\n<!-- el-section -->\n<section data-testname=\"el-section\" aria-label=\"x\" data-expectedrole=\"region\" class=\"ex\">x</section>\n<section data-testname=\"el-section-no-name\" class=\"ex-generic\">x</section>",
   -1  1298 		"role": "generic",
   -1  1299 		"selector": ".ex-generic"
   -1  1300 	},
   -1  1301 	{
   -1  1302 		"filename": "area-role.html",
   -1  1303 		"title": "HTMLAreaElement Role Verification Tests",
   -1  1304 		"html": "<map name=\"areamap\">\n    <area shape=\"rect\" coords=\"0,0,15,15\" href=\"#\" alt=\"x\" data-testname=\"el-area\" data-expectedrole=\"link\" class=\"ex\">\n    <area shape=\"rect\" coords=\"15,15,31,31\" alt=\"x\" data-testname=\"el-area-no-href\" data-expectedrole=\"generic\" class=\"ex\">\n</map>\n<img usemap=\"#areamap\" src=\"#\" style=\"width: 32px; height: 32px;\" alt=\"x\">",
   -1  1305 		"selector": ".ex"
   -1  1306 	},
   -1  1307 	{
   -1  1308 		"filename": "optgroup-role.html",
   -1  1309 		"title": "HTMLOptGroupElement Role Verification Tests",
   -1  1310 		"html": "<select>\n  <optgroup label=\"x\" data-testname=\"el-optgroup\" data-expectedrole=\"group\" class=\"ex\">\n    <option>x1</option>\n    <option>x2</option>\n  </optgroup>\n  <optgroup data-testname=\"el-optgroup-no-label\" data-expectedrole=\"not defined in spec?\" class=\"ex-todo\">\n    <option>y1</option>\n    <option>y2</option>\n  </optgroup>\n</select>",
   -1  1311 		"selector": ".ex"
   -1  1312 	}
   -1  1313 ];
   -1  1314 window.wpt["svg-aam"] = [];

diff --git a/wpt.py b/wpt.py

@@ -51,13 +51,23 @@ def extract_tests(path):
   51    51 								test['description'] = check[3]
   52    52 						if len(test) > 4:
   53    53 							tests.append(test)
   54    -1 				elif 'class="ex"' in raw:
   55    -1 					tests.append({
   56    -1 						'filename': filename,
   57    -1 						'title': fenced('<title>', '</title>', raw),
   58    -1 						'html': fenced('<body>', '<script>', raw).strip(),
   59    -1 						'selector': '.ex',
   60    -1 					})
   -1    54 				else:
   -1    55 					if 'class="ex"' in raw:
   -1    56 						tests.append({
   -1    57 							'filename': filename,
   -1    58 							'title': fenced('<title>', '</title>', raw),
   -1    59 							'html': fenced('<body>', '<script>', raw).strip(),
   -1    60 							'selector': '.ex',
   -1    61 						})
   -1    62 					if 'class="ex-generic"' in raw:
   -1    63 						tests.append({
   -1    64 							'filename': filename,
   -1    65 							'title': fenced('<title>', '</title>', raw),
   -1    66 							'html': fenced('<body>', '<script>', raw).strip(),
   -1    67 							'role': 'generic',
   -1    68 							'selector': '.ex-generic',
   -1    69 						})
   -1    70 
   61    71 	return tests
   62    72 
   63    73 
@@ -70,3 +80,11 @@ def render_tests(name):
   70    80 
   71    81 print('window.wpt = window.wpt || {};')
   72    82 render_tests('accname')
   -1    83 render_tests('wai-aria')
   -1    84 render_tests('graphics-aria')
   -1    85 render_tests('dpub-aria')
   -1    86 render_tests('core-aam')
   -1    87 render_tests('graphics-aam')
   -1    88 render_tests('dpub-aam')
   -1    89 render_tests('html-aam')
   -1    90 render_tests('svg-aam')