readium-css
readium-css copied to clipboard
Letter-spacing for japanese
I'm submitting a topic for discussion.
Short description of the issue/suggestion:
letter-spacing has been enabled as a user setting for Japanese in Thorium and I’m wondering if we should enable it globally in ReadiumCSS.
At the time we first checked it was unclear whether it would help A11y-wise for CJK but feedback has been collected since and maybe we could improve on this front.
Letter spacing has also been implemented in the Preferences API for Readium Mobile.
Thanks for the quick feedback, I guess this pretty much answers this question then. 🙏
just to be clear, Thorium has always offered letter-spacing but the issue was that ReadiumCSS was explicitly excluding Japanese, so we forced this.
also, word-spacing for Japanese with wbr elements required CSS and JavaScript tricks to get working. it is a non-standard technique but it works for Thorium JA users.
We have letter-spacing in the mobile toolkits but it's only marked as "effective" with the default stylesheet – so no CJK or RTL. We followed the instructions from Readium CSS's doc.
Let me know if it needs to be updated.
@mickael-menu not at the moment but there is a use-case for JA users, as demonstrated in Thorium. At the time we researched a11y, resources were lacking for CJK and RTL. It’s probably worth researching this topic again and see if we can enable the setting for more languages.
My to-do list then:
- [ ] research
letter-spacingandword-spacingfor CJK and RTL – althoughword-spacingmight be really challenging in CSS-only, as reported by Daniel - [ ] modify the user-setting submodules if needed
- [ ] import the user-setting submodules in the “bundleable stylesheets”
- [ ] update documentation
If you need, I think you could reach out to these users for more insights with CJK:
- https://github.com/readium/swift-toolkit/discussions/370
- https://github.com/readium/kotlin-toolkit/issues/458
In particular, it looks like the paginated mode doesn't work as they expected.
Some interesting issues from WCAG – looks like we’re not the only ones struggling on this topic:
- Does WCAG apply only to English (or the like), or does it aim to cover all languages?, which can be seen as a meta-issue of sorts given all the mentioned issues in the thread
- Letter/Word spacing for CJK languages - SC 1.4.12 Text Spacing
Proposed resolution: I guess it will make more sense enabling it for all CJK, and letting implementers enable/disable the setting as they see fit – and make it clear in documentation.