Skip to content

[deep-review] A7: RTL and HighContrast support entirely absent (FlowDirection and HighContrast appear 0 times) #360

Closed

Description

@codemonkeychris

Summary

Grep across the entire codebase:

  • FlowDirection — 0 matches
  • HighContrast — 0 matches
  • CultureInfo.CurrentUICulture — 0 matches in OpenClaw.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:

  1. RTL plumbing (medium):

    • At app startup, read CultureInfo.CurrentUICulture and apply FlowDirection to the root content based on TextInfo.IsRightToLeft.
    • Audit all Padding / Margin that uses asymmetric L/R values; convert to MarginLikeRTL helpers or use Padding="0,8" symmetric where possible.
    • Audit chevron / arrow / sort indicator glyphs; mark FlowDirection.LeftToRight on icon paths so they don't mirror.
    • Add a smoke test that loads each page under ar-SA and renders without exceptions.
  2. HighContrast plumbing (small to medium):

    • Subscribe to AccessibilitySettings.HighContrastChanged.
    • Use ThemeResource references for every brush instead of StaticResource hex values.
    • Define HC-aware brush resources in App.xaml's ResourceDictionary.ThemeDictionaries for HighContrast.
    • Add a UI test that toggles HC and asserts pages render without invisible text.

Sister to A6 (accessibility broadly).

Severity

High — architectural omission; blocks adoption in any locale or for any user with high-contrast vision needs.

Activity

  1. added
    enhancement
    on May 14, 2026
  2. shanselman commented on May 18, 2026

    @shanselman
    Collaborator

    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.

  3. locked as resolved and limited conversation to collaborators on May 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions