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

Add Aria labels to hitsPerPage #6473

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

mutherr
Copy link

@mutherr mutherr commented Dec 11, 2024

Summary

I was working on improving the accessibility of a project using Instantsearch and noticed that the hits per page widget has no aria label, so I've added it to all three flavors of instantsearch and updated relevant tests

Result

Screenshot 2024-12-11 140606

Here's a screenshot of my version with an Aria label present on the hits per page selector.

Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 025ce1b:

Sandbox Source
example-instantsearch-getting-started Configuration
example-react-instantsearch-getting-started Configuration
example-react-instantsearch-next-app-dir-example Configuration
example-react-instantsearch-next-routing-example Configuration
example-vue-instantsearch-getting-started Configuration

@Haroenv
Copy link
Contributor

Haroenv commented Dec 12, 2024

Thanks! to finalise this we'd want to have this option in translations for React InstantSearch, slots for Vue InstantSearch and templates for InstantSearch.js

@mutherr
Copy link
Author

mutherr commented Dec 12, 2024

Ok. Where are those defined?

@mutherr
Copy link
Author

mutherr commented Dec 16, 2024

Quick follow up regarding the vue-instantsearch finalization, as it stands HitsPerPage mirrors the other implementations of aria labeling (ex SortBy.vue) where the template contains a single slot wrapping the entire select element, rather than having slots for individual elements and their attributes. What to your mind does a finalized version of this look like?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants