Skip to content

describe-ui returns empty hierarchy on iOS 26+ simulators — auto-enable accessibility defaults #290

@dpearson2699

Description

@dpearson2699

Problem

On iOS 26 / Xcode 26.x, new simulator devices ship with AccessibilityEnabled = 0 and ApplicationAccessibilityEnabled = 0 in com.apple.Accessibility preferences. This causes axe describe-ui to return only a bare AXApplication node with empty children: [] and a zero-size frame {{0, 0}, {0, 0}}.

This affects all apps including Apple's own Settings.app — it's not an app-side issue.

Root cause

$ xcrun simctl spawn <UDID> defaults read com.apple.Accessibility
{
    AccessibilityEnabled = 0;
    ApplicationAccessibilityEnabled = 0;
    ...
}

With these flags off, the accessibility daemon doesn't expose any element tree. FBSimulatorControl's XPC queries return the empty Application node.

Workaround

xcrun simctl spawn <UDID> defaults write com.apple.Accessibility AccessibilityEnabled -bool true
xcrun simctl spawn <UDID> defaults write com.apple.Accessibility ApplicationAccessibilityEnabled -bool true

After this, describe-ui immediately returns the full hierarchy. The setting persists in the device's preferences plist until "Erase All Content and Settings" or device deletion.

Suggested fix

axe could auto-enable these when it detects an empty hierarchy:

  1. After describe-ui gets a result with zero children, check com.apple.Accessibility defaults on the target sim
  2. If either flag is 0, enable both and retry
  3. Log a note so users know it was auto-fixed

This would make snapshot-ui work out of the box on fresh iOS 26 simulators. Currently there's nothing telling users why the tree is empty — the output just looks like the app has no UI.

Environment

  • macOS 26.3.1, Xcode 26.3, iOS 26.2 runtime
  • XcodeBuildMCP 2.3.0, axe v1.5.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions