Problem/Motivation
The Sort option dropdown does not indicate that it contains options to sort the results. The default displayed is "Project Usage", It is not clear to users that this dropdown has other options to sort the results by. The "Filters" button is clear that you select that button to view the available filters. The Sort option needs the same type of clarify.
Steps to reproduce
1. After installing and enabling the project_browser module
2. Visit the /admin/module/browse page
3. Select Project Usage and Filters options to understand what they do.

Proposed resolution
Add a "Sort" label above the dropdown to indicate the purpose of the dropdown. Make sure the solution meets accessibility guidelines.
Remaining tasks
- ✅ File an issue about this project
- ☐ Manual Testing
- ☐ Code Review
- ☐ Accessibility Review
- ☐ Automated tests needed/written?
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | sort_label.png | 85.16 KB | srishtiiee |
| Sortoptions.png | 120.01 KB | leslieg |
Issue fork project_browser-3285880
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
leslieg commentedComment #3
leslieg commentedComment #5
srishtiiee commentedThis was previously discussed in "The sort dropdown should be a
element" and as the sorting criteria is set to
project_usageby default, it would be fine to go back to having a hidden option which would appear only once when the page is first loaded and will provide more clarity over its functionality without affecting the expected behaviour of the select list.Comment #6
bnjmnmThe solution in the MR will not work is it's not accessible. "Sort" is reported as the value of the select, which is not how it is currently sorting, nor is it a valid option. This is even technically inaccurate for sighted users as the default sort criteria isn't "sort". The element should always report the value it represents, even on page load.
There'a already a label for this form element that is currently visually-hidden. Unhide that (or at least unhide the word "sort") and you'll have a label that indicates the element's purpose while keeping the
<select>semantically correct.Comment #7
srishtiiee commentedGot it! Thanks for explaining. I'll make the changes.
Comment #8
srishtiiee commentedComment #9
narendrarLooks good to me. May be one small change that can be done to look visually correct is to replace
Sort bywithSort by:Comment #10
narendrarComment #13
tim.plunkettMerged, thanks!