Accessibility environment values#429
Open
dfabulich wants to merge 1 commit into
Open
Conversation
* `accessibilityEnabled` * `accessibilityInvertColors` * `accessibilityReduceMotion` * `accessibilityReduceTransparency` * `accessibilitySwitchControlEnabled` * `accessibilityVoiceOverEnabled` * `colorSchemeContrast` * `legibilityWeight`
This was referenced May 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
accessibilityEnabledaccessibilityInvertColorsaccessibilityReduceMotion<-- Android forcibly disables animations, unlike iOSaccessibilityReduceTransparency<-- This one is based on Android's "Reduce blur effects", which isn't exactly the same, but is close enough, I thinkaccessibilitySwitchControlEnabledaccessibilityVoiceOverEnabledcolorSchemeContrastlegibilityWeightAFAIK we can't detect Bold Text before API 31. (Luckily,
legibilityWeightis optional, so I'm returningnilin API 30 and below, and whenLocalConfiguration.current.fontWeightAdjustmentis equal toConfiguration.FONT_WEIGHT_ADJUSTMENT_UNDEFINED. I'm not aware of any way to repronillegibilityWeighto on iOS.)Skip Pull Request Checklist:
swift testAccessibility environment values skip-fuse-ui#110
Example of accessibility environment values skipapp-showcase#102
Example of accessibility environment values skipapp-showcase-fuse#68
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 byAccessibilityManager.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.