Skip to content

[Data Views] Table layout: add aria-sort to column headings as appropriate #56853

Closed

Description

@andrewhayward

What problem does this address?

Columns in the table layout can be sorted, but this is only communicated visually, and not semantically.

Header cells from a table layout, reading "Title", "Author", "Status" and "Actions". "Author" has an upwards-pointing chevron to visually indicate it is sorted.

What is your proposed solution?

If a column is sorted, aria-sort should be set on the relevant th, with a value of ascending or descending as appropriate.

...
  <thead>
    <tr>
      <th>
        <button ...>Title</button>
      </th>
      <th aria-sort="ascending">
        <button ...>Author ⌃</button>
      </th>
      <th>
        <button ...>Status</button>
      </th>
      <th>
        Author
      </th>
    </tr>
  </thead>
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

[Feature] DataViewsWork surrounding upgrading and evolving views in the site editor and beyond[Focus] Accessibility (a11y)Changes that impact accessibility and need corresponding review (e.g. markup changes).[Status] In ProgressTracking issues with work in progress[Type] EnhancementA suggestion for improvement.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    Sponsor
    SponsoredKunjungi sekarang
    Promo