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

Update next and previous labels to use nextImage and previousImage strings (fixes #1087) #1236

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

LlGC-mag
Copy link
Contributor

@LlGC-mag LlGC-mag commented Nov 18, 2024

Fixes #1087 and includes requested changes in PR #1166

Tested using VoiceOver on mac

Copy link

vercel bot commented Nov 18, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
universalviewer ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 18, 2024 5:13pm

Copy link
Contributor

@demiankatz demiankatz left a comment

Choose a reason for hiding this comment

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

Thanks, @LlGC-mag! See below for a couple small thoughts...

</button>`
);

if (this.extension.helper.isRightToLeft()) {
this.$prevButton.prop("title", this.content.next);
this.$prevButton.prop("title", this.content.nextImage);
Copy link
Contributor

Choose a reason for hiding this comment

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

It looks like we have this logic to swap out the titles based on right-to-left mode, but it doesn't change the screen reader labels. This seems like a bug/oversight that may be worth fixing while we're making changes anyway. I wonder if something along the lines of this.$prevButton.find(".sr-only").text(this.content.nextImage) would do the job (but that's just an untested guess -- my jQuery is a bit rusty).

@@ -142,7 +142,9 @@ type OpenSeadragonCenterPanelContent = CenterPanelContent & {
goHome: string;
imageUnavailable: string;
next: string;
nextImage: string;
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if we should remove the plain next / previous if they are no longer used. Doesn't hurt anything to keep them, and maybe they're actually still used somewhere, but if they're definitely not needed, it might be nice to clear out some redundancy while we're thinking of it.

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.

Accessibility issue: ambiguous accessible label for previous and next button
2 participants