Public catalog view sort-dropdown options need accessible labels for screen readers
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)
- Use a screen reader to view your Hyrax application (Windows: Narrator, NVDA, or JAWS; Mac: VoiceOver)
- Navigate to catalog view (/catalog)
- Expand the Sort By button to see available options
- 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.
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.
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 @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.
ok let me work up a different approach then. thanks
So something like this should work what do you think?