INNER CODE UNIT · Swift

disableEnhancedUserInterface

mjrusso/scoot · Scoot/Accessibility.swift:75

    static func disableEnhancedUserInterface(for runningApp: NSRunningApplication) {
        guard let app = Application(runningApp) else {
            return
        }

        OSLog.main.log("Disabling AXEnhancedUserInterface for \(String(describing: runningApp.localizedName ?? "<unknown>"), privacy: .private(mask: .hash))")

        try? app.setAttribute(.enhancedUserInterface, value: false)
    }

    // Some apps are not accessible unless an assistive client (such as
    // VoiceOver) is enabled. (VoiceOver sets the `AXEnhancedUserInterface`
    // attribute on the main application window.)
    //
    // In order to ensure that Scoot can see what a screenreader sees,
    // Scoot adds this attribute to all running apps.
    //
    // Note that in earlier releases, Scoot added the `AXEnhancedUserInterface`

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…