Skip to content

Accessibility environment values#429

Open
dfabulich wants to merge 1 commit into
skiptools:mainfrom
dfabulich:accessibility-environment-values
Open

Accessibility environment values#429
dfabulich wants to merge 1 commit into
skiptools:mainfrom
dfabulich:accessibility-environment-values

Conversation

@dfabulich
Copy link
Copy Markdown
Contributor

@dfabulich dfabulich commented May 15, 2026

  • accessibilityEnabled
  • accessibilityInvertColors
  • accessibilityReduceMotion <-- Android forcibly disables animations, unlike iOS
  • accessibilityReduceTransparency <-- This one is based on Android's "Reduce blur effects", which isn't exactly the same, but is close enough, I think
  • accessibilitySwitchControlEnabled
  • accessibilityVoiceOverEnabled
  • colorSchemeContrast
  • legibilityWeight
    AFAIK we can't detect Bold Text before API 31. (Luckily, legibilityWeight is optional, so I'm returning nil in API 30 and below, and when LocalConfiguration.current.fontWeightAdjustment is equal to Configuration.FONT_WEIGHT_ADJUSTMENT_UNDEFINED. I'm not aware of any way to repro nil legibilityWeighto on iOS.)

Skip Pull Request Checklist:


  • AI was used to generate or assist with generating this PR. Please specify below how you used AI to help you, and what steps you have taken to manually verify the changes.

Cursor did a first draft; I significantly refactored it. I tested this in the Showcase Lite app mostly, and briefly in the Showcase Fuse app.

Testing these features is annoying, because every phone arranges the settings slightly differently. Here's how I tested each of these settings on a "Pixel 10 Pro" emulator running the Google Play ARM 64 v8a System Image, created in Android Studio Panda 4 | 2025.3.4 Patch 1

  • accessibilityVoiceOverEnabled: Settings --> Accessibility --> Talkback. I enabled the Talkback Shortcut so I could turn it on and off without visiting the Settings app. (Then, you have to know how to use Talkback, even just to turn Talkback off again! Tap to focus, double-tap to activate buttons.)
  • accessibilityEnabled: This is backed by AccessibilityManager.isEnabled; it can turn on when any of a number of accessibility features are enabled. Talkback is one of them, so you can turn Talkback on and off for this.
  • accessibilityInvertColors: Settings --> Accessibility --> Color & motion --> Color inversion. (Again, I recommend the shortcut.)
  • accessibilityReduceMotion: Settings --> Accessibility --> Color & motion --> Remove animations. (No shortcut available for this one.)
  • accessibilityReduceTransparency: Settings --> Accessibility --> Color & motion --> Reduce blur effects. (No shortcut available.)
  • accessibilitySwitchControlEnabled: Settings --> Accessibility --> Switch access. (Shortcut recommended.) When you turn it on, it will prompt you to set up your hardware switch. I don't have a hardware switch, but I didn't need one to test whether it's enabled. Just close the Switch Access Setup Guide whenever you enable Switch Access. "Switch Access" will be enabled.
  • colorSchemeContrast: Not in Accessibility settings! Settings --> Display & touch --> Color Contrast. (No shortcut available.) It supports medium and high, both of which are considered "increased" in this PR.
  • legibilityWeight: Settings --> Accessibility --> Display size & text --> Bold text.

I also tested on a Medium Phone API 28, Google Play. API 28 doesn't have TalkBack built in, but I was able to test inverting colors, remove animations, and high contrast.

* `accessibilityEnabled`
* `accessibilityInvertColors`
* `accessibilityReduceMotion`
* `accessibilityReduceTransparency`
* `accessibilitySwitchControlEnabled`
* `accessibilityVoiceOverEnabled`
* `colorSchemeContrast`
* `legibilityWeight`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant