Skip to content

Support for accessibility in shared models #142

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

Open
wants to merge 15 commits into
base: develop
Choose a base branch
from

Conversation

JayPanoz
Copy link
Contributor

@JayPanoz JayPanoz commented Jul 5, 2025

This adds support for accessibility in metadata of Shared Models (RWPM doc).

Display Guide to follow

@JayPanoz JayPanoz marked this pull request as ready for review August 18, 2025 15:15
@JayPanoz JayPanoz requested a review from chocolatkey August 18, 2025 15:15
@JayPanoz
Copy link
Contributor Author

@chocolatkey I am not anticipating changes myself so I’m marking this as ready to review so that another pair of eyes can see whether this is acceptable or whether we want to do some things in a smarter way.

As a recap, this adds accessibility in metadata, which is the most trivial part.

It also handles the Accessibility Metadata Display Guide, in a way that should be consistent with Swift – so statements with an id, a compact string, and a descriptive string.

For localization, I had to design something around thorium-locales. Basically:

  • there is a script extracting what we need from the json in order to build its own in publication/accessibility/locales/.
  • there is a Localization instance that is a singleton, which allows you to register your own locale, setting the one that should be used by classes, and get the compact and descriprive strings.
  • At this point it means the json is packaged since we only have en and fr – as-is Readium CSS in Navigator for instance –, but in theory, Vite should allow us to handle this dynamically as locales/languages are added.

It is kind of straightforward as classes are just mapping statements to conditions but of course there may be room for improvements and/or details that could be polished.

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.

1 participant