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

Proposed changes to aria-sort documentation entry #2376

Open
Wildebrew opened this issue Nov 17, 2024 · 1 comment
Open

Proposed changes to aria-sort documentation entry #2376

Wildebrew opened this issue Nov 17, 2024 · 1 comment
Assignees
Labels
editorial a change to an example, note, spelling, grammar, or is related to publishing or the repo

Comments

@Wildebrew
Copy link

aria-sort documentation could do with some changes

The first problem with aria-sort documentation entry is the sentence that aria-sort should only be applied to one column/row header at a time.

It's a usability recommendation which people frequently mistake for a requirement, i.e. they think that having aria-sort on one than more header cell in a table is an ARIA/WCAG violation.
I'm quite puzzled why this sentence is even there.

  • There are no such restrictions on HTML tables.
  • I've done quite a bit of googling about UX and table sorting and have not found strong language suggesting that tables should only be sorted by a single column.
  • Having a table sorted by multiple columns can improve discoverability of information if used correctly, e.g. the ability to sort an employee directory by both last name and first name
    I really do not understand why we should explicitly discourage it. We typically don't put usability considerations into ARIA property definition documentation.

The second is the sentence that aria-sort should only be used on header cells. While true, it feels somewhat redundant. After all, the aria-sort attribute is only valid on header cells.
I think the sentence should be phrased more like "use the aria-sort attribute on column or row header cells to indicate that the table is sorted by that column or row.

Which leads me to the third and biggest question: What is the meaning of aria-sort="none"?

Is it the same as having no aria-sort attribute or does it mean that the table can be sorted by that column/row but currently isn't.
I see no value in aria-sort="none" being the same as not having an aria-sort attribute. If so, that value should not even be in the token list.
So I take it to indicate that the table could be sorted by this column but no sort is currently applied.

In my latest testing, no screen reader announces the presence of aria-sort="none" on a table header cell, it is ignored altogether.
I would expect a screen reader to announce something like "not sorted" or "no sort applied" when you navigate to header cells with aria-sort="none", but they announce nothing.

If aria-sort="none" is not announced by a screen reader, authors have to resort to adding screen reader only text into the header cell, something like "click to sort". There's nothing like overly verbose header cells to ruin the screen reader table navigation experience.
I could file issues with screen reader vendors (or browsers if there is no entry in the accessibility tree for aria-sort="none") but I think it has to start with clearer requirement language in the ARIA spec.

@Wildebrew Wildebrew added the editorial a change to an example, note, spelling, grammar, or is related to publishing or the repo label Nov 17, 2024
@spectranaut
Copy link
Contributor

Sort of related to: w3c/core-aam#239

@Wildebrew, thank you for this issue. When making issues on ARIA, and when doing testing like you have done, it is extremely helpful to list the screen readers you tested with and their exact results. It helps us to be able to do further (and not duplicated) testing in response to your issue. Could you let us know which screen readers you test with that announce nothing for "aria-sort=none", and also the exact mark up you used?

@spectranaut spectranaut self-assigned this Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
editorial a change to an example, note, spelling, grammar, or is related to publishing or the repo
Projects
None yet
Development

No branches or pull requests

2 participants