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

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

Closed
andrewhayward opened this issue Dec 7, 2023 · 0 comments · Fixed by #56860
Closed

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

andrewhayward opened this issue Dec 7, 2023 · 0 comments · Fixed by #56860
Assignees
Labels
[Feature] DataViews Work 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 Progress Tracking issues with work in progress [Type] Enhancement A suggestion for improvement.

Comments

@andrewhayward
Copy link
Contributor

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>
...
@andrewhayward andrewhayward added [Type] Enhancement A suggestion for improvement. [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). [Feature] DataViews Work surrounding upgrading and evolving views in the site editor and beyond labels Dec 7, 2023
@andrewhayward andrewhayward self-assigned this Dec 7, 2023
@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Dec 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] DataViews Work 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 Progress Tracking issues with work in progress [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant