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

Query Filter: Single option filters don't have accessible names #645

Open
2 of 5 tasks
ryelle opened this issue Jul 31, 2024 · 7 comments
Open
2 of 5 tasks

Query Filter: Single option filters don't have accessible names #645

ryelle opened this issue Jul 31, 2024 · 7 comments
Labels
Accessibility Issues related to keyboard navigation, screen readers, etc [Block] Query Filter

Comments

@ryelle
Copy link
Contributor

ryelle commented Jul 31, 2024

Initially reported on learn, this is an issue across the site.

The toggle that opens the course status filters is labeled using the currently selected status. Buttons to perform an action should be labeled using information about what the control does. Having the current status visible is OK; but it shouldn't be the only content.

This would be better labeled using something like "Filter Courses: All" or even "Filter: All". This would inform the user what they can do with the control.

The single-select variation of query filter should display "[Filter name]: [Value]" as the button text (label value).

This has been fixed on Learn in WordPress/Learn#2804

Still needs to be fixed on:

  • Themes (only uses multiple select filters)
  • Plugins (only has filters if ?show_filters=1, and this is already using the right format)
  • Patterns (curation & sort, remove unused status from "my patterns")
  • Events (technically correct, but the single-select uses the multiple-select label style)
  • Showcase (has sort on archive view)

Question for @WordPress/meta-design:

Once we do this, the label is shown twice. Should the label inside the dropdown be hidden again? This would match the multiple select behavior (it's there, but only visible on mobile).

Desktop Mobile
Multiple select Screenshot 2024-07-31 at 2 44 08 PM Screenshot 2024-07-31 at 2 43 58 PM
Single select Screenshot 2024-07-31 at 2 42 54 PM Screenshot 2024-07-31 at 2 43 15 PM
@jasmussen
Copy link
Collaborator

Once we do this, the label is shown twice. Should the label inside the dropdown be hidden again? This would match the multiple select behavior (it's there, but only visible on mobile).

I think we should, yes, but happy to defer to another opinion.

@ndiego
Copy link
Member

ndiego commented Aug 1, 2024

Once we do this, the label is shown twice. Should the label inside the dropdown be hidden again? This would match the multiple select behavior (it's there, but only visible on mobile).

I think we should, yes, but happy to defer to another opinion.

I agree.

@ryelle
Copy link
Contributor Author

ryelle commented Aug 1, 2024

Okay, that should be as easy as removing the &:where(:not(.is-single-select)) from this CSS:

&:where(:not(.is-single-select)) .wporg-query-filter__modal-header {
display: none;
}

@fcoveram
Copy link
Collaborator

fcoveram commented Aug 6, 2024

Agree with removing the label from the dropdown

@fcoveram
Copy link
Collaborator

fcoveram commented Aug 6, 2024

I forgot to ask. Does this change include the multi-selection version? The report doesn't mention it.

@ryelle
Copy link
Contributor Author

ryelle commented Aug 6, 2024

Multi-selects already use a static label (with dynamic count), ex "Layout [2]", and no title in the desktop dropdown. This change basically makes the two variations more similar.

Screenshot 2024-08-06 at 1 20 03 PM

@fcoveram
Copy link
Collaborator

fcoveram commented Aug 6, 2024

I see. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accessibility Issues related to keyboard navigation, screen readers, etc [Block] Query Filter
Projects
Status: 📋 To do
Development

No branches or pull requests

4 participants