Problem/Motivation

The result count for modules matching your search is combined with all your existing filters in a way where it gets lost. Users at listening sessions were unable to find the results count on their own as an aid to answering questions about how the filters behaved.

Proposed resolution

Move the result count to its own line, and increase its visibility (perhaps with a size increase, etc). May need some design input.

Remaining tasks

  • ✅ File an issue about this project
  • ☐ Design input
  • ☐ Manual Testing
  • ☐ Code Review
  • ☐ Accessibility Review
  • ☐ Automated tests needed/written?
Command icon 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

chrisfromredfin created an issue. See original summary.

rkoller’s picture

would it make sense to move the count outside the filterbox same height like the list and grid buttons? either aligned to the left as the exact opposite of list/grid or place or place it right before? but in general a +1 to move it somewhere else.

anmolgoyal74’s picture

The random data plugin tab shows the wrong count when we switch to the source plugin tab.
As suggested, when we move the count

Correct count when we on random data count (correct count is 6)
correct

Incorrect count when switched to a different tab (incorrect count 1)
issue

anmolgoyal74’s picture

Issue tags: +Prague2022

Utkarsh_33 made their first commit to this issue’s fork.

utkarsh_33’s picture

Assigned: Unassigned » utkarsh_33
utkarsh_33’s picture

Assigned: utkarsh_33 » Unassigned

utkarsh_33’s picture

Changed the location of the "search results".

Random data plugin shows wrong count because random number of projects are fetched .
Reference for above:-https://git.drupalcode.org/project/project_browser/-/blob/1.0.x/modules/project_browser_devel/src/Plugin/ProjectBrowserSource/RandomDataPlugin.php#L151
Random data plugin is only for testing purpose.

rkoller’s picture

Issue tags: +Usability, +Accessibility

Nice thanks for working on this. I've applied successfully MR274. A few observations and thoughts.

1. i like the addition of the results in the row of the list and grid buttons as suggested in #2

2. i've noticed when you narrow down the viewport that result count disappears?

3. would it make sense to announce the result count with drupal.announce? something like for example 4262 results for drupal.org (mocked). cuz currently the result are only available if you actively tab through to the according project source tab. it would be easier to process if you type in a search and get the results announced directly to you.

4. And i have to admit i havent even noticed that without the patch the project source tabs have a result count as well. why show the results for each tab and source at all? with the other result count moved out of the filter component and closer to the tabs it is also sort of redundant for the active source. and why show the results for all the project source tabs? what is the benefit? wouldn't it be clearer to output only the results count for the active project source?

rkoller’s picture

fjgarlin’s picture

I'd also remove the count number from the plugin tabs as it can be misleading due to the fact that some filters are common to all plugins and some others are specific per plugin (ie: categories). The result count is still displayed in the new position (changes in this MR), but there is no need to have it in the plugin tabs.

fjgarlin’s picture

utkarsh_33’s picture

Status: Active » Needs review
rkoller’s picture

Status: Needs review » Needs work
StatusFileSize
new45.54 KB
new18.9 KB

thanks! I've applied the latest changes. a few details i would note.

1. the results count and the list and grid buttons aren't in the same row anymore. They are stacked. one row the results count left aligned and the list and grid buttons in the next row right aligned.

result count and list and grid buttons not in the same line / row

2. if you change the reading direction in the devtools the stacking is more apparent due to the misplacement of the list button

result count and grid and list button in rtl. count and buttons are in different rows and the list button is not left but right aligned so grid and list are on opposite ends of the line

3. about adding results for [plugin source] at the end of the results count. i am not sure. i see the point for screenreader users with a small working memory. sighted users with small working memory have always the fallback to quickly revisit the active plugin source tab as a reminder about the active plugin source context. for screen reader users it is more challenging. but then there is alsothe point trying to communicate the same information for everyone. then adding the context at the end of the count would make sense. but i am not sure. would perhaps tend to wrap the results for [plugin source] in a visually hidden span still. but as i said not sure what the best choice would be. what others think?

tim.plunkett’s picture

Issue tags: +core-mvp
utkarsh_33’s picture

