Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add aria-checked support to gridcell and row #2390

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3581,6 +3581,12 @@ <h2>Definition of Roles</h2>
<p>A <code>gridcell</code> can be focusable, editable, and selectable. A <code>gridcell</code> can have <a>relationships</a> such as <pref>aria-controls</pref> to address the application of functional relationships.</p>
<p>If an author intends a <code>gridcell</code> to have a row header, column header, or both, and if the relevant headers cannot be determined from the <abbr title="Document Object Model">DOM</abbr> structure, authors SHOULD explicitly indicate which header cells are relevant to the <code>gridcell</code> by applying <pref>aria-describedby</pref> on the <code>gridcell</code> and referencing [=elements=] with <a>role</a> <rref>rowheader</rref> or <rref>columnheader</rref>.</p>
<p>In a <rref>treegrid</rref>, authors MAY define a <code>gridcell</code> as expandable by using the <sref>aria-expanded</sref> attribute. If the <sref>aria-expanded</sref> attribute is provided, it applies only to the individual cell. It is not a proxy for the container <rref>row</rref>, which also can be expanded. The main use case for providing this attribute on a <code>gridcell</code> is pivot table behavior.</p>
<p>Authors SHOULD NOT specify both <sref>aria-selected</sref> and <sref>aria-checked</sref> on a single <rref>gridcell</rref> element except in the extremely rare circumstances where all the following conditions are met:</p>
<ul>
<li>The meaning and purpose of <sref>aria-selected</sref> is different from the meaning and purpose of <sref>aria-checked</sref> in the user interface.</li>
<li>The user interface makes the meaning and purpose of each state apparent.</li>
<li>The user interface provides a separate method for controlling each state.</li>
</ul>
<p>Authors MUST ensure [=elements=] with <a>role</a> gridcell are <a>accessibility children</a> of an element with the <a>role</a> <rref>row</rref>.</p>
</div>
<table class="role-features">
Expand Down Expand Up @@ -3633,6 +3639,7 @@ <h2>Definition of Roles</h2>
<th class="role-properties-head" scope="row">Supported States and Properties:</th>
<td class="role-properties">
<ul>
<li><sref>aria-checked</sref></li>
<li><sref>aria-disabled</sref></li>
<li><pref>aria-errormessage</pref></li>
<li><sref>aria-expanded</sref></li>
Expand Down Expand Up @@ -6770,6 +6777,12 @@ <h5>Presentational Role Inheritance</h5>
<p>Rows contain <rref>cell</rref> or <rref>gridcell</rref> [=elements=], and thus serve to organize a <rref>table</rref>, <rref>grid</rref>, or <rref>treegrid</rref>.</p>
<p>While the row role can be used in a <rref>table</rref>, <rref>grid</rref>, or <rref>treegrid</rref>, the semantics of <sref>aria-expanded</sref>, <pref>aria-posinset</pref>, <pref>aria-setsize</pref>, and <pref>aria-level</pref> are only applicable to the hierarchical structure of an interactive tree grid. Therefore, authors MUST NOT apply <sref>aria-expanded</sref>, <pref>aria-posinset</pref>, <pref>aria-setsize</pref>, and <pref>aria-level</pref> to a <rref>row</rref> that descends from a <rref>table</rref> or <rref>grid</rref>, and user agents SHOULD NOT expose any of these four properties to assistive technologies unless the <rref>row</rref> descends from a <rref>treegrid</rref>.
</p>
<p>Authors SHOULD NOT specify both <sref>aria-selected</sref> and <sref>aria-checked</sref> on a single <rref>row</rref> element except in the extremely rare circumstances where all the following conditions are met:</p>
<ul>
<li>The meaning and purpose of <sref>aria-selected</sref> is different from the meaning and purpose of <sref>aria-checked</sref> in the user interface.</li>
<li>The user interface makes the meaning and purpose of each state apparent.</li>
<li>The user interface provides a separate method for controlling each state.</li>
</ul>
<p>Authors MUST ensure [=elements=] with <a>role</a> <code>row</code> are <a>accessibility children</a> of an element with the role <rref>table</rref>, <rref>grid</rref>, <rref>rowgroup</rref>, or <rref>treegrid</rref>.</p>
<p class="note" title="Usage of aria-disabled">While <sref>aria-disabled</sref> is currently supported on <rref>row</rref>, in a future version the working group plans to prohibit its on elements with role <rref>row</rref> except when the element is in the context of a <rref>grid</rref> or <rref>treegrid</rref>.</p>
</div>
Expand Down Expand Up @@ -6837,6 +6850,7 @@ <h5>Presentational Role Inheritance</h5>
<th class="role-properties-head" scope="row">Supported States and Properties:</th>
<td class="role-properties">
<ul>
<li><sref>aria-checked</sref></li>
<li><pref>aria-colindex</pref></li>
<li><sref>aria-expanded</sref></li>
<li><pref>aria-level</pref></li>
Expand Down
Loading