hyrax icon indicating copy to clipboard operation
hyrax copied to clipboard

Public catalog view sort-dropdown options need accessible labels for screen readers

Open nhomenda opened this issue 2 months ago • 5 comments

Descriptive summary

In the public catalog view, sort-dropdown options are currently:

  • relevance
  • date uploaded ▼
  • date uploaded ▲
  • date modified ▼
  • date modified ▲

The triangle symbols read as "triangle" to screen readers and should read as "descending" and "ascending"

Steps to reproduce the behavior in User Interface (UI)

  1. Use a screen reader to view your Hyrax application (Windows: Narrator, NVDA, or JAWS; Mac: VoiceOver)
  2. Navigate to catalog view (/catalog)
  3. Expand the Sort By button to see available options
  4. Note how "triangle" is stated rather than "ascending" and "descending"

Acceptance Criteria/Expected Behavior

  • [ ] Screen readers read "ascending" and "descending" instead of "triangle" for sort options, e.g. "date uploaded descending"

Rationale

Sort options currently can't be differentiated in a screen reader.

nhomenda avatar Oct 08 '25 13:10 nhomenda

Looking over the setup the sorting is coming from blacklight so I would need to build out a proper override to add the sr-only span to add the correct text.

trmccormick avatar Dec 03 '25 17:12 trmccormick

FWIW it looks like Sanford handles this in their Blacklight catalog using fully textual labels: "year (new to old)", "year (old to new)". It might be a bit long but I think it is probably clearer for all users to use this approach than the triangles or "descending"/"ascending".

cjcolvar avatar Dec 03 '25 19:12 cjcolvar

@cjcolvar @trmccormick I agree. I just looked at a few other examples and this seems to be the predominant way of handling this nowadays, so I'd be fine with that approach.

nhomenda avatar Dec 03 '25 19:12 nhomenda

ok let me work up a different approach then. thanks

trmccormick avatar Dec 03 '25 21:12 trmccormick

So something like this should work what do you think?

Image

trmccormick avatar Dec 03 '25 21:12 trmccormick