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
632 Views
I noticed that the PDFAnnotations added to a PDFPageView are not taking the accessibility properties as part of the data that later is being reported by the Accessibility Inspector. And also it seems this class: PDFNodeAccessibilityElement is not exposed from PDFKit. Anyone knows a way to override the Accessibility information for a PDF Annotation? Another issue I saw is that when you remove the PDF Annotation from the page, the Accessibility Inspector still shows it as if the annotation stayed there. Tried multiple ways to find a way to force the Accessibilty nodes to refresh, but sill haven't found a way for doing it. Would be great to hear if anyone had to deal with this kind of issues before
Posted
by
Post not yet marked as solved
2 Replies
776 Views
We have several issues enabling our app for Assistive Access: We use Critical Alerts. There seems to be no way to set this up unless we set up the app in "normal" mode first. If we run our app in AA first and then go back to normal the Notification settings page is blank. Notifications show up as saying "New". I am guessing this is a beta issue? We cannot use NFC (no connect sheet is displayed when we try.) We MUST have NFC to connect to our medical device (as well as BlueTooth). These are show stopper issues for our app.
Posted
by
Post not yet marked as solved
1 Replies
727 Views
I have a swiftUI view that lists items. They have trailing swipe actions. I have given accessibilityIdentifiers to the button in the swipe menu. But the Xcode tool: Accessibility Inspector, does not get them first time. Here is my view: import SwiftUI struct Person: Identifiable { let id = UUID() var name: String var phoneNumber: String } var staff = [ Person(name: "Harry Potter", phoneNumber: "(408) 555-4301"), Person(name: "Ronald Weasley", phoneNumber: "(919) 555-2481") ] struct ContentView: View { var body: some View { List { ForEach(staff) { person in Cell(title: person.name) } } } } struct Cell: View { var title: String var body: some View { Text(title) .swipeActions { swipeMenu } } @ViewBuilder var swipeMenu: some View { Button { } label: { Label("Logout", systemImage: "logout") } .tint(.blue) .accessibilityIdentifier("person-logout") Button { } label: { Label("Edit", systemImage: "edit") } .tint(.green) .accessibilityIdentifier("person-edit") } } struct ContentView_Previews: PreviewProvider { static var previews: some View { ContentView() } } Steps: Open the app. Swipe first row. "Edit" and "Logout" actions become visible. Launch the Accessibility inspector. Inspect the UI. The Identifiers for "Edit" and "Logout" button are not captured by the inspector. Swipe the row to hide the actions. Now swipe the row again to view the actions. Inspect the UI elements. This time the Accessibility inspector is able to capture the identifiers. Why is this happening? How do we get the Accessibility Inspector to capture the identifiers the first time?
Posted
by
Post not yet marked as solved
20 Replies
5.3k Views
I see a lot of crashes on iOS 17 beta regarding some problem of "Text To Speech". Does anybody has a clue why TTS crashes? Anybody else seeing the same problem? Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Subtype: KERN_INVALID_ADDRESS at 0x000000037f729380 Exception Codes: 0x0000000000000001, 0x000000037f729380 VM Region Info: 0x37f729380 is not in any region. Bytes after previous region: 3748828033 Bytes before following region: 52622617728 REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL MALLOC_NANO 280000000-2a0000000 [512.0M] rw-/rwx SM=PRV ---> GAP OF 0xd20000000 BYTES commpage (reserved) fc0000000-1000000000 [ 1.0G] ---/--- SM=NUL ...(unallocated) Termination Reason: SIGNAL 11 Segmentation fault: 11 Terminating Process: exc handler [36389] Triggered by Thread: 9 ..... Thread 9 name: Thread 9 Crashed: 0 libobjc.A.dylib 0x000000019eeff248 objc_retain_x8 + 16 1 AudioToolboxCore 0x00000001b2da9d80 auoop::RenderPipeUser::~RenderPipeUser() + 112 (AUOOPRenderPipePool.mm:400) 2 AudioToolboxCore 0x00000001b2e110b4 -[AUAudioUnit_XPC internalDeallocateRenderResources] + 92 (AUAudioUnit_XPC.mm:904) 3 AVFAudio 0x00000001bfa4cc04 AUInterfaceBaseV3::Uninitialize() + 60 (AUInterface.mm:524) 4 AVFAudio 0x00000001bfa894bc AVAudioEngineGraph::PerformCommand(AUGraphNodeBaseV3&, AVAudioEngineGraph::ENodeCommand, void*, unsigned int) const + 772 (AVAudioEngineGraph.mm:3317) 5 AVFAudio 0x00000001bfa93550 AVAudioEngineGraph::_Uninitialize(NSError**) + 132 (AVAudioEngineGraph.mm:1469) 6 AVFAudio 0x00000001bfa4b50c AVAudioEngineImpl::Stop(NSError**) + 396 (AVAudioEngine.mm:1081) 7 AVFAudio 0x00000001bfa4b094 -[AVAudioEngine stop] + 48 (AVAudioEngine.mm:193) 8 TextToSpeech 0x00000001c70b3c5c __55-[TTSSynthesisProviderAudioEngine renderSpeechRequest:]_block_invoke + 1756 (TTSSynthesisProviderAudioEngine.m:613) 9 libdispatch.dylib 0x00000001ae4b0740 _dispatch_call_block_and_release + 32 (init.c:1519) 10 libdispatch.dylib 0x00000001ae4b2378 _dispatch_client_callout + 20 (object.m:560) 11 libdispatch.dylib 0x00000001ae4b990c _dispatch_lane_serial_drain + 748 (queue.c:3885) 12 libdispatch.dylib 0x00000001ae4ba470 _dispatch_lane_invoke + 432 (queue.c:3976) 13 libdispatch.dylib 0x00000001ae4c5074 _dispatch_root_queue_drain_deferred_wlh + 288 (queue.c:6913) 14 libdispatch.dylib 0x00000001ae4c48e8 _dispatch_workloop_worker_thread + 404 (queue.c:6507) ... Thread 9 crashed with ARM Thread State (64-bit): x0: 0x0000000283309360 x1: 0x0000000000000000 x2: 0x0000000000000000 x3: 0x00000002833093c0 x4: 0x00000002833093c0 x5: 0x0000000101737740 x6: 0x0000000000000013 x7: 0x00000000ffffffff x8: 0x0000000283309360 x9: 0x3c788942d067009a x10: 0x0000000101547000 x11: 0x0000000000000000 x12: 0x00000000000007fb x13: 0x00000000000007fd x14: 0x000000001ee24020 x15: 0x0000000000000020 x16: 0x0000b1037f729360 x17: 0x000000037f729360 x18: 0x0000000000000000 x19: 0x0000000000000000 x20: 0x00000001016a8de8 x21: 0x0000000283e21d00 x22: 0x0000000283b3f1f8 x23: 0x0000000283098000 x24: 0x00000001bfb4fc35 x25: 0x00000001bfb4fc43 x26: 0x000000028033a688 x27: 0x0000000280c93090 x28: 0x0000000000000000 fp: 0x000000016fc86490 lr: 0x00000001b2da9d80 sp: 0x000000016fc863e0 pc: 0x000000019eeff248 cpsr: 0x1000 esr: 0x92000006 (Data Abort) byte read Translation fault
Posted
by
Post not yet marked as solved
1 Replies
695 Views
Hi everyone, I'm building a native application that needs to support accessibility, so it needs to be used with VoiceOver. I followed Apple's guidelines to the letter and I noticed that in order to test accessibility, I can use the "Accessibility Inspector" application. Everything seems to work, I just don't understand how it is possible to change the language of the "Accessibility Inspector" program, I should set it to Italian, because unfortunately it reads everything in English and I have to experiment with Italian. There's a way ? Thank you, Vincent
Posted
by
Post marked as solved
1 Replies
484 Views
When I run the following code: struct ContentView: View { let mdText = LocalizedStringKey("some text [link](https://apple.com) more text") let text = "some text link more text" var body: some View { VStack { Text(mdText) // .accessibilityRotor(.links, textRanges: [String.Index(utf16Offset: 10, in: text)..<String.Index(utf16Offset: 14, in: text)]) // .accessibilityIdentifier("identifier") } } } It works as expected. Specifically in voiceOver I'm able to use the rotor, select "Links" and select the link described in the markdown text. However if I uncomment the .accessibilityIdentifier modifier, "Links" is no longer present in the Rotor. To work around this, I would like to add an accessibilityRotor modifier to restore the Links Rotor item. When I uncomment the rotor modifier in the above code, Links is present in the Rotor, however there are no items in the list (ie swiping down just generates a 'klunk' noise) I think I have two separate questions: Is there any way to restore Links to the VO Rotor for a Text() using text Ranges? Is there some way to add an accessibilityIdentifier that doesn't clobber the Links setting in the VO rotor? thanks in advance :-)
Posted
by
Post not yet marked as solved
1 Replies
297 Views
When 'Increase Contrast' is turned ON, every time I display a custom view with 2 UIDatePickers in it, the CPU and Memory Usage just goes max then the app crashes due to memory issue. This only happens if it 'Increase Contrast' is turned ON, the CPU and memory spike does not occur when it is OFF. Anyone else have encountered this issue? I looked online elsewhere but I couldn't find anything about this. I looked up online and I found out that it's not possible to make the app ignore the Increase Contrast flag (just like you could ignore Dark Mode), as well as, you cannot change/assign colors to the UIDatePicker. So I'm out of ideas now. What could be possible solutions for this problem? NOTE: To turn on 'Increase Contrast', just go to [Settings → Accessibility → Display & Text Size]
Posted
by
Post not yet marked as solved
9 Replies
3.1k Views
In the Settings App, when I go to Accessibility, the only item listed in the SPEECH section is Live Speech. Can I create a personal voice on an iPad? I am using an iPad 8th gen 32 GB, running iPadOS 17 beta 2 (17.0, 21A5268h)
Posted
by
Post not yet marked as solved
1 Replies
409 Views
How can a MacOS user, who can only use a keyboard, select a datalist option on Safari? So far, it is possible to highlight an option using the arrow keys, but when the desired selection is found and highlighted, there is no way to select that option. Combinations Used: Enter + [Shift | Control | Option Command]
Posted
by
Post not yet marked as solved
1 Replies
577 Views
I'm currently working on a music program that I may want the DND status to provide suitable music recommendations to users. I searched the main page of API on APPLE.com but found nothing similar. So is it possible I can get access to such API?
Posted
by
Post not yet marked as solved
0 Replies
342 Views
I've noticed some inconsistencies with the onDrag and onDrop modifiers. Sometimes my objects that can be reordered will announce, "Drag", and will give VoiceOver the ability to move and re-order the object. Other times the "Drag" is never announced, and therefore not accessible to VoiceOver users who may need to re-order their elements. Why does this work sometimes and other times not at all? The Accessibility Inspector is not helpful with this type of interaction so I am limited to testing this on device. Unfortunately, I do not have devices for every iOS version that we currently support (15.x.y - 16.5.z).
Posted
by
Post not yet marked as solved
3 Replies
766 Views
I have a UIButton inside a dynamically-populated stack view that is within a self-sizing table view cell, and although it has a maximumContentSizeCategory of XXXL it is clearly not respecting that. Has anyone else run into this issue, and if so have you found a workaround? I used the appliedContentSizeCategoryLimitsDescription property described here: https://useyourloaf.com/blog/restricting-dynamic-type-sizes to confirm that the maximumContentSizeCategory is indeed being set correctly. This is in the iOS 16.2 iPhone 14 Pro simulator, running in Xcode 14.2.
Posted
by
Post marked as solved
1 Replies
782 Views
I have a ToDo list app with an accompanying widget that displays upcoming items with an 'n more...' label at the bottom if they don't all fit. At the moment the number of rows is hard-coded based on widget family (4 for small and medium, 11 for large). How do I make the row count and 'more' text adjust for dynamic type sizes? Small and medium fonts should display 4 rows while large will only fit 3 before content is pushed off the bottom.
Posted
by
Post marked as solved
1 Replies
918 Views
Hello, I am turning to this forum because I suspect I am "doing it wrong" when it comes to implementing VoiceOver accessibility in my collection view. I suspect this because the system has resisted everything I have tried to do, fought it tooth and nail, and I can't see any way to get this to work. The Collection View I have a collection view that displays a large dataset. It uses a custom collection view layout to create a spreadsheet-like view. It has hundreds of rows, and each row can have hundreds of items. The items in each row do not conform to specific column widths. Their width is defined by the data they display, and for the purposes of this discussion, can be considered to be arbitrary. To the left of the "table" is a column of sticky headers whose position remains fixed in relation to the content. On top of the "table" is a row of headers, whose position also remains fixed. The Problem The default accessibility behavior that Apple has baked into UICollectionView is completely impractical for this application. Each row can contain hundreds of items, so a user who is attempting to navigate by swiping right would have to swipe through hundreds of items just to reach the second row (of hundreds). The Desired Behavior I want the user to be able to swipe through just the cells that are onscreen. To scroll, they can use the standard three-finger gesture. When scrolling occurs, VoiceOver should announce the range of data that is being displayed. Attempted Solution 1: Setting the accessibilityElements array I can set the accessibilityElements array of the UICollectionView to only contain the elements that are onscreen. I also can override the accessibilityScroll method to perform the paging upon a three-finger scroll. This works okay, but has some pretty fatal flaws: As the user swipes through elements, the collection view insists upon scrolling horizontally to try and fit the element into view. It also insists upon scrolling vertically to keep the focused element in the middle of the view. This not only causes the content offset to jump around wildly in a disorienting way, but it also brings content into view that VoiceOver does not know about because I have not added it to the accessibilityElements array. A low-vision user, or a user who pans their finger across the screen, would not be able to access those visible elements. VoiceOver refuses to read my paging announcement. No matter when I post a pageScrolled notification, the system will not read it. Setting accessibilityFrame In an attempt to fix the scroll jumping described above, I tried setting the accessibilityFrame of my collection view cells. This did nothing to alter the scroll jumping behavior, and had the added downside that, as the view jumped around, the accessibility frames did not follow it. A bridge too far? Overriding contentOffset I was about to override contentOffset on the collection view so that only I could set it. That would probably work. But it would do nothing to fix the paging announcement. Attempted Solution 2: Ignore the Cells! Use proxy UIAccessibilityElements I tried setting the accessibilityElements array of my collection view to a collection of UIAccessibilityElement instances whose accessibilityFrame matched the frame of the cells they represent. This worked pretty well! No more scrolling nonsense when swiping through cells, and my paging announcements were being read. This approach has a different, equally fatal flaw: If the user attempts to three finger-scroll too quickly, the VoiceOver process will become confused. It acts as though the last selected element is the only element that exists; swiping right or left does nothing. Three finger-scrolling also does nothing. As best as I can tell, it gets stuck with the last selected element as the only one it knows about. I have since replaced all of the elements in the collection view's accessibilityElements array and posted a layoutDidChange notification, which VoiceOver ignores completely. The only way out of this state is to tap on a cell, causing VoiceOver to refresh its collection of views that it knows about. I guess? No idea what's happening there. Now what? I'm at a complete and total loss. I'm at my wit's end. It feels like this seemingly simple customization is entirely impossible. Does anyone know what I'm doing wrong? Thanks!
Posted
by
Post not yet marked as solved
1 Replies
452 Views
CFBundleSpokenName = "Apple 123" CFBundleName = "Apple" Accessibility Bundle Name don't work without opening app. When I touch the application on device home screen, voiceover reads the app as "Apple". After the app launched, it reads as "Apple 123". I want reading as "Apple 123" on home screen, too. Can you help me?
Posted
by
Post not yet marked as solved
0 Replies
329 Views
Hello friends/colleagues, I want to create a ViewModifier that accepts a conditional accessibilityIdentifier accepting an optional string input struct AccessibilityModifier: ViewModifier { let identifier: String? func body(content: Content) -> some View { if let identifier = identifier { content .accessibilityRepresentation { content .accessibilityIdentifier(identifier) } } else { content } } } it mostly works as expected, but .popover appears to be broken. For example, in the following code, the popover will work. But if I uncomment the .modifier line, the popover does not get presented struct ContentView: View { @State var isPresented: Bool = false var body: some View { VStack { Button("Show Popover") { isPresented = true } } .popover(isPresented: $isPresented) { Text("A Popover") } // .modifier(AccessibilityModifier(identifier: "a11y Modifier")) } } The popover also works when I use: .modifier(AccessibilityModifier(identifier: nil)) Any suggestions on how I can support both popovers and my conditional accessibilityIdentifier? thanks, in advance, Mike
Posted
by
Post not yet marked as solved
1 Replies
272 Views
I am trying to draw NSPanels on texts of other apps using AXObserverAddNotification with the attribute of kAXValueChangedNotification on an AXTextArea I need to detect if the text range on that text area is visible on the screen and I use kAXVisibleCharacterRangeAttribute to get the visible text range but it doesn't include the top bar of the app and gives a range that starts from an index that is not visible. This makes the panels drawn on top of the app's top app bar when scrolled to bottom like this gif How do I exclude the top app bar for visible text range?
Posted
by