A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.w3.org/WAI/ARIA/apg/patterns/table/examples/sortable-table/ below:

Sortable Table Example | APG | WAI

Sortable Table Example Sortable Table Example The code in this example is not intended for production environments. Before using it for any purpose, read this to understand why.

This is an illustrative example of one way of using ARIA that conforms with the ARIA specification.

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 Display sort icon in headers of sortable columns that are not sorted

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.

Students currently enrolled in WAI-ARIA 101  (column headers with buttons are sortable). Address Fred Jackson Canary, Inc. 123 Broad St. 56 Sara James Cardinal, Inc. 457 First St. 7 Ralph Jefferson Robin, Inc. 456 Main St. 513 Nancy Jensen Eagle, Inc. 2203 Logan Dr. 3.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 Role Attribute Element Usage aria-sort="value" th aria-hidden="true" span Removes 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.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4