Skip to content

Commit

Permalink
Tabs Pattern: Add guidance on tab list labeling
Browse files Browse the repository at this point in the history
For issue #620, changed the roles, states, and properties section of the tabs pattern in aria-practices.html.

State aria-labelledby or aria-label is used to label the tablist element.
  • Loading branch information
mcking65 committed Jul 20, 2018
1 parent da21a48 commit 55b113f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions aria-practices.html
Original file line number Diff line number Diff line change
Expand Up @@ -2436,6 +2436,10 @@ <h4>WAI-ARIA Roles, States, and Properties</h4>
<li>The element that serves as the container for the set of tabs has role <a class="role-reference" href="#tablist">tablist</a>. </li>
<li>Each element that serves as a tab has role <a class="role-reference" href="#tab">tab</a> and is contained within the element with role <code>tablist</code>.</li>
<li>Each element that contains the content panel for a <code>tab</code> has role <a class="role-reference" href="#tabpanel">tabpanel</a>.</li>
<li>
If the tab list has a visible label, the element with role <code>tablist</code> has <a href="#aria-labelledby" class="property-reference">aria-labelledby</a> set to a value that refers to the labeling element.
Otherwise, the <code>tablist</code> element has a label provided by <a href="#aria-label" class="property-reference">aria-label</a>.
</li>
<li>Each element with role <code>tab</code> has the property <a href="#aria-controls" class="property-reference">aria-controls</a> referring to its associated <code>tabpanel</code> element.</li>
<li>The active <code>tab</code> element has the state <a href="#aria-selected" class="state-reference">aria-selected</a> set to <code>true</code> and all other <code>tab</code> elements have it set to <code>false</code>.</li>
<li>Each element with role <code>tabpanel</code> has the property <a href="#aria-labelledby" class="property-reference">aria-labelledby</a> referring to its associated <code>tab</code> element. </li>
Expand Down

0 comments on commit 55b113f

Please sign in to comment.