Skip to content

Commit

Permalink
Regression Test Support: Add Testing data attributes to menubar-2.htm…
Browse files Browse the repository at this point in the history
…l (pull #778)

To support test scripts, add data-test-id attributes to `tr` elements in the documentation tables on menubar-2.html example page.
  • Loading branch information
spectranaut authored and mcking65 committed Jul 16, 2018
1 parent ca1f155 commit 500e658
Showing 1 changed file with 41 additions and 41 deletions.
82 changes: 41 additions & 41 deletions examples/menubar/menubar-2/menubar-2.html
Expand Up @@ -166,21 +166,21 @@ <h3 id="kbd1_label">Menubar</h3>
</tr>
</thead>
<tbody>
<tr>
<tr data-test-id="menubar-key-space-and-enter">
<th>
<kbd>Space</kbd><br><kbd>Enter</kbd>
</th>
<td>Opens submenu and moves focus to first item in the submenu.</td>
</tr>
<tr>
<tr data-test-id="menubar-key-escape">
<th>
<kbd>Escape</kbd>
</th>
<td>
If a submenu is open, closes it. Otherwise, does nothing.
</td>
</tr>
<tr>
<tr data-test-id="menubar-key-right-arrow">
<th>
<kbd>Right Arrow</kbd>
</th>
Expand All @@ -191,7 +191,7 @@ <h3 id="kbd1_label">Menubar</h3>
</ul>
</td>
</tr>
<tr>
<tr data-test-id="menubar-key-left-arrow">
<th>
<kbd>Left Arrow</kbd>
</th>
Expand All @@ -202,31 +202,31 @@ <h3 id="kbd1_label">Menubar</h3>
</ul>
</td>
</tr>
<tr>
<tr data-test-id="menubar-key-down-arrow">
<th>
<kbd>Down Arrow</kbd>
</th>
<td>Opens submenu and moves focus to first item in the submenu.</td>
</tr>
<tr>
<tr data-test-id="menubar-key-up-arrow">
<th>
<kbd>Up Arrow</kbd>
</th>
<td>Opens submenu and moves focus to last item in the submenu.</td>
</tr>
<tr>
<tr data-test-id="menubar-key-home">
<th>
<kbd>Home</kbd>
</th>
<td>Moves focus to first item in the menubar.</td>
</tr>
<tr>
<tr data-test-id="menubar-key-end">
<th>
<kbd>End</kbd>
</th>
<td>Moves focus to last item in the menubar.</td>
</tr>
<tr>
<tr data-test-id="menubar-key-character">
<th>
<kbd>Character</kbd>
</th>
Expand All @@ -249,13 +249,13 @@ <h3 id="kbd2_label">Submenu</h3>
</tr>
</thead>
<tbody>
<tr>
<tr data-test-id="submenu-enter">
<th>
<kbd>Space</kbd><br><kbd>Enter</kbd>
</th>
<td>Activates menu item, causing action to be executed, e.g., bold text, change font. </td>
</tr>
<tr>
<tr data-test-id="submenu-escape">
<th>
<kbd>Escape</kbd>
</th>
Expand All @@ -266,7 +266,7 @@ <h3 id="kbd2_label">Submenu</h3>
</ul>
</td>
</tr>
<tr>
<tr data-test-id="submenu-right-arrow">
<th>
<kbd>Right Arrow</kbd>
</th>
Expand All @@ -278,7 +278,7 @@ <h3 id="kbd2_label">Submenu</h3>
</ul>
</td>
</tr>
<tr>
<tr data-test-id="submenu-left-arrow">
<th>
<kbd>Left Arrow</kbd>
</th>
Expand All @@ -290,7 +290,7 @@ <h3 id="kbd2_label">Submenu</h3>
</ul>
</td>
</tr>
<tr>
<tr data-test-id="submenu-down-arrow">
<th>
<kbd>Down Arrow</kbd>
</th>
Expand All @@ -301,7 +301,7 @@ <h3 id="kbd2_label">Submenu</h3>
</ul>
</td>
</tr>
<tr>
<tr data-test-id="submenu-up-arrow">
<th>
<kbd>Up Arrow</kbd>
</th>
Expand All @@ -312,19 +312,19 @@ <h3 id="kbd2_label">Submenu</h3>
</ul>
</td>
</tr>
<tr>
<tr data-test-id="submenu-home">
<th>
<kbd>Home</kbd>
</th>
<td>Moves focus to the first item in the submenu.</td>
</tr>
<tr>
<tr data-test-id="submenu-end">
<th>
<kbd>End</kbd>
</th>
<td>Moves focus to the last item in the submenu.</td>
</tr>
<tr>
<tr data-test-id="submenu-character">
<th>
<kbd>Character</kbd>
</th>
Expand Down Expand Up @@ -352,7 +352,7 @@ <h3 id="rps1_label">Menubar</h3>
</tr>
</thead>
<tbody>
<tr>
<tr data-test-id="menubar-role">
<th scope="row">
<code>menubar</code>
</th>
Expand All @@ -367,7 +367,7 @@ <h3 id="rps1_label">Menubar</h3>
</ul>
</td>
</tr>
<tr>
<tr data-test-id="menubar-aria-label">
<td></td>
<th scope="row">
<code>aria-label=&quot;<em>string</em>&quot;
Expand All @@ -386,7 +386,7 @@ <h3 id="rps1_label">Menubar</h3>
</ul>
</td>
</tr>
<tr>
<tr data-test-id="menuitem-role">
<th scope="row">
<code>menuitem</code>
</th>
Expand All @@ -401,7 +401,7 @@ <h3 id="rps1_label">Menubar</h3>
</ul>
</td>
</tr>
<tr>
<tr data-test-id="menuitem-tabindex">
<td></td>
<th scope="row">
<code>tabindex=&quot;-1&quot;</code>
Expand All @@ -414,7 +414,7 @@ <h3 id="rps1_label">Menubar</h3>
<strong>not</strong> part of the <kbd>Tab</kbd> sequence of the page.
</td>
</tr>
<tr>
<tr data-test-id="menuitem-tabindex">
<td></td>
<th scope="row">
<code>tabindex=&quot;0&quot;</code>
Expand All @@ -440,7 +440,7 @@ <h3 id="rps1_label">Menubar</h3>
</ul>
</td>
</tr>
<tr>
<tr data-test-id="menuitem-aria-haspopup">
<td></td>
<th scope="row">
<code>aria-haspopup=&quot;true&quot;</code>
Expand All @@ -452,7 +452,7 @@ <h3 id="rps1_label">Menubar</h3>
Indicates that the <code>menuitem</code> has a submenu.
</td>
</tr>
<tr>
<tr data-test-id="menuitem-aria-expanded">
<td></td>
<th scope="row">
<code>aria-expanded=&quot;true&quot;</code>
Expand All @@ -462,7 +462,7 @@ <h3 id="rps1_label">Menubar</h3>
</td>
<td>Indicates the menu is open.</td>
</tr>
<tr>
<tr data-test-id="menuitem-aria-expanded">
<td></td>
<th scope="row">
<code>aria-expanded=&quot;false&quot;</code>
Expand All @@ -485,7 +485,7 @@ <h3 id="rps2_label">Submenu</h3>
</tr>
</thead>
<tbody>
<tr>
<tr data-test-id="menu-role">
<th scope="row">
<code>menu</code>
</th>
Expand All @@ -504,7 +504,7 @@ <h3 id="rps2_label">Submenu</h3>
</ul>
</td>
</tr>
<tr>
<tr data-test-id="menu-aria-label">
<td></td>
<th scope="row">
<code>aria-label=&quot;<em>string</em>&quot;</code>
Expand All @@ -516,7 +516,7 @@ <h3 id="rps2_label">Submenu</h3>
Defines an acessible name for the <code>menu</code>.
</td>
</tr>
<tr>
<tr data-test-id="menuitem-role">
<th scope="row">
<code>menuitem</code>
</th>
Expand All @@ -531,7 +531,7 @@ <h3 id="rps2_label">Submenu</h3>
</ul>
</td>
</tr>
<tr>
<tr data-test-id="menuitem-tabindex">
<td></td>
<th scope="row">
<code>tabindex=&quot;-1&quot;</code>
Expand All @@ -543,7 +543,7 @@ <h3 id="rps2_label">Submenu</h3>
Makes the item focusable but <strong>not</strong> part of the page <kbd>tab</kbd> sequence.
</td>
</tr>
<tr>
<tr data-test-id="menuitem-aria-disabled">
<td></td>
<th scope="row">
<code>aria-disabled=&quot;false&quot;</code>
Expand All @@ -555,7 +555,7 @@ <h3 id="rps2_label">Submenu</h3>
Used on the font size "Smaller" and "Larger" options to indicate they are active.
</td>
</tr>
<tr>
<tr data-test-id="menuitem-aria-disabled">
<td></td>
<th scope="row">
<code>aria-disabled=&quot;true&quot;</code>
Expand All @@ -567,7 +567,7 @@ <h3 id="rps2_label">Submenu</h3>
Used on the font size "Smaller" and "Larger" options to indicate one of the options is <strong>not</strong> active because the largest or smallest font has been selected.
</td>
</tr>
<tr>
<tr data-test-id="menuitemcheckbox-role">
<th scope="row">
<code>menuitemcheckbox</code>
</th>
Expand All @@ -582,7 +582,7 @@ <h3 id="rps2_label">Submenu</h3>
</ul>
</td>
</tr>
<tr>
<tr data-test-id="menuitemcheckbox-tabindex">
<td></td>
<th scope="row">
<code>tabindex=&quot;-1&quot;</code>
Expand All @@ -594,7 +594,7 @@ <h3 id="rps2_label">Submenu</h3>
Makes the menuitemcheckbox focusable but <strong>not</strong> part of the page <kbd>tab</kbd> sequence.
</td>
</tr>
<tr>
<tr data-test-id="menuitemcheckbox-aria-checked">
<td></td>
<th scope="row">
<code>aria-checked=&quot;true&quot;</code>
Expand All @@ -613,7 +613,7 @@ <h3 id="rps2_label">Submenu</h3>
</ul>
</td>
</tr>
<tr>
<tr data-test-id="menuitemcheckbox-aria-checked">
<td></td>
<th scope="row">
<code>aria-checked=&quot;false&quot;</code>
Expand All @@ -632,7 +632,7 @@ <h3 id="rps2_label">Submenu</h3>
</ul>
</td>
</tr>
<tr>
<tr data-test-id="group-role">
<th scope="row">
<code>group</code>
</th>
Expand All @@ -651,7 +651,7 @@ <h3 id="rps2_label">Submenu</h3>
</ul>
</td>
</tr>
<tr>
<tr data-test-id="menuitemradio-role">
<th scope="row">
<code>menuitemradio</code>
</th>
Expand All @@ -674,7 +674,7 @@ <h3 id="rps2_label">Submenu</h3>
</ul>
</td>
</tr>
<tr>
<tr data-test-id="menuitemradio-tabindex">
<td></td>
<th scope="row">
<code>tabindex=&quot;-1&quot;</code>
Expand All @@ -686,7 +686,7 @@ <h3 id="rps2_label">Submenu</h3>
Makes the menuitemradio focusable but <strong>not</strong> part of the page <kbd>tab</kbd> sequence.
</td>
</tr>
<tr>
<tr data-test-id="menuitemradio-aria-checked">
<td></td>
<th scope="row">
<code>aria-checked=&quot;true&quot;</code>
Expand All @@ -705,7 +705,7 @@ <h3 id="rps2_label">Submenu</h3>
</ul>
</td>
</tr>
<tr>
<tr data-test-id="menuitemradio-aria-checked">
<td></td>
<th scope="row">
<code>aria-checked=&quot;false&quot;</code>
Expand Down

0 comments on commit 500e658

Please sign in to comment.