Accessibility

RSS for tag

Make your apps function for a broad range of users using Accessibility APIs across all Apple platforms.

Posts under Accessibility tag

122 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

(API to) switching device/display using keyboard with Universal Control
Universal Control works to share keyboard and mouse from one mac to another, but actually switching seems to require physically moving the mouse to the other display. Ideally, I'd like Apple to support some command available via command-key equivalents to cycle to other devices in the way that we can cycle through applications or windows. Seeking to program that directly, I was unable to find any Universal Control API's on point. Are there any? I can imagine restricted this to the OS only for security. In case there are display-driven API's, I see that system settings/displays shows all the displays from all devices, but I was unable to find a UI or API's to change focus to another display (other than moving the mouse to select the display). When I list displays programmatically, I only see the device-local displays. In case there are device-driven APIs: I can initialize a bluetooth session and secure credentials, but interaction seems to be unavailable.
1
0
639
Mar ’24
Extension views called from ASCredentialProviderViewController prepareInterface cannot be accessible through Keyboard
Any extension views called from ASCredentialProviderViewController -> open func prepareInterface(forPasskeyRegistration registrationRequest: ASCredentialRequest) cannot be accessed through Keyboard (Setting->Accessibility->Keyboards->Full Keyboard Access enabled). I have to manually type the prompted screen once to be able to get focused and continue to use Keyboard. Is it a known issue or I am missing anything? Please suggest. Thanks!
1
0
630
Mar ’24
Can't override 'perform escape gesture' VoiceOver to block going back to previous screen
This is the situation: one of the flows in our app is a navigation stack that consists of several screens. At a certain point in this flow, one of the screens lacks a back button, because we don't want the user to go back to a previous screen in that flow. For sighted users everything works fine. But once a screen reader user activates VoiceOver and uses the perform escape gesture (2 fingers right-left-right) the app does go back to the previous screen! We tried to override accessibilityPerformEscape (both in UIKit and SwiftUI) and do nothing in that method and in case of UIKit return true. That blocks going back when you're focusing on an element on the screen that belongs to the presented screen/viewController (not to the navigationBar). But once the user is focused on the navigationBar and performs the escape gesture, the user can still go back. We tried to override again the accessibilityPerformEscape on the UINavigationController level and the UINavigationBar level but they are not even called.
0
0
481
Mar ’24
Why doesn't my app show up in the accessibility list?
Hello guys, In a macOS app developed with SwiftUI and swift, the NSAccessibility key has been added to the Info.plist file to explain why the app requires Accessibility permissions, and also the AXIsProcessTrustedWithOptions function has been called, but the app is not seen in the system's Accessibility list. I thought, it will show up in the system's Accessibility list like following Some of my code import SwiftUI @available(macOS 13.0, *) @main struct LOKIApp: App { @State private var activeWindow: NSWindow? = nil @State private var accessibilityGranted = false var body: some Scene { MenuBarExtra("App Menu Bar Extra", image: "trayicon") { Button("Settings") {} .keyboardShortcut("s") Divider() Button("Quit") { NSApplication.shared.terminate(nil) } .keyboardShortcut("q") }.menuBarExtraStyle(.menu) } init() { let options: NSDictionary = [kAXTrustedCheckOptionPrompt.takeRetainedValue() as NSString: true] let accessibilityEnabled = AXIsProcessTrustedWithOptions(options) if accessibilityEnabled == true { print("Accessibility is enabled") } else { print("Accessibility is not enabled. Please enable it in System Preferences") } } } I didn't do any other configuration, and test this app by using the command Command+R, need I set provisioning profile? Please help, thank you.
1
2
668
Oct ’24
SwiftUI Bug in Voice Over when app language is French
My app language is set to French. If my device language is set to French, I do not see this issue. If my device language is set to English, In the app, voice over reads all UIKit views with female voice (French accent), and all SwiftUI view with male voice (French accent). Is this a bug with SwiftUI or UIKit ? I would expect the gender voice should not be changed irrespective of UIKit/SwiftUI views. I tried many ways, but none fixed the issues. I am not sure what is causing this or how to fix this. Our app is majorly built in UIKit and we started to use SwiftUI views for small views, and if this accessibility issues continue, we would like to stop using SwiftUI. Some of the ways I tried are: Set the locale of swiftUI view .environment(\.locale, "fr-CA") I could not find anything in the documentation that could address this.
1
1
540
Mar ’24
Swift Charts Accessibility Bug
I've been working on migrating some graphics to Swift Charts for an app I work on. However I've been noticing strange behavior when it comes to VoiceOver. If I create a bar chart and use: BarMark(x: .value("Month", x, unit: .month), y: ...) While the chart looks fine, the voice over values seem to follow arbitrary values set for the bin. From what I can tell they are following the underlying bin values that Swift Charts uses to provide spacing between bars. For instance, this simple example: let monthlyRevenueData = [ (x: try! Date("2024-01-01T00:00:00Z", strategy: .iso8601), y: (income: 55000, revenue: 124000), id: UUID()), (x: try! Date("2024-02-01T00:00:00Z", strategy: .iso8601), y: (income: 58000, revenue: 130000), id: UUID()), (x: try! Date("2024-03-01T00:00:00Z", strategy: .iso8601), y: (income: 59000, revenue: 120000), id: UUID()), ] struct ContentView: View { var body: some View { Chart(monthlyRevenueData, id: \.id) { (x, y, _) in BarMark(x: .value("Month", x, unit: .month), y: .value("Income", y.income)) .foregroundStyle(.green) BarMark(x: .value("Month", x, unit: .month), y: .value("Revenue", y.revenue)) } } } #Preview { ContentView() } Results in the Voice Over reading "January 14th 2024 at 12 AM to January 28th 2024 at 12am ..." despite the fact that the data should be for the entire month of Jan. Is there any way to get VoiceOver to read the input data rather than relying on how the chart is formatted? Preferably without the need to remove all visual spacing between the bars. Video link: https://drive.google.com/file/d/11mxCl3wR2HzoOaihOvci-vZk4zgG1d39/view?usp=drive_link
0
0
533
Mar ’24
Important Accessibility Option - Native Keyboard Input
I want to trigger a "pinch" where I can select whatever it is I'm looking at via pressing spacebar on a bluetooth keyboard that is paired with the apple vision pro. Is this feasible in Xcode or Unity (VisionOS development) where I not only have access to see native keyboard presses, but also can see the gaze position (or what it's currently highlighting/focusing on) without accessing it through an interaction event. If keyboard press, then select item being gazed at. We wont have "pinch" available for people with hand/arm impairments that will trigger an interaction event, and there are an array of accessibility devices that send keyboard commands that would be able to aid in this. Apple should have this ability in it's native settings, specifically with using keyboard commands as well. This app would demonstrate that ability without it being native yet, and any help would be greatkly appreciated :)
0
0
472
Mar ’24
Full keyboard access UI elements
Hello, Since the full keyboard access Help menu is a little vague on the nuances between Tab, arrow keys, and Ctrl+tab in terms of navigation, could you point me to where I can find the intended mapping of FKA keys to UI elements? For example, I have been in several Apple iOS apps where the UITabBar at the bottom is navigable with any of the three options mentioned above. In other contexts, the tab key only moves the user to the tab bar section, then the icons are focusable with arrow or Ctrl + tab. When a modal pops up stating I will be leaving an app, should the choices be navigable with Tab? Ctrl+tab? or arrows too? In other places, like news articles in Apple News, it seems that I cannot scroll with the arrow keys to read the various paragraphs, nor interact with links at all that are in the article. If there is a separate keyboard shortcut for links or scrollbar, please update the Help menu. It seems pretty straightforward that arrow keys navigate between HStacks and VStacks. Is that an accurate guess of arrow key behavior? I feel like I'm guessing in several places within the content groups.
4
0
1.5k
Mar ’24
Scrolling with Full Keyboard Access
I'm testing Full Keyboard Access in my app and on the iPhone apps in my iPhone 12 mini with OS 17. My work will directly impact how much accessibility review is done on our iOS app which has millions of unique views a month. In several Apple apps I cannot seem to scroll down through the screen when the main View has focus. For example, the Home app does not scroll with arrow keys nor Ctrl+tab through any of the 6 main content groups on the Discover screen. it almost appears it's a single static image; the "Getting Started" button is not able to be activated. I can activate sections further down when I enable gestures, but cannot pinpoint a specific location. The Stocks app includes Top Stories from the Apple News app; in either app I can select a story, which brings up the article on full screen, but then I cannot use the arrow keys or Ctrl+tab to read the article or interact with inline links. Ctrl + tab selects the button features like to watch an embedded video or live coverage, then jumps down to the end of the article to focus on Related stories, ignoring all the links in between. I am able to somewhat move through the article text with keyboard gestures, but many of these articles have embedded links or content after the article (before "Related Stories" I work in digital accessibility and need to be able to tell my teams what is expected behavior and where to see examples of this. If Apple can't demonstrate Full Keyboard Access in its own apps this is a problem. Our own app has some of these issues but I am unsure how to recommend a solution when the scrollview seems to not work in native iOS apps by Apple.
1
2
1.1k
Feb ’24
Voice Over in UITableViewCell with child view controllers
The structure of the UI is a bit complicated. I'll do my best to explain. There is a UITableView that has a sibling in its view hierarchy. Footer buttons that come on top of the UITableView at the bottom of the screen. I am using a one finger swipe gesture to iterate over different elements on the page and in the table view. Each cell in the UITableView has a UIViewController which has a UICollectionView. This UICollectionView has cells that have multiple views nested inside with most of them being dummy views. The cells have different structures and the voice over works well across them without any customisation and is able to identify all the right accessibility elements. Now the problem comes in the last cell on the page. Imagine it has 2 UILabels and 2 UIButtons. When navigating using normal voice over and not defining any accessibilityElements, the order is weird so I added override var accessibilityElements: [Any]?{ get{ return [label1, button1, label2, button2] }set {} When navigating to this cell, everything works fine but once an element inside this particular last cell is highlighted it gets messed up. The order works fine but the voice over ends up looping inside the cell. It doesn't go back to the other cells or navigate to the footer of the page. If I remove the accessibilityElements array then everything is fine but not in the correct order. Anybody know why that might be and how to break the loop? It would be helpful if I could know how voice over recognises which view to navigate to next.
1
0
713
Feb ’24
UIDocumentInteractionController keyboard trap
We are using UIDocumentInteractionController to preview a pdf. When you navigate on your phone with the hardware keyboard and it focuses on the pfd preview, there is no way we can reach the buttons in the toolbar anymore like the share and done button. Is this a bug or is there a way to get to the navigation/toolbars? iOS17.0 iPhone14 sim and real device.
2
0
487
Feb ’24
Does SwiftUI have something like UIKit's accessibilityLanguage property?
I'm looking for an accessibility modifier (or some other method) in SwiftUI that does the same job as UIKit's accessibilityLanguage property: https://developer.apple.com/documentation/objectivec/nsobject/1615192-accessibilitylanguage We've got a few screens in our app for which the display language is server-dictated instead of device-dictated -- and without this property VoiceOver is reading Spanish with the English parser and accent when the device is set to English. Thanks for any information.
1
1
431
Feb ’24
Accessibility inspector Audit with simulator
I'm experiencing an issue with the Accessibility Inspector. It's worked fine. Since the update, I'm unable to perform an audit while in the Simulator. I have the following message: "Select a target app to view Accessibility warnings and audit information." However, VoiceOver and Dynamic Type functionalities are working fine. The audit only works when I test on my iPhone. How can I connect the target for the audit? Thank you. Accessibility Inspector V5 Simuator 15.2
2
0
688
Feb ’24
Simulating Drag and Drop Events in MacOS using Swift issue in apps
Hello everyone, I’m currently working on a project where I need to simulate mouse drag and drop events in MacOS using Swift. I have written the following code which works well in most applications, but I’m encountering issues in some applications like Finder where the leftMouseDragged event doesn’t seem to work correctly. Click events are working fine everywhere. Here’s the code I’m using for the drag event: let location = CGEventTapLocation.cghidEventTap let source = CGEventSource.init(stateID: .combinedSessionState) let clickAtStart = CGEvent(mouseEventSource: source, mouseType: .leftMouseDown, mouseCursorPosition: locationPoint , mouseButton: .left) let dragAndDrop = CGEvent(mouseEventSource: source, mouseType: .leftMouseDragged, mouseCursorPosition: locationPointDrag, mouseButton: .left) clickAtStart?.post(tap: location) usleep(200000) dragAndDrop?.post(tap: location) And analogic for drop event: let location = CGEventTapLocation.cghidEventTap let source = CGEventSource.init(stateID: .hidSystemState) let dragAndDropRelease = CGEvent(mouseEventSource: source, mouseType: .leftMouseUp, mouseCursorPosition: locationPoint, mouseButton: .left) dragAndDropRelease?.post(tap: location) I’ve tried changing the order of events, using different event types, and checking the permissions of my app, but none of these solutions have worked. I’m wondering if anyone has encountered a similar issue or has any suggestions on how to resolve this. Any help would be greatly appreciated!
0
0
503
Feb ’24
`accessibilityElementDidBecomeFocused` only gets called with VoiceOver enabled on iPhone
Background I have a UICollectionViewCell, where I override accessibilityElementDidBecomeFocused method. I also override canBecomeFocused to always return true. The App allows Accessibility->Full Keyboard Access (allowing the user to use the app with just Keyboard). isAccessibilityElement is also set to true for the collectionviewCell Problem I have two scenarios When both Keyboard access and VoiceOver are enabled In this case accessibilityElementDidBecomeFocused gets called as expected. When both Keyboard access is enabled but VoiceOver is disabled In this case accessibilityElementDidBecomeFocused isn't getting called. Is this the expected behaviour? If yes, then is there a callback available when a view element gets focused via Keyboard with VoiceOver disabled?
2
1
613
Jan ’24
My app behaves differently when using TestFlight as opposed to running it with my development certificate
My sandboxed macOS app requires the user to grant permission under Privacy & Security / Accessibility in order to support extra functionality. If no permission is granted the app can still be used albeit with very basic functionality. In order to allow the user NOT to have to immediately decide whether to grant this permission when first launching the app, a dialog allows them to say “I’ll do it later”. As such, the app uses a timer with a one second interval to ask the system if permission has been granted and if so, implements the extra functionality. By the way, I would rather have used a notification instead of a timer, but there does not seem to be one. // Schedule a timer to periodically check accessibility status accessibilityTimer = Timer.scheduledTimer(timeInterval: 1.0, target: self, selector: #selector(checkAccessibilityStatus), userInfo: nil, repeats: true) func isAccessibilityEnabled() -> Bool { let accessibilityEnabled = AXIsProcessTrusted() return accessibilityEnabled } @objc func checkAccessibilityStatus() { if isAccessibilityEnabled() { print("Accessibility is enabled.") accessibilityTimer?.invalidate() if gEventTap == nil { tapper()//as003 gTypeIt4MeMenu?.item(at: kPauseResumeItem)?.title = "Pause" gStatusItem?.button!.image = NSImage(named: "menubar_icon_16x16") NotificationCenter.default.post(name: NSNotification.Name(rawValue: "showGreenTick"), object: nil) } } else { print("Accessibility is disabled.") } } My problem is that when I build the app with my development certificate, it runs as expected. However, when I upload it to TextFlight and download from there, it no longer “notices” when I grant it permission.
0
0
468
Jan ’24
Security concern for public .well-known/apple-developer-merchantid-domain-association domain-verification file
As the document mentioned "Host your domain-verification file at the following path for each domain you’re registering: https://[DOMAIN_NAME]/.well-known/apple-developer-merchantid-domain-association" and that file contain "pspId" and "signature" so just want to know these are not sensitive it gets in the hands of an attacker ??
0
0
496
Jan ’24