Hi guys,
I'm trying to add accessibility labels to a static text and custom SwiftUI views. Example:
MyView {
...
}
//.accessibilityElement()
.accessibilityElement(children: .combine)
//.accessibilityRemoveTraits(.isStaticText)
//.accessibilityAddTraits(.isButton)
.accessibilityLabel("ACCESSIBILITY LABEL")
.accessibilityHint("ACCESSIBILITY HINT")
When using 'voiceover' or 'hover text' accessibility features, focus moves only between active elements and not on static elements.
When I add .focusable() it works, but I don't want to make those elements focusable when all accessibility features are off.
I suppose I could do something like this:
.focusable(UIApplication.shared.accessibility.voiceOver.isOn || UIApplication.shared.accessibility.hoverText.isOn)
Note: this is just pseudocode, because I don't remember exactly how to detect current accessibility settings.
However using focusable() with conditions on hundreds of static texts in an app seems to be overkill. Also the accessibility focus is needed on some control containers where we already have a little more complex handling of focus with conditions in focusable(...) on parent and child elements, so extending it for accesssiblity seems to be too complicated.
Is there a simple way to tell accessiblity that an element is focusable specifically for 'hover text' and for 'voiceover'?
Example what I want to accomplish for TV content:
VStack
{
HStack {
Text(Terminator)
if parentalLock {
Image(named: .lock)
{
}
.accessibilityLabel(for: hover, "Terminator - parental lock")
Text("Sci-Fi * 8pm - 10pm * Remaining 40 min. * Live")
.accessibilityLabel(for: hover, "Sci-Fi, 8 to 10pm, Remaining 40 min. Broadcasting Live")
}
.accessibilityLabel(for: voiceover, "Terminator, Sci-Fi, 8 to 10pm, Remaining 40 min. Broadcasting Live, parental lock")```
I saw all Accessibility WWDC videos 2016, 2022, 2024 and googling it for several hours, but I coudln't find any solution for static texts and custom views. From those videos it appears .accessibilityLabel() should be enough, but it clearly works only on actvie elements and does not work for other SwiftUI views on tvOS without focusable().
Can this be done without using focusable() with conditions for detection which accessibility feature is on?
The problem with focusable would be that for accessibility I may need to read a text for parent view, but focus needs to be placed on a child element. I remember problems when focusable() is set on parent view that child was not focusable or something like that - simply put: complications in focus logic.
Thanks.
Explore best practices for creating inclusive apps for users of Apple accessibility features and users from diverse backgrounds.
Post
Replies
Boosts
Views
Activity
Hi I'm a new Mac user having been a long time PC user and software developer. I also have a mobility impairment that has led me to try to use Voice Control as a replacement for Dragon NaturallySpeaking on my PC.
I have been trying to use Parallels with a Windows 11 VM and Dragon for my remote work, but that seems to have broken when I downloaded the latest macOS beta.
Ideally I'd like to use Voice Control over a VPN/Remote Desktop Connection or, in a pinch, Chrome Remote Desktop. The problem I'm running into is that macOS does not seem to recognize that I am in a text field or other control when I am in the remote application.
I have a utility in Windows that will allow me to voice type into an application window even if the cursor is not over a control, but I can't seem to figure out a way to do that in macOS.
Is there a way to do what I want to do? Is there a more capable voice recognition software package for macOS?
I am running Sequoia 15.2 beta 3 at the moment.
Hello,
in an AVSpeechSynthesisProviderAudioUnit sending word position to host using AVSpeechSynthesisMarker / AVSpeechSynthesisMarker.Mark.word seems to be broken on iOS 18.
On the app/client side all the events are received immediately whereas they should be received synchronised with the audio.
The exact same code works perfectly on iOS 17
On the AVSpeechSynthesisProviderAudioUnit the AVSpeechSynthesisMarker are appended with the correct Position/SampleOffset
let wordPos = NSMakeRange(characterRange.location, characterRange.length)
let marker = AVSpeechSynthesisMarker(markerType: AVSpeechSynthesisMarker.Mark.word, forTextRange:wordPos, atByteSampleOffset:byteSampleOffset)
// also tried with
// let marker = AVSpeechSynthesisMarker(wordRange:wordPos, atByteSampleOffset:byteSampleOffset)
markerArray.append(marker)
print("word : pos \(characterRange) - offset \(byteSampleOffset)")
// send events to host
speechSynthesisOutputMetadataBlock?(markerArray, self.request!)
word : pos {7, 7} - offset 2208
word : pos {15, 8} - offset 37612
word : pos {24, 6} - offset 80368
word : pos {31, 3} - offset 118652
word : pos {35, 2} - offset 128796
...
But on the client side they are all received in the same time (at the beginning of speech) whereas on iOS 17 they arrive sync to the audio.
func speechSynthesizer(_ synthesizer: AVSpeechSynthesizer, willSpeakRangeOfSpeechString characterRange: NSRange, utterance: AVSpeechUtterance) {
print("characterRange : \(characterRange)")
}
Using Apple Voice/engine works so there is obviously something to change but documentation of AVSpeechSynthesisProviderAudioUnit / AVSpeechSynthesisMarker seems unchanged
Thanks in advance
I'm unable to access my Apple Developer Account. This is a first time login and I have made the 99$ payment already through the Apple Developer app on my Iphone. I can't access it from my Iphone as well. When I try to access it via my Mac, this is the error I'm seeing:
I have two iPad Pros
iPad Pro (12.9 inch) (3rd Generation)
iPad Pro 13-inch M4
Both with their Apple Magic Keyboard and trackpad.
With iPadOS 17 I could ctrl-space to jump between input languages. Now with 18.1.1 and 18.2 beta this is broken.
On the old iPad, the languages used to show EN, then DE. Now it shows EN DE, EN DE. I went to settings and the keyboards were shown as having English and German input for two physical keyboards. I deleted and recreated, now each keyboard has only one language and ctrl-space now alternates between EN and DE.
On the new iPad Pro, two keyboards are already set with a single input language, but ctrl-space is not changing the input, it types a space instead. There does not seem to be any way to change the input language using the keyboard.
I am writing an email to a software engineer at Starbucks. In it, I want to make him aware of a Voice Over accessibility issue that I think I know the cause of, but want to verify it here. The issue is nothing happens like it should after entering text into an edit field, then pressing enter. What should happen when pressing enter is that the next page is displayed. However, it does not. Am I right in my guess that the developer has the page hidden? If not, what could it be? Please provide code with comments to fix this issue.
Hi Team,
We are integrating SwiftUI's Charts BarMark, UI looks good but when we try setting up custom ADA it doesn't reflect/override the accessibility label/value we set manually.
Is it iOS defect or is there any workaround?
Thanks in advance.
Sample:
Chart(data) {
BarMark(
x: .value("Category", $0.department),
y: .value("Profit", $0.profit)
)
.foregroundStyle(by: .value("Product Category", $0.productCategory))
.accessibilityIdentifier("BarMark")
.accessibilityLabel("Dep: \($0.department)")
.accessibilityValue("Profile: \($0.profit) Category: \($0.productCategory)")
}
Hello, my name is Donald Kirby, and I am a registered developer. I have been helping the development team with accessibility issues for years. When I first inquired about becoming a developer, they told me I could pay a hundred dollars a year and still contribute.
However, in the last two betas, I've encountered problems with voice control becoming inactive. I tried to screenshot the microphone feature to show them, but it disappears when I use Command + 3. Is there a trick I'm unaware of other than turning the microphone off and back on to reactivate it? I'm baffled about what to do next.
I've reported this issue numerous times, and I'm genuinely trying to help. Unfortunately, I have to rely on dictation when voice control doesn't work, but dictation doesn't operate the computer effectively. It feels like a glitch because recent changes have affected voice control and dictation, particularly with voice command functionality.
If I could code myself, I would gladly learn, but it's quite challenging due to the amount of typing involved. Thank you for your assistance.
Hello everyone,
I’m experiencing an issue with the accessibility feature "Keyboard Navigation" in iOS 18.0. Specifically, when enabling the "Allow Full Keyboard Access" option and attempting to navigate to inline navigation titles within stock iOS apps, the navigation doesn’t seem to work as expected.
Here’s how to replicate the issue:
Enable the accessibility option: Allow Full Keyboard Access (Settings > Accessibility > Keyboards > Full Keyboard Access).
Open any stock iOS app that uses an inline navigation style (for example, the Mail or Settings app).
Press the Tab key to cycle through items on the inline navigation bar.
In iOS 18.0, pressing the Tab key does not allow navigation to the inline navigation title, which was previously possible in iOS 16. This issue is specific to iOS 18 and iOS 17, as it worked fine on the earlier version (iOS 16).
Has anyone else encountered this issue or have suggestions for a workaround? Would love to hear your thoughts.
您好,我们是中国的一家软件开发公司。我们应用程序的底层框架基于美国开源社区的 XMPP 协议框架。它是一个国际开源项目,许多中国软件公司以开源框架为基础,在美国开源社区框架之上开发 UI 和替换功能。但是当我们需要将应用上传到应用商店时,会收到提示(拒绝 4.3A 应用垃圾邮件),因为中国目前没有独立开发这个框架的能力。因此,我们不得不承认,我们的 app 使用了美国开源社区的框架,因为中国的很多其他公司也都使用了美国开源社区的框架。这导致我们在将应用程序上传到应用商店时出现提示 (reject 4.3A application spam),因为其他公司在将其上传到应用商店时也使用相同的底层开源框架。这会导致我们公司在将此应用程序上传到应用商店时收到提示(拒绝 4.3A 应用程序垃圾邮件)。我们公司在这个 App 上花费了大量的精力和金钱,如果不允许中国公司上传到 App Store,就会被拒绝。使用来自美国的开源框架,这导致很多中国公司在后期无法使用美国的开源框架作为开发的基础。我们恳请贵公司为中国的小企业提供指导,并就我们未来的发展提供建议。谢谢。
Hi, I am searching for the possibilities to enable one of my app to be able to read NFC cards, my observation based on my search resulted that the app should be first 'entitled' (special permissions) by Apple, which I am unaware of its procedures, can anyone please shed some light on its forward path?
Prior to iOS 18.1, App-prefs:Wallpaper deeplinked to the wallpaper settings. On iOS 18.1, it now deeplinks to the settings app. Is there a new URL to deeplink to the Wallpaper settings?
The following URLs have been tested and do not work on iOS 18.1:
App-prefs:Wallpaper
App-prefs:wallpaper
App-prefs:root=wallpaper
App-prefs:root=Wallpaper
App-prefs:root=WALLPAPER
App-prefs:root=General&path=Wallpaper
prefs:root=Wallpaper
When I'm in TERMINAL and I issue the cd command it says no such file or directory.
I cut this from the terminal session:
Last login: Tue Nov 12 20:10:57 on ttys000
The default interactive shell is now zsh.
To update your account to use zsh, please run chsh -s /bin/zsh.
For more details, please visit https://support.apple.com/kb/HT208050.
iMac:~ robertsantovasco$ cd desktop
iMac:desktop robertsantovasco$ cd L1 demo
-bash: cd: L1: No such file or directory
iMac:desktop robertsantovasco$ cd L1
-bash: cd: L1: No such file or directory
iMac:desktop robertsantovasco$ cd L1 demo
-bash: cd: L1: No such file or directory
iMac:desktop robertsantovasco$ cd /
iMac:/ robertsantovasco$ cd desktop
-bash: cd: desktop: No such file or directory
iMac:/ robertsantovasco$ cd L1 demo
-bash: cd: L1: No such file or directory
iMac:/ robertsantovasco$ cd L1 demo
-bash: cd: L1: No such file or directory
iMac:/ robertsantovasco$ cd desktop
-bash: cd: desktop: No such file or directory
iMac:/ robertsantovasco$ cd desktop
-bash: cd: desktop: No such file or directory
iMac:/ robertsantovasco$ CD desktop
/usr/bin/CD: line 4: cd: desktop: No such file
I developed a watchOS app to capture gyro data, save it in real-time as a CSV file, and send it to an iOS app. However, when I start writing with the watch on, the screen dims, and it stops working. It only resumes operation when I tap the screen again.
Is there a way to let it run in the background and transmit files in real-time, even when the screen is off?
My app does not automatically switch languages (voices) in VoiceOver when I have VoiceOver on and the screen includes both English and Spanish content. Instead of switching between the correctly accented voice, whatever my manual Voices rotor setting is, that's what the content is announced as. I can manually switch the Voice in the rotor to make words sound inteligible but my main concern is that language changes are not auto-detected even though that feature in my Settings is on.
VO does detect language changes in other apps, so I think there must be either misplaced or missing accessibiiltyLanguage strings somewhere in my app. Or is it more than that for localization considerations?
I reached out to the Apple Accessibilty team and was directed to open a ticket here, as my question is about the underlying code.
I am a novice developer and primarily accessibility SME; i expect that wnen "detect languages" is on in the user settings for VoiceOver, that the voice for the screen reader speech output will automatically switch to the correct language / accent. I recognize there is a problem but am not sure where the breakdown is. I would like guidance how to fix it to relay to my teams.
https://developer.apple.com/documentation/objectivec/nsobject/1615192-accessibilitylanguage
I was able to add shortcuts with parameters and use them from the Shprtcuts app in iOS 17, nevertheless Siri intent did never work.
I upgraded to iOS 18 my app and my mobile.
Now, the shortcut only appears in shortcuts app if no parameter is added to it. When I try to set a parameter, the shortcut does not appear any mora in Shortcuts app.
struct ShortcutsProvider: AppShortcutsProvider {
static var appShortcuts: [AppShortcut] {
AppShortcut(
intent: OpenAppIntent(),
phrases: [
"Show (.$screen) in (.applicationName)"
],
shortTitle: "Open",
systemImageName: "iphone.badge.play"
)
}
}
struct OpenAppIntent: AppIntent {
static var title: LocalizedStringResource = "Show"
static let description = IntentDescription("Shows a screen.")
static var openAppWhenRun: Bool = true
static var authenticationPolicy = IntentAuthenticationPolicy.alwaysAllowed
@Parameter(title: "screen")
var screen: String
@MainActor
func perform() async throws -> some IntentResult {
return .result()
}
}
extension ScreenOption: AppEntity {
struct OpenAppQuery: EntityQuery {
@IntentParameterDependency<OpenAppIntent>( \.$screen )
var openAppIntent
func entities(for: [ScreenOption.ID]) async throws -> [ScreenOption] {
return []
}
func suggestedEntities() async throws -> [ScreenOption] {
return []
}
}
var displayRepresentation: DisplayRepresentation {
.init(stringLiteral: "\(title)")
}
static var defaultQuery: OpenAppQuery = OpenAppQuery()
static var typeDisplayRepresentation: TypeDisplayRepresentation = .init(name: "Screen")
}
extension ScreenOption: EntityIdentifierConvertible {
static func entityIdentifier(for entityIdentifierString: String) -> ScreenOption? {
allCases.filter { $0.rawValue == entityIdentifierString }.first
}
public var entityIdentifierString: String {
rawValue
}
public init?(entityIdentifierString: String) {
guard let screenOption = ScreenOption.entityIdentifier(for: entityIdentifierString)
else { return nil }
self = screenOption
}
}
url: https://uclient-api.itunes.apple.com/WebObjects/MZStorePlatform.woa/wa/lookup?version=2&id=1515995528&p=mdm-lockup&caller=MDM&platform=enterprisestore&cc=IN
Response :
{
"results": {},
"version": 2,
"isAuthenticated": false,
"meta": {
"storefront": {
"id": "143467",
"cc": "IN"
},
"language": {
"tag": "en-gb"
}
}
}
Any solution for this?
I have been using M1 MacBook Pro, & need to upgrade but I don't want to switch to function keys after using Touch Bar. I desperately want Apple Team to bring back Touch Bar. .I can wait for another release.
Over the years apple y'all have continued to improve iOS adding many new features and I’m very impressed with the new ai features however there’s one thing that yall haven’t added for some reason and it’s a clear all tabs button. It would make things so much easier instead of swiping up on all those tabs you can you just press a button and everything’s reset. I don’t know if y'all have a reason for not adding the button yet but just putting it out there.
I m unable to connect CarPlay to Mercedes GLC 2024 with Apple 15PMX. Made all recommendations by Apple, renew the car's sw too. It didn't work despite I tried many times. Funny that my iPhone 11 connects flawlessly both with cord or wireless.
However my iPhone 15PMX does connect to any other cars too either with cable or wireless.
Is it a bug or a really inability?