grommet/grommet

DataTable: sortable columns missing aria-sort="none" and unsorted icon should be aria-hidden

Offen

#7.924 geöffnet am 15.04.2026

 (1 Kommentar) (0 Reaktionen) (1 zugewiesene Person)JavaScript (1.015 Forks)batch import
accessibilitygood first issue

Repository-Metriken

Stars
 (8.247 Sterne)
PR-Merge-Metriken
 (Durchschn. Merge 3T 16h) (9 gemergte PRs in 30 T)

Beschreibung

Is this something you or your team is interested in contributing a pull request towards?

Yes

Expected Behavior

Two related fixes needed for sortable columns that are not currently sorted:

The element should have aria-sort="none" so AT users can discover the column is sortable before interacting with it. Currently only "ascending" and "descending" are set in Header.js the unsorted state is omitted entirely.

The neutral ↕ sort indicator icon shown on unsorted sortable columns should have aria-hidden="true". It is decorative in this context sortability will be communicated via aria-sort="none". Without aria-hidden, some AT may announce an unlabelled SVG since iconAriaLabel is undefined in this state.

Actual Behavior

aria-sort is absent on sortable columns that are not currently sorted The ↕ icon on unsorted sortable columns has no aria-hidden="true" and no label

URL, Screenshot, or CodeSandbox

n/a

Steps to Reproduce

Render a DataTable with sortable columns. Inspect the elements on unsorted columns — no aria-sort attribute is present and the sort icon SVG has no aria-hidden.

https://storybook.grommet.io/?path=/story/visualizations-datatable-sort--sort

Your Environment

latest Grommet

Contributor Guide