diff --git a/aria-practices.html b/aria-practices.html index bcd417fdc2..c6d173c1a3 100644 --- a/aria-practices.html +++ b/aria-practices.html @@ -1227,7 +1227,7 @@
A grid widget is a container that enables users to navigate the information or interactive elements it contains using directional navigation keys, such as arrow keys, Home , and End. As a generic container widget that offers flexible keyboard navigation, it can serve a wide variety of needs. @@ -2288,7 +2288,7 @@
- As with other WAI-ARIA roles that have a native host language equivalent,
+ As with other WAI-ARIA roles that have a native host language equivalent,
authors are strongly encouraged to use a native HTML table
element whenever possible.
This is especially important with role table
because it is a new feature of WAI-ARIA 1.1.
It is thus advisable to test implementations thoroughly with each browser and assistive technology combination that could be used by the target audience.
@@ -2507,7 +2507,7 @@
NOTE: This design pattern is work in progress; it does not yet have task force consensus. - Progress and discussions are captured in + Progress and discussions are captured in issue 128.
@@ -2735,6 +2735,244 @@
+ A treegrid widget presents a hierarchical data grid consisting of tabular information that is editable or interactive.
+ Any row in the hierarchy may have child rows, and rows with children may be expanded or collapsed to show or hide the children.
+ For example, a hierarchical e-mail discussion list uses a treegrid
to display messages and responses to that message, a message row with responses can be expanded to reveal the response messages.
+
+ In a treegrid both rows and cells are focusable. Every row and cell contains a focusable element or is itself focusable, regardless of whether individual cell content is editable or interactive.
+ There is one exception: if column cells do not provide functions, such as sort or filter, they do not need to be focusable.
+ One reason it is important for all cells to be able to receive or contain keyboard focus is that screen readers will typically be in their application reading mode, rather than their document reading mode, when users are interacting with the grid.
+ While in application mode, a screen reader user hears only focusable elements and content that labels focusable elements.
+ So, screen reader users may unknowingly overlook elements contained in a treegrid
that are either not focusable or not used to label a column or row.
+
+ When using a keyboard to navigate a treegrid
, a visual keyboard indicator informs the user which row or cell is focused.
+ If the treegrid
allows the user to choose just one item for an action, then it is known as a single-select treegrid
, and the item with focus also has a selected state.
+ However, in multi-select treegrid
s, which enable the user to select more than one row or cell for an action, the selected state is independent of the focus.
+ For example, in a hierarchical e-mail discussion grid, the user can move focus to select any number of rows for an action, such as delete or move.
+ It is important that the visual design distinguish between items that are selected and the item that has focus.
+ For more details, see this description of differences between focus and selection.
+
treegrid
Example with three types of focus navigation: Rows first, cells first and cells only interaction options.
+
+ The following keys provide treegrid
navigation by moving focus among rows and cells of the grid.
+ Implementations of treegrid
make these key commands available when an element in the grid has received focus, e.g., after a user has moved focus to the grid with Tab. Moving focus into the grid may result in the first cell or the first row being focused. Whether focus goes to a cell or the row depends on author preferences and whether row focus is supported, since some treegrid
s may not provide focus to rows.
+
aria-expanded
property it will will open or close the child rows, otherwise performs the default action for the cell.treegrid
widget to the next focusable control on the page. treegrid
navigation keys move focus, whether the focus is set on an element inside the cell or the grid cell depends on cell content.
+ See Whether to Focus on a Cell or an Element Inside It.
+ If a grid supports selection of cells, rows, or columns, the following keys are commonly used for these functions.
+treegrid
element or an element with role rowgroup. row
element and has one of the following roles:
+ row
with the aria-expanded state or that contains a gridcell
with the aria-expanded
state identifies the row as a parent row.
+ Set to aria-expanded
to false
when the child rows are in a closed state and set to true
when the child rows are in an open state.
+ End rows cannot have the aria-expanded
attribute because, if they were to have it, they would be incorrectly described to assistive technologies as parent nodes.
+ treegrid
has aria-multiselectable set to true
. Otherwise, aria-multiselectable
is either set to false
or the default value of false
is implied.true
for the selected row or cell and it is not present on any other row or cell in the treegrid.true
.false
.true
. true
on cells where editing is disabled.
+ If edit functions are disabled for all cells, aria-readonly
may be set true
on the grid element.
+ Grids that do not provide editing functions do not include the aria-readonly
attribute on any of their elements.
+ treegrid
role is NOT applied to an HTML table
element, then aria-rowspan or aria-colspan is applied as described in grid and table properties.treegrid
role is an HTML table
element, then it is not necessary to use ARIA roles for rows and cells because the HTML elements have implied ARIA semantics.
+ For example, an HTML <TR>
has an implied ARIA role of row
.
+ A treegrid
built from an HTML table
that includes cells that span multiple rows or columns must use HTML rowspan
and colspan
and must not use aria-rowspan
or aria-colspan
.
+ treegrid
element unless the DOM descendants are also included in the aria-owns
attribute.
+