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

Add guidance for aria-colindextext and aria-rowindextext for issue 1075 #1204

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
31 changes: 31 additions & 0 deletions aria-practices.html
Original file line number Diff line number Diff line change
Expand Up @@ -5807,6 +5807,7 @@ <h2>Grid and Table Properties</h2>
<li>Whether any columns or rows are hidden, e.g., columns 1 through 3 and 5 through 8 are visible but column 4 is hidden.</li>
<li>Whether a cell spans multiple rows or columns.</li>
<li>Whether and how data is sorted.</li>
<li>How to communicate cell position, e.g., <q>row 2, column 2</q> or <q>row 2, column B</q> (like in most spread sheets).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No space in "spreadsheets".

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But how is it a real spreadsheet if it isn’t spread by a space? 🤔

</ul>
<p>
Browsers automatically populate their accessibility tree with the number of rows and columns in a grid or table based on the rendered DOM.
Expand Down Expand Up @@ -5840,6 +5841,10 @@ <h2>Grid and Table Properties</h2>
</ul>
</td>
</tr>
<tr>
<th><code>aria-colindextext</code></th>
<td>Defines a human readable text alternative of aria-colindex .</td>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

aria-colindex should be in <code>, and remove extra space before '.'

</tr>
<tr>
<th><code>aria-rowindex</code></th>
<td>
Expand All @@ -5849,6 +5854,10 @@ <h2>Grid and Table Properties</h2>
</ul>
</td>
</tr>
<tr>
<th><code>aria-rowindextext</code></th>
<td>Defines a human readable text alternative of aria-rowindex .</td>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

aria-rowindex should be in <code>, and remove extra space before '.'

</tr>
<tr>
<th><code>aria-colspan</code></th>
<td>Defines the number of columns spanned by a cell or gridcell within a <code>table</code>, <code>grid</code>, or <code>treegrid</code>.</td>
Expand Down Expand Up @@ -6276,6 +6285,28 @@ <h3>Indicating sort order with <code>aria-sort</code></h3>


</section>

<section id="gridAndTableProperties_indextext">
<h3>Communicating cell position with <code>aria-colindextext</code> and <code>aria-rowindextext</code></h3>
<p>
When cell positions are visually communicated using strings or symbols other than the numeric values represented by the sequential one-based counting provided by <code>aria-colindex</code> and <code>aria-rowindex</code>,
the <a href="aria-colindextext" class="property-reference">aria-colindextext</a> and <a href="aria-rowindextext" class="property-reference">aria-rowindextext</a> properties can be used to convey an alternative position string.
For example, in a spreadsheet where the columns are assigned letter addresses, such as <q>A</q>, <q>B</q>, <q>C</q>, etc., <code>aria-colindextext</code> can be applied to cells to inform assistive technologies that the column position should be communicated using <q>A</q> instead of <q>1</q>, <q>B</q> instead of <q>2</q>, and so on.
</p>
<p>It is important to note that:</p>
<ul>
<li>These properties are not alternative means of communicating column and row headings; they are to be used only for communicating cell positions (coordinates).</li>
<li>
If <code>aria-colcount</code> is specified, it is necessary to specify <code>aria-colindex</code> even if <code>aria-colindextext</code> is specified.
Similarly, if <code>aria-rowcount</code> is specified, it is necessary to specify <code>aria-rowindex</code> even if <code>aria-rowindextext</code> is specified.
This is because some assistive technology functionality may rely on numerical position values.
</li>
<li>
Unlike aria-colindex, aria-colindextext cannot be specified on a row.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add <code> for aria-colindex and aria-colindextext

This is because browsers cannot use a value specified on the row to calculate <code>aria-colindextext</code> values for the cells within the row.
</li>
</ul>
</section>

</section>

Expand Down