Accessibility

RSS for tag

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

Accessibility Documentation

Posts under Accessibility tag

134 Posts
Sort by:
Post not yet marked as solved
1 Replies
38 Views
Hi to all. I'm building a Mac application using QT (PySide6). After updating XCode to 15.3.0 (Sonoma), the Accessibility Inspector stopped working correctly, it does not display the attributes of nested elements, but only the title of the window. When using XCode 14.2 (Monterey) - everything worked correctly. main.py from PySide6.QtGui import QGuiApplication from PySide6.QtQml import QQmlApplicationEngine app = QGuiApplication(sys.argv) engine = QQmlApplicationEngine() engine.quit.connect(app.quit) engine.load("main.qml") sys.exit(app.exec()) main.qml import QtQuick.Controls ApplicationWindow { visible: true width: 600 height: 500 title: "MyApp" Rectangle { anchors.fill: parent Text { id: my_text anchors.centerIn: parent text: "My APP" font.pixelSize: 45 Accessible.role: Accessible.StaticText Accessible.name: my_text.text Accessible.description: "my app text" } Accessible.role: Accessible.StaticText Accessible.name: "Rectagle" Accessible.description: "my app rectangle" } } The code is the same for both applications On Monterey i can select any region with accessible On Sonoma - only title Does anyone know a solution? Maybe someone has a similar problem?
Posted
by Skiff.
Last updated
.
Post not yet marked as solved
1 Replies
114 Views
I'm trying to get voiceover to announce accessibility label for UIActivityViewController (for a share sheet that pops up on clicking share button) before the focus goes to one of activity items inside the UIActivityViewController. In order to achieve the above behavior, I'm just assigning accessibilityLabel for UIActivityViewController's view. But looks like I'm not able to override the default accessibility implementation of UIActivityViewController. Is there any way we could override the existing accessibility behavior of UIActivityViewController and announce accessibility label for share options? Thanks in advance!!
Posted Last updated
.
Post not yet marked as solved
1 Replies
156 Views
Hi all, I ran into an XCUITest issue where my tests fail randomly with the message that my app "has not loaded accessibility" I run the tests in my scheme in random order and with every run, some other random test fails and a test that previously failed would later pass. So I know it's not my test as-such that is causing the problem. There seems to be a 60s wait for accessibility to load, and I have not found any information how I could extend the timeout or convince accessibility to load faster. I found some older posts, but no real solution was found there either. This completely blocks my test execution since I cannot get a single run in where the tests all pass (and I only have 10 tests in that scheme). I ran the scheme against an iOs sim and against a real iOS device and I get the same random accessibility errors on either execution platform. I've tried iOS17.2 & 17.4 and get the same behavior. Strange enough, the test actually keeps running (and technically passes all the checks and asserts in the actual test) after the accessibility error, but then XCTest marks it as failed because of the early accessibility error. Any ideas what I could try or what the reason could be? Thanks! -- I'm using XCode Version 15.3 (15E204a) and test iOS17.2 and iOS17.4 Test Case '-[MyScheme.MyTestClass testMyFunction]' started. t = 0.00s Start Test at 2024-04-19 01:32:09.225 t = 0.02s Set Up t = 0.02s Open com.myCompany.myApp t = 0.03s Launch com.myCompany.myApp t = 0.25s Wait for accessibility to load t = 60.30s Capturing diagnostic spindump /Users/some/path/goes/here/MyTestCase.swift:120: error: -[MyScheme.MyTestClass testMyFunction] : Application 'com.myCompany.myApp' has not loaded accessibility t = 60.34s Waiting 60.0s for "test" Button to exist t = 61.38s Checking `Expect predicate `exists == 1` for object "test" Button` t = 61.39s Checking existence of `"test" Button` ... more stuff happening in the test here ...
Posted
by mmaetzler.
Last updated
.
Post not yet marked as solved
1 Replies
139 Views
So I have a simple view for my SwiftUI application below: import SwiftUI struct ContentView: View { var body: some View { List { ForEach(0..<4) { index in RowView(index: index) .accessibilityIdentifier("row") } } } } struct RowView: View { let index: Int var body: some View { HStack { Image(systemName: "globe") .imageScale(.large) .foregroundStyle(.tint) Text("Hello, world!") Spacer() ButtonView(index: index) } .padding() } } struct ButtonView: View { let index: Int var body: some View { VStack { if index != 3 { Button(action: {}, label: { Text("Cancel") }) .accessibilityIdentifier("cancel_button") } Button(action: {}, label: { Text("Submit") }) .accessibilityIdentifier("submit_button") } } } My goal is to reference each cancel and submit button per row for a UI Test, which I have tried doing so here: let rowElements = app.tables.cells.matching(identifier: "row") for i in 0..<rowElements.count { let cancelButton = rowElements.element(boundBy: i).buttons["cancel_button"] let submitButton = rowElements.element(boundBy: i).buttons["submit_button"] XCTAssertTrue(cancelButton.exists, "Cancel button does not exist in row \(i)") XCTAssertTrue(submitButton.exists, "Submit button does not exist in row \(i)") } Even with the identifiers set like this my tests fail and say it cannot find the buttons labeled as they are with their specific identifiers or the rows. What is the correct way to reference elements if they are in a list or table for UI Testing? I'm specifically trying to use accessibility Identifiers to make my life easy.
Posted
by matson.
Last updated
.
Post not yet marked as solved
1 Replies
126 Views
My app uses CGEventTapCreateForPid to monitor keyboard events of a corresponding process. My app has already enabled the Accessibility permission, and AXIsProcessTrustedWithOptions returns true. However, CGEventTapCreateForPid returns null. What could be the problem? Does anyone know? I tested and found that if CGEventTapCreateForPid returns null, I can reset the Accessibility permission using tccutil reset Accessibility myapp_bundleid without restarting my app. But my app can still get the permission through AXIsProcessTrustedWithOptions
Posted
by emerys.
Last updated
.
Post not yet marked as solved
0 Replies
157 Views
Hello, Recently, I've been hacking at trying to find a way for the colors of the system cursor to be changed via an executable (in particular, I'm trying to get them to match the foreground/background colors chosen by wal.) In my most recent investigation, I've located the relevant setting in ~/Library/Preferences/com.apple.universalaccess (which is a wierd place for it to be, but w/e) and attempted to change it via defaults write. This immediately caused all my GUI apps including Finder to crash repeatedly until I went into recovery mode and deleted the changed file. My next direction in this quandary, then, is to make an application that asks for the relevant Accessibility settings (via the standard prompt that I often see) and upon being granted proper permission, is able to make the modifications without breaking the system. Is anyone able to point me towards the documentation for such functionality, if it's possible? Preferably some kind of C or shell interface.
Posted
by brosasaki.
Last updated
.
Post not yet marked as solved
1 Replies
222 Views
Hello 👋, I am quite new in the Apple development world, so please forgive me if I am saying something wrong. I am working on a macOs application which aims to act mainly as an assistive window switcher. In order to do so it leverages on AXUIElementCopyAttributeValues and AXUIElementCopyAttributeValue, especially the former to retrieve other application's window titles and the latter to set and focus a target main window. I read online, according to Apple Store guidelines, that app to be accepted in App Store must be sandboxed. And as I read in several forums there may not be a way to use accessibility features within sandbox. So, first question, based on this I would like to know if there is a way to achieve the same without accessibility features? Currently the only thing which does not work is the permission prompt, but an user may also enable Accessibility permissions under Privacy & Security for a certain app. May the app pass the review process, supposing no prompt will be requested to the user, but a "Getting started" will inform and guide the user to set the permissions? Thanks in advance 🙏
Posted Last updated
.
Post not yet marked as solved
1 Replies
303 Views
I have checked almost all previous question related to my query but did not find my solution. I'm facing issue with Full keyboard access accessibility when integrate it with scrollview. Inside scrollview textfield and secure textfield are accessible with "tab" key but other component like buttons are not accessible using "tab" key. but when I remove scrollview all elements are accessible with "tab" key. Even in system installed iOS Apps they don't support scrollview with tab button, I have analysed apple documentation regarding this but did not find specific to this. Does anyone have idea regarding this kind of behaviour?
Posted
by shivam93.
Last updated
.
Post not yet marked as solved
4 Replies
617 Views
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.
Posted
by jsponger.
Last updated
.
Post not yet marked as solved
2 Replies
233 Views
Voiceover of UIAlertController by default announces title's accessibilityTrait as static text. I'm trying to change the accessibilityTrait to be of type header and can't seem to have a direct way to access title label and modify the attribute. Only solution seems to be to add custom label to be able to modify accessibilityTrait. Now, this got me wondering should the default behavior of UIAlertController be left untouched? Have anyone else tried to do this? And, is there any other way to customize accessibilityTrait of UIAlertController title label that I'm missing out on? Thanks in advance.
Posted Last updated
.
Post not yet marked as solved
0 Replies
201 Views
I would like to contact a developer on the SSML team regarding the possibility to create a new downloadable voice, in a language yet unsupported. I don't mind making a free contribution. Creating Custom voices does not seem to be a solution, since only English is supported when creating a custom voice.
Posted
by Cilliers.
Last updated
.
Post not yet marked as solved
1 Replies
516 Views
Our users are using Apple's native Voice Control feature: https://support.apple.com/en-us/HT210417 We want to enhance our accessibility experience by adding some additional voice controlled dialogs that show up specifically when Voice Control is enabled. It can be determined if other Apple accessibility features are turned on via a check like UIAccessibility.isVoiceOverRunning, however there is no option for Voice Control (note, different than Voice Over). How can I detect if a user is running Voice Control or not?
Posted
by sami.taha.
Last updated
.
Post not yet marked as solved
0 Replies
256 Views
Application: HTML,Javascript,Angular web Application Issue: In Iphone/Ipad while trying to enter English characters using Japanese keyboard in the input field the japanese keyboard freezes and stops working after entering the first character. Root Cause: Two validations given in the onInput call back method causes the issue. when the validation are removed keyboard is working fine 1.for converting lowercase letters to uppercase 2.Some Character are not allowed so they are replaced after input
Posted
by Yogi1999.
Last updated
.
Post not yet marked as solved
0 Replies
200 Views
My app speaks and offers the user the ability to use their Personal Voice - but if the user says "No" when I first ask them for permission to use their Personal Voice, I can never ask them again. So if they change their mind later - they have to go to Settings->Accessibility->Personal Voice to toggle the permission for my app. To make things easier for them, I would like to be able to pop open that page for them - but I don't know how to create the URL for it. Is it even possible? The closest I've been able to get is to open the settings page for my app (Settings->My App Settings) with: guard let settingsUrl = URL(string: UIApplication.openSettingsURLString) else {return } if UIApplication.shared.canOpenURL(settingsUrl) { UIApplication.shared.open(settingsUrl) } Thanks in advance!
Posted
by tenly.
Last updated
.
Post not yet marked as solved
1 Replies
229 Views
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.
Posted
by pde5i.
Last updated
.
Post not yet marked as solved
1 Replies
256 Views
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!
Posted Last updated
.
Post not yet marked as solved
0 Replies
217 Views
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.
Posted
by Jeroen74.
Last updated
.
Post not yet marked as solved
0 Replies
395 Views
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.
Posted
by BinHua.
Last updated
.
Post not yet marked as solved
1 Replies
254 Views
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.
Posted
by Rupika.
Last updated
.