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-label for previous and next page links #645

Conversation

hammad-Ikhlaq-7vals
Copy link
Contributor

We have a product named EZOfficeInventory (https://www.ezofficeinventory.com). In this product, we are using will_paginate gem to provide pagination to our clients.

BBC News is one of our clients. We noticed that when we focus on previous or next page icons then the screen reader just read them as just "link" instead of the previous or next page. It creates confusion for the person with a vision disability.

Now we are now adding an aria-label class with those two link buttons so they can be called correctly.

@mislav mislav merged commit ae522de into mislav:master May 29, 2023
39 checks passed
@mislav
Copy link
Owner

mislav commented May 29, 2023

Thank you! I've added a feature where the text of these labels can be translated for each language.

end

def previous_or_next_page(page, text, classname)
def previous_or_next_page(page, text, classname, aria_label = nil)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

None yet

3 participants