I have addressed all the feedbacks mentioned in #15. The second point in #15 is covered inRTL support

utkarsh_33’s picture

Status: Needs work » Needs review
narendrar’s picture

Assigned: Unassigned » utkarsh_33
Status: Needs review » Needs work

Result count AT work is done as part of Update the screen readers about change in result count.. Suggested some small feedback.

utkarsh_33’s picture

Status: Needs work » Needs review
narendrar’s picture

Status: Needs review » Needs work
utkarsh_33’s picture

Assigned: utkarsh_33 » Unassigned
Status: Needs work » Needs review
narendrar’s picture

Assigned: Unassigned » utkarsh_33
Status: Needs review » Needs work

#3323531: Update the screen readers about change in result count. is merged and changes needs to be done as per that issue (output tag is removed).
It would be good if required changes are done in a new MR.

utkarsh_33’s picture

Status: Needs work » Needs review
utkarsh_33’s picture

Assigned: utkarsh_33 » Unassigned
utkarsh_33’s picture

narendrar’s picture

Status: Needs review » Needs work

It does not announce the latest changes.

utkarsh_33’s picture

Status: Needs work » Needs review
utkarsh_33’s picture

We can also announce the results on changing the tabs which is currently not happening .

utkarsh_33’s picture

@bnjmnm We have this function refreshLiveRegion() in Search.svelte component and we want to access this function in ProjectBrowser.svelte. Is there any easier way to do that .
I have already tried using some methods using stores and importing the ProjectBrowser.svelte component(which is not permitted because of the cyclic nature) in Search.svelte.

srishtiiee made their first commit to this issue’s fork.

bnjmnm made their first commit to this issue’s fork.

bnjmnm’s picture

We have this function refreshLiveRegion() in Search.svelte component and we want to access this function in ProjectBrowser.svelte. Is there any easier way to do that .
I have already tried using some methods using stores and importing the ProjectBrowser.svelte component(which is not permitted because of the cyclic nature) in Search.svelte.

Just move the function to ProjectBrowser.svelte and pass it down to Search.svelte. I did that here. It can now be used by ProjectBrowser.svelte, add it where you need to.

chrisfromredfin’s picture

Status: Needs review » Needs work

Tried to review, but the rebase is really hairy on this one. If someone with better knowledge can get it rebased I can take another look.

fjgarlin’s picture

I tried to rebase but when compiling svelte it was complaining about unused selectors and styles, so that means I probably did something wrong. I'll leave the rebase to you guys as I don't want to mess anything up.

chrisfromredfin’s picture

Status: Needs work » Needs review

According to testbot, the most recent passes, actually. Just trying to kick for a re-test.

chrisfromredfin’s picture

Status: Needs review » Needs work

I think these test fails are legit.

tim.plunkett’s picture

Status: Needs work » Needs review

Marking back to NR since @Utkarsh_33 fixed the tests

chrisfromredfin’s picture

Status: Needs review » Reviewed & tested by the community

Tests are passing, I reviewed the code, I tested in DrupalPod and w/ VoiceOver on to check the aria-live region, and all seems to be behaving as expected!

tim.plunkett’s picture

Status: Reviewed & tested by the community » Needs work
utkarsh_33’s picture

Status: Needs work » Needs review

chrisfromredfin’s picture

StatusFileSize
new19.15 KB

I can't push right now; I think because my SSH keys changed since I got push access to this old fork? Here's a patch where I've attempted a manual rebase. We'll see if I got the tests right.........

fjgarlin’s picture

Status: Needs review » Reviewed & tested by the community

Thanks for the rebasing!! I bet it wasn't an easy one.

Code looks good, mostly moving code between files and adding a useful label for screen readers.
Tested it with drupalpod as well and it all worked as expected.

Marking it RTBC.

tim.plunkett’s picture

The development status was showing up twice. Fixed that, hope I didn't break anything else

fjgarlin’s picture

Oh dear, how did I miss that. Thanks Tim!

chrisfromredfin’s picture

Tests are passing! SHIP IT! QUICK!!

tim.plunkett’s picture

Status: Reviewed & tested by the community » Fixed

Merged!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.