Skip to content

Add labels to gallery thumbnail size controls#1775

Open
whitewooood wants to merge 3 commits into
UniversalViewer:devfrom
whitewooood:codex/add-gallery-size-labels
Open

Add labels to gallery thumbnail size controls#1775
whitewooood wants to merge 3 commits into
UniversalViewer:devfrom
whitewooood:codex/add-gallery-size-labels

Conversation

@whitewooood

Copy link
Copy Markdown

Summary

  • add accessible labels to the gallery thumbnail size decrease button, range control, and increase button
  • route those labels through gallery content config with default fallbacks
  • add locale entries for supported locale files and a puppeteer regression test

Fixes #1488.

Validation

  • npm run build
  • CI=true npm test -- tests/test.js -t "labels gallery thumbnail size controls" --runInBand
  • npx prettier --check tests/test.js src/content-handlers/iiif/modules/uv-shared-module/GalleryComponent.ts src/content-handlers/iiif/extensions/config/ContentLeftPanel.ts src/content-handlers/iiif/extensions/uv-openseadragon-extension/config/Config.ts src/content-handlers/iiif/extensions/uv-av-extension/config/config.json src/content-handlers/iiif/extensions/uv-openseadragon-extension/config/config.json src/locales/cy-GB.json src/locales/en-GB.json src/locales/fr-FR.json src/locales/pl-PL.json src/locales/sv-SE.json
  • npx eslint tests/test.js src/content-handlers/iiif/modules/uv-shared-module/GalleryComponent.ts src/content-handlers/iiif/extensions/config/ContentLeftPanel.ts src/content-handlers/iiif/extensions/uv-openseadragon-extension/config/Config.ts
  • npm run build-tsc
  • npm run checkLocaleUsage
  • npm run findMissingTranslations (reports pre-existing missing keys for adjust image labels; no new thumbnail-size keys missing)
  • CI=true npm test -- --runInBand (first run had a transient thumbnail image load failure; the failing test passed when rerun directly, and the full suite passed on rerun: 4 passed, 1 skipped)

@vercel

vercel Bot commented Jun 11, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
universalviewer Ready Ready Preview, Comment Jun 22, 2026 3:02pm

Request Review

@vercel

vercel Bot commented Jun 11, 2026

Copy link
Copy Markdown

@whitewooood is attempting to deploy a commit to the Universal Viewer Team on Vercel.

A member of the Team first needs to authorize it.

@demiankatz demiankatz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for your contribution, @whitewooood -- I took a quick look and have a question and suggestion below.

Comment thread src/content-handlers/iiif/modules/uv-shared-module/GalleryComponent.ts Outdated
Comment thread src/locales/cy-GB.json
"$shareLink": "Dolen i'r dudalen hon",
"$shareInstructions": "Er mwyn rhannu'r eitem hon, cop\u00efwch y URL isod.",
"$size": "Maint:",
"$decreaseThumbnailSize": "Lleihau maint bawdluniau",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Where/how did you source your non-English translations? Do we need to have our translation team review them for accuracy?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I've reviewed the cy-GB translations and am happy that they are correct @demiankatz @erinburnand @LanieOkorodudu .

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

French translations have been approved @demiankatz @LanieOkorodudu

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Polish translations also reviewed and approved @demiankatz @LanieOkorodudu

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If I'm keeping track correctly, that just leaves Swedish in need of approval -- is there someone working on that?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It might be worth asking the SNA team to take a look if they have the time.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I tagged Linea in the Slack message, I assume she hasn't had time yet?

@whitewooood

Copy link
Copy Markdown
Author

Thanks for the review. I pushed an update using more specific content keys: decreaseThumbnailSize, thumbnailSize, and increaseThumbnailSize.

For the non-English strings, I added direct equivalents so the new labels resolve in the existing locale files. They have not gone through a separate translation-team review, so adjustments from the translation workflow would be welcome.

@demiankatz

Copy link
Copy Markdown
Contributor

Thanks, @whitewooood, I have put this in the "in testing" column of the Community Board so we can discuss it at a future Community Call and figure out the best way to get all the translations reviewed.

Comment thread src/content-handlers/iiif/modules/uv-shared-module/GalleryComponent.ts Outdated
@LanieOkorodudu

Copy link
Copy Markdown
Contributor

@demiankatz, I tested this and I can confirm the aria-label has been added. Just wondering, are we all happy with how it's translated in the supported locales?

@demiankatz

Copy link
Copy Markdown
Contributor

Thanks, @LanieOkorodudu, I posted on the #translations channel of Slack on June 22 asking the translation team to review this, but nobody has replied to me. Maybe it's worth following up. Would someone at the BL be willing to try, since I'll be away for the coming week?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: In testing

Development

Successfully merging this pull request may close these issues.

Accessibility: add missing labels to gallery thumbnail size controls

5 participants