diff --git a/third_party/aria-practices/src/content/patterns/table/examples/sortable-table.html b/third_party/aria-practices/src/content/patterns/table/examples/sortable-table.html index 7693433ea25c0..86736fd741b9a 100644 --- a/third_party/aria-practices/src/content/patterns/table/examples/sortable-table.html +++ b/third_party/aria-practices/src/content/patterns/table/examples/sortable-table.html @@ -2,65 +2,13 @@ - Sortable Table Example - - - - - - - - - -
-

Sortable Table Example

- -
-

About This Example

- -

- The example below illustrates an implementation of the Table Pattern for a table with sortable rows. - The example uses HTML table markup for all elements of the table structure, e.g., cells, rows, column headers, and caption. - The aria-sort attribute is set on the column header of the currently sorted column, and the header text of sortable columns is wrapped in a button element. - One column, the Address column is not sortable. -

-

Similar examples include:

- -
- -
-

Example Option

- -

- Adds a diamond shaped icon (e.g. ) to the header of each column that can be sorted but is not currently sorted. - Some sortable tables add an icon to unsorted columns to help users distinguish sortable columns from columns that cannot be sorted. - It is important that the shape of the unsorted icon differ in more than just color and size from the icons that indicate sort direction (e.g. '▼' and '▲') so people with visual impairments can easily distinguish them. -

-
- -
-
-

Example

-
-
@@ -128,96 +76,5 @@
- -
- -
-

Accessibility Features

- -
- -
-

Keyboard Support

-

Not applicable: The only interactive elements are HTML button elements, and all their keyboard functionality is provided by browsers.

-
- -
-

Role, Property, State, and Tabindex Attributes

- - - - - - - - - - - - - - - - - - - - - - - -
RoleAttributeElementUsage
aria-sort="value"th -
    -
  • - Set on the currently sorted column. - When the sorted column is changed, the aria-sort attribute is removed and set on the newly sorted column. -
  • -
  • A value of "ascending" indicates the data cells in the column are sorted in ascending order.
  • -
  • A value of "descending" indicates the data cells in the column are sorted in descending order.
  • -
-
aria-hidden="true"spanRemoves the character entities used for sort icons from the accessibility tree to prevent them from being included in the accessible name of the sort buttons.
-
- -
-

JavaScript and CSS Source Code

- -
- -
-

HTML Source Code

-

To copy the following HTML code, please open it in CodePen.

- -
- - -
-