roles.html (10180B)
1 <!doctype html> 2 <html> 3 <head> 4 <title>HTML-AAM Role Verification Tests</title> 5 <script src="/resources/testharness.js"></script> 6 <script src="/resources/testharnessreport.js"></script> 7 <script src="/resources/testdriver.js"></script> 8 <script src="/resources/testdriver-vendor.js"></script> 9 <script src="/resources/testdriver-actions.js"></script> 10 <script src="/wai-aria/scripts/aria-utils.js"></script> 11 </head> 12 <body> 13 14 15 <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> 16 17 <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><!-- caption -> ./table-roles.html --></code></p> 18 19 20 <!-- a (w/ and w/o href) -> ./roles-contextual.html --> 21 <!-- todo: abbr --> 22 <address data-testname="el-address" data-expectedrole="group" class="ex">x</address> 23 <!-- area -> ./fragile/area-role.html --> 24 <article data-testname="el-article" data-expectedrole="article" class="ex">x</article> 25 <!-- aside -> ./roles-contextual.html --> 26 <!-- todo: audio --> 27 <!-- todo: autonomous custom element --> 28 <!-- b -> ./roles-generic.html --> 29 <!-- base (not mapped) --> 30 <!-- bdi -> ./roles-generic.html --> 31 <!-- bdo -> ./roles-generic.html --> 32 <blockquote data-testname="el-blockquote" data-expectedrole="blockquote" class="ex">x</blockquote> 33 <!-- todo: body --> 34 <!-- br (not mapped) --> 35 <button data-testname="el-button" data-expectedrole="button" class="ex">x</button> 36 <!-- todo: canvas --> 37 <!-- caption -> ./table-roles.html --> 38 <!-- todo: cite --> 39 <code data-testname="el-code" data-expectedrole="code" class="ex">x</code> 40 <!-- todo: col --> 41 <!-- todo: colgroup --> 42 <!-- data -> ./roles-generic.html --> 43 <!-- todo: datalist --> 44 45 <!-- el-dd --> 46 <dl> 47 <dt>x</dt> 48 <!-- dt/dd pending listitemkey and listitemvalue roles: https://github.com/w3c/aria/issues/1662 --> 49 <dd data-testname="el-dd" data-expectedrole="definition" class="ex">x</dd> 50 </dl> 51 52 <del data-testname="el-del" data-expectedrole="deletion" class="ex">x</del> 53 <details data-testname="el-details" data-expectedrole="group" class="ex"><summary>x</summary>x</details> 54 <dfn data-testname="el-dfn" data-expectedrole="term" class="ex">x</dfn> 55 <!-- dir -> ./dir-role.tentative.html --> 56 <!-- div -> ./roles-generic.html --> 57 <!-- todo: dl --> 58 59 <!-- el-dt --> 60 <dl> 61 <!-- dt/dd pending listitemkey and listitemvalue roles: https://github.com/w3c/aria/issues/1662 --> 62 <dt data-testname="el-dt" data-expectedrole="term" class="ex">x</dt> 63 <dd>x</dd> 64 </dl> 65 66 <em data-testname="el-em" data-expectedrole="emphasis" class="ex">x</em> 67 <!-- todo: embed --> 68 <fieldset data-testname="el-fieldset" data-expectedrole="group" class="ex"><legend>x</legend><input></fieldset> 69 <!-- todo: figcaption --> 70 <figure data-testname="el-figure" data-expectedrole="figure" class="ex"><img alt="x" src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw=="><figcaption>x</figcaption></figure> 71 <!-- footer -> ./roles-contextual.html --> 72 <form aria-label="form" data-testname="el-form" data-expectedrole="form" class="ex"><input></form> 73 <!-- todo: form-associated custom element --> 74 75 <!-- el-h1-h6 --> 76 <h1 data-testname="el-h1" data-expectedrole="heading" class="ex">x</h1> 77 <h2 data-testname="el-h2" data-expectedrole="heading" class="ex">x</h2> 78 <h3 data-testname="el-h3" data-expectedrole="heading" class="ex">x</h3> 79 <h4 data-testname="el-h4" data-expectedrole="heading" class="ex">x</h4> 80 <h5 data-testname="el-h5" data-expectedrole="heading" class="ex">x</h5> 81 <h6 data-testname="el-h6" data-expectedrole="heading" class="ex">x</h6> 82 83 <!-- head (not mapped) --> 84 85 <!-- header -> ./roles-contextual.html --> 86 <hgroup data-testname="el-hgroup" data-expectedrole="group" class="ex"><h1>x</h1></hgroup> 87 <hr data-testname="el-hr" data-expectedrole="separator" class="ex"> 88 <!-- todo: html --> 89 <!-- i -> ./roles-generic.html --> 90 <!-- todo: iframe --> 91 <img alt="x" data-testname="el-img" data-expectedrole="image" class="ex" src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw=="> 92 93 <!-- Implementations might also be valid if ignored rather than returning 'none' for the following images. --> 94 <img alt data-testname="el-img-alt-no-value" class="ex-generic" src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw=="> 95 <img alt="" data-testname="el-img-empty-alt" class="ex-generic" src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw=="> 96 97 <!-- img with empty alt but other naming mechanism -> ./roles-contextual.html --> 98 99 <input type="button" value="x" data-testname="el-input-button" data-expectedrole="button" class="ex"> 100 <input type="checkbox" data-testname="el-input-checkbox" data-expectedrole="checkbox" class="ex"> 101 <!-- todo: input type="color" --> 102 <!-- todo: input type="date" --> 103 <!-- todo: input type="datetime" --> 104 <!-- todo: input type="datetime-local" --> 105 <input type="email" data-testname="el-input-email" data-expectedrole="textbox" class="ex"> 106 <!-- todo: input type="file" --> 107 <!-- input type="hidden" (not mapped) --> 108 <!-- todo: input type="month" --> 109 110 <!-- Blocked: HTML-AAM Issue #467 --> 111 <!-- <input type="number" data-testname="el-input-number" data-expectedrole="spinbutton" class="ex"> --> 112 113 <!-- todo: input type="password" --> 114 <input type="radio" data-testname="el-input-radio" data-expectedrole="radio" class="ex"> 115 <input type="range" data-testname="el-input-range" data-expectedrole="slider" class="ex"> 116 <input type="reset" value="x" data-testname="el-input-reset" data-expectedrole="button" class="ex"> 117 <input type="search" data-testname="el-input-search" data-expectedrole="searchbox" class="ex"> 118 <!-- An ARIA role should override type="search". --> 119 <input type="search" role="combobox" data-testname="el-input-search-with-role" data-expectedrole="combobox" class="ex"> 120 <input type="submit" value="x" data-testname="el-input-submit" data-expectedrole="button" class="ex"> 121 <input type="tel" data-testname="el-input-tel" data-expectedrole="textbox" class="ex"> 122 <input type="text" data-testname="el-input-text" data-expectedrole="textbox" class="ex"> 123 <!-- todo: input (type attribute in the Text, Search, Telephone, URL, or E-mail states with a suggestions source element) --> 124 <!-- todo: input type="time" --> 125 <input type="url" data-testname="el-input-url" data-expectedrole="textbox" class="ex"> 126 <!-- todo: input type="week" --> 127 <ins data-testname="el-ins" data-expectedrole="insertion" class="ex">x</ins> 128 <!-- todo: kbd --> 129 <!-- todo: label --> 130 <!-- todo: legend --> 131 132 <!-- el-li --> 133 <!-- li (orphaned) -> ./roles-generic.html --> 134 <ul><li data-testname="el-li-in-ul" data-expectedrole="listitem" class="ex">x</li><li>x</li></ul> 135 <ol><li data-testname="el-li-in-ol" data-expectedrole="listitem" class="ex">x</li><li>x</li></ol> 136 137 <!-- link (not mapped) --> 138 <main data-testname="el-main" data-expectedrole="main" class="ex">x</main> 139 <!-- map (not mapped) --> 140 <mark data-testname="el-mark" data-expectedrole="mark" class="ex">x</mark> 141 <!-- todo: math --> 142 <menu data-testname="el-menu" data-expectedrole="list" class="ex"><li>x</li></menu> 143 <!-- meta (not mapped) --> 144 <meter data-testname="el-meter" data-expectedrole="meter" class="ex" min="0" max="100" low="20" high="80" optimum="60" value="50">x</meter> 145 <nav data-testname="el-nav" data-expectedrole="navigation" class="ex">x</nav> 146 <!-- noscript (not mapped) --> 147 <!-- object (not mapped) --> 148 <ol data-testname="el-ol" data-expectedrole="list" class="ex"><li>x</li><li>x</li></ol> 149 150 <!-- optgroup -> ./fragile/optgroup-role.html --> 151 152 <!-- option --> 153 <select> 154 <option data-testname="el-option" data-expectedrole="option" class="ex">x</option> 155 <option>x</option> 156 </select> 157 158 <output data-testname="el-output" data-expectedrole="status" class="ex">x</output> 159 <p data-testname="el-p" data-expectedrole="paragraph" class="ex">x</p> 160 <!-- param (not mapped) --> 161 <!-- todo: picture --> 162 <!-- pre -> ./roles-generic.html --> 163 <progress data-testname="el-progress" data-expectedrole="progressbar" class="ex">x</progress> 164 <!-- q -> ./roles-generic.html --> 165 <!-- todo: rp -> /ruby-aam? --> 166 <!-- todo: rt -> /ruby-aam? --> 167 <!-- todo: ruby -> /ruby-aam? --> 168 <s data-testname="el-s" data-expectedrole="deletion" class="ex">x</s> 169 <!-- samp -> ./roles-generic.html --> 170 <!-- script (not mapped) --> 171 <search data-testname="el-search" data-expectedrole="search" class="ex">x</search> 172 <!-- section -> ./roles-contextual.html --> 173 174 <!-- Blocked: HTML-AAM Issue #467 --> 175 <!-- <select data-testname="el-select-combobox" data-expectedrole="combobox" class="ex"><option>a1</option><option>a2</option></select>--> 176 177 <select data-testname="el-select-listbox" size="2" data-expectedrole="listbox" class="ex"><option>b1</option><option>b2</option></select> 178 179 <!-- slot (not mapped) --> 180 <!-- small -> ./roles-generic.html --> 181 <!-- source (not mapped) --> 182 <!-- span -> ./roles-generic.html --> 183 <strong data-testname="el-strong" data-expectedrole="strong" class="ex">x</strong> 184 <!-- style (not mapped) --> 185 <sub data-testname="el-sub" data-expectedrole="subscript" class="ex">x</sub> 186 <!-- todo: summary --> 187 <sup data-testname="el-sup" data-expectedrole="superscript" class="ex">x</sup> 188 <!-- todo: svg (see /graphics-aam and /svg-aam tests) --> 189 <!-- table -> ./table-roles.html --> 190 <!-- tbody -> ./table-roles.html --> 191 <!-- td -> ./table-roles.html --> 192 <!-- template (not mapped) --> 193 <!-- tfoot -> ./table-roles.html --> 194 <!-- th -> ./table-roles.html --> 195 <!-- thead -> ./table-roles.html --> 196 <time data-testname="el-time" data-expectedrole="time" class="ex">x</time> 197 <!-- title (not mapped) --> 198 <!-- tr -> ./table-roles.html --> 199 <textarea data-testname="el-textarea" data-expectedrole="textbox" class="ex">x</textarea> 200 <!-- track (not mapped) --> 201 <!-- u -> ./roles-generic.html --> 202 <ul data-testname="el-ul" data-expectedrole="list" class="ex"><li>x</li><li>x</li></ul> 203 <!-- var (not mapped) --> 204 <!-- todo: video --> 205 <!-- wbr (not mapped) --> 206 207 <script> 208 AriaUtils.verifyRolesBySelector(".ex"); 209 AriaUtils.verifyGenericRolesBySelector(".ex-generic"); 210 </script> 211 212 </body> 213 </html>