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

Search filter change reloads page without warning to user #3299

Open
hostle83 opened this issue Sep 4, 2024 · 4 comments · May be fixed by #3385 or #3841
Open

Search filter change reloads page without warning to user #3299

hostle83 opened this issue Sep 4, 2024 · 4 comments · May be fixed by #3385 or #3841
Assignees
Labels
accessibility affects: main Issue impacts "main" (latest release). affects: 7.x Issue impacts 7.x releases affects: 8.x Issue impacts 8.x releases bug component: Discovery related to discovery search or browse system Estimate TBD help wanted Needs a volunteer to claim to move forward

Comments

@hostle83
Copy link

hostle83 commented Sep 4, 2024

Describe the bug
According to WCAG 2 Success Criterion: 3.2.2 On Input (A), users should be warned before a change of context occurs on a site. Currently, any change to a search filter selection reloads content and the page and there is no announcement to a screen reader user (exception: date range filter, this has been updated, see #3094)
See https://www.w3.org/WAI/WCAG21/Understanding/on-input.html for reference.

To Reproduce
Steps to reproduce the behavior:

  1. Visit the search page on the sandbox, demo, or localhost (.../search?query=)
  2. Expand any search filter
  3. Adjust the search by using any filter

Expected behavior
Either warn the user of the change of context (reload) beforehand, or give the user to activate the change themselves by providing a button or similar functionality

Related work
#3094

@hostle83 hostle83 added bug needs triage New issue needs triage and/or scheduling labels Sep 4, 2024
@github-project-automation github-project-automation bot moved this to 🆕 Triage in DSpace Backlog Sep 4, 2024
@tdonohue tdonohue added help wanted Needs a volunteer to claim to move forward accessibility component: Discovery related to discovery search or browse system Estimate TBD affects: main Issue impacts "main" (latest release). affects: 8.x Issue impacts 8.x releases affects: 7.x Issue impacts 7.x releases labels Sep 4, 2024
@tdonohue tdonohue removed this from DSpace Backlog Sep 4, 2024
@Andrea-Guevara
Copy link
Contributor

Andrea-Guevara commented Sep 16, 2024

Good afternoon @tdonohue and @hostle83! My name is Andrea and I'm part of the Neki-it company. We studied this issue and thought of several possibilities to solve the problem.

Would the focus be on users who use assistive technologies?
If so, we thought that using the “aria-live” attribute would help, as it indicates that a certain region of the page will be updated and describes the type of update that users can expect from that region.
Reference: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-live

Another possibility would be to create an alert or confirmation modal that appears every time the search filter is selected. But this would reflect in a general sense, not just for users who make use of assistive technologies.

We would like to contribute to resolving this issue. We look forward to your feedback.

@tdonohue
Copy link
Member

@Andrea-Guevara : Yes, the focus of this ticket is on users who use assistive technologies. But, it also can be seen as "odd" to any user that the entire page reloads anytime you change a search filter.

While I'm not against an aria-live idea, I think it might be best to first investigate whether we can fix this problem by ensuring the page does not reload when you select/deselect a search filter. This is similar to how we fixed #3094 (which is a similar bug with the date slider). See the fix in #3236 , which was to update the date slider to no longer reload the page.

So, my preference would be to see if we can just stop reloading the entire page each time a filter is selected/removed. If there's no way to achieve that, we could consider an aria-live.

If you'd still like to claim this, let us know.

@Andrea-Guevara
Copy link
Contributor

Good afternoon @tdonohue!

I've been doing some tests to avoid reloading the search page when clicking on a filter option but I understand that this reload is necessary to update the url and bring the filter results.

I think I understood what was done on the date with the “submit” button; the user chooses a date and clicks the button, where the result is brought up without reloading the page. But if the user clicks on the date suggestions offered by DSpace, the reload will still happen.
Screenshot_3

Even with a similar implementation, the accessibility problem would remain. Generally, users who make use of assistive technology use the keyboard to reach their target, in this case the filter. And if they click on any suggestion in the filter, the page will reload without warning.

@tdonohue tdonohue removed the needs triage New issue needs triage and/or scheduling label Sep 27, 2024
@tdonohue
Copy link
Member

@Andrea-Guevara : I see. As noted, if we need to go with an aria-live option, we can do so. I'm not against that. I just wanted to make sure there was not a way to achieve this similar to #3236

One thing to be aware of here is that we've found other needs for aria-live, and so there's now a generic "Live Region" sevice & component that was just merged today in #3337. So, if you find that useful, it could be used in this scenario as well. See #3337 for more info, and feel free to ask questions there if you have questions about usage.

@Andrea-Guevara Andrea-Guevara linked a pull request Oct 4, 2024 that will close this issue
12 tasks
@tdonohue tdonohue moved this from 📋 To Do to 🏗 In Progress in DSpace 8.x and 7.6.x Maintenance Oct 4, 2024
@Andrea-Guevara Andrea-Guevara linked a pull request Jan 14, 2025 that will close this issue
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accessibility affects: main Issue impacts "main" (latest release). affects: 7.x Issue impacts 7.x releases affects: 8.x Issue impacts 8.x releases bug component: Discovery related to discovery search or browse system Estimate TBD help wanted Needs a volunteer to claim to move forward
Projects
Status: 🏗 In Progress
3 participants