[deep-review] A7: RTL and HighContrast support entirely absent (FlowDirection and HighContrast appear 0 times)
Summary
Grep across the entire codebase:
FlowDirection— 0 matchesHighContrast— 0 matchesCultureInfo.CurrentUICulture— 0 matches inOpenClaw.Tray.WinUI/- 5 locales declared in
Strings/(en-us, fr-fr, nl-nl, zh-cn, zh-tw) — none of these are RTL languages, so the gap may have been masked
This is an architectural absence, not a missing-string problem. RTL is not implementable without FlowDirection; HighContrast is not implementable without responding to the system high-contrast theme change.
Where
- XAML pages:
src/OpenClaw.Tray.WinUI/Pages/*.xaml,Windows/*.xaml - Theme helper:
src/OpenClaw.Tray.WinUI/Helpers/ThemeHelper.cs(handles dark mode only, no HC awareness) - Localization helper:
src/OpenClaw.Tray.WinUI/Helpers/LocalizationHelper.cs
Why it matters
RTL: If the product ships into ar-SA, he-IL, or fa-IR, every page that displays text from Resources.resw will flow LTR over RTL strings. Buttons aligned right will visually drift, mirrored chevrons will face the wrong way.
HighContrast: a user with the Windows High Contrast theme enabled sees an app that ignores the theme — custom backdrops, Mica, hard-coded colors don't respond. For users who rely on HC (low vision, photosensitive epilepsy), the app may be unusable.
This is a long-running gap. The right time to address it is before locale 6 (the first RTL locale) is added, because retrofitting RTL is much harder than designing for it.
Proposed fix
Two-phase:
-
RTL plumbing (medium):
- At app startup, read
CultureInfo.CurrentUICultureand applyFlowDirectionto the root content based onTextInfo.IsRightToLeft. - Audit all
Padding/Marginthat uses asymmetric L/R values; convert toMarginLikeRTLhelpers or usePadding="0,8"symmetric where possible. - Audit chevron / arrow / sort indicator glyphs; mark
FlowDirection.LeftToRighton icon paths so they don't mirror. - Add a smoke test that loads each page under
ar-SAand renders without exceptions.
- At app startup, read
-
HighContrast plumbing (small to medium):
- Subscribe to
AccessibilitySettings.HighContrastChanged. - Use
ThemeResourcereferences for every brush instead ofStaticResourcehex values. - Define HC-aware brush resources in
App.xaml'sResourceDictionary.ThemeDictionariesforHighContrast. - Add a UI test that toggles HC and asserts pages render without invisible text.
- Subscribe to
Sister to A6 (accessibility broadly).
Severity
High — architectural omission; blocks adoption in any locale or for any user with high-contrast vision needs.
Closing during the post-refactor deep-review cleanup. RTL/HighContrast support is accessibility debt, consolidated into #372 for a later focused accessibility pass. This keeps the signal while reducing stale one-off issue noise.