辅助功能自定义操作未在 Swift 中公布

Accessibility Custom Actions aren't announced in Swift

当我将 accessibilityCustomActions 添加到一个对象时,它在设备上可以正常工作,只要能够上下滑动操作和 select 它们,但是没有公告表明有 "Actions available" - 我应该自己将其写入 accessibilityLabel 吗?

我认为通过将自定义操作添加到我的对象,它会自动宣布 "Actions available",或者 "Swipe up to select..."

I thought that by adding the custom actions to my object, it would announce "Actions available" automatically, or "Swipe up to select..."

你是对的,它应该读出这些公告,但是这种 奇怪的行为 已经被引入使得它自己在 iOS 中变得稀缺 13

"iOS 13 introduced a new custom actions behavior: the "可用操作”公告不再总是存在。
它以前提供给包含自定义操作的每个元素,但现在,当您导航到包含一组不同操作的另一个元素时,它就会发生。
目的是防止在与前一个元素存在相同操作的元素上重复通告
source

无法取消这种对 VoiceOver 用户来说几乎有效的行为。
此外,如果你在 iOS 12 中做同样的事情,它会完美地工作:自定义操作存在并在每次为可访问元素实现它们时宣布。

不幸的是,在 iOS 13 中,这是一个 新行为,由 Apple 支持本身解释 (accessibility@apple.com) 但没有 public 演示文稿 (WWDC,Apple 网站...) 对于如此巨大的对于使用 VoiceOver 的有视力障碍的人来说,修改更像是一个问题而不是重大改进。

支持人员没有提出任何解决方案,除非在下一个 WWDC 中进行回滚,否则我们将不得不处理这个问题……点燃蜡烛。

⚠️⬛️◼️▪️编辑▪️◼️⬛️⚠️(2020/03/19)

我写了一个D开发者T技术S支持I ncident (no 730330678) 这个问题,这里是 Apple 的答案:

There is no published information.
We intentionally made changes in iOS 13, so that we would only speak actions available if the list of actions had changed from the previous element you were on, or you moved to a different container.
You can do a flash manipulation of the list or bounce quickly between containers but this should just work without code changes.
Unfortunately in currently shipping systems it is a bug.
We are improving our documentation as well so please stay tuned.

我提交了一份题为 VoiceOver 不再读出自定义操作 的错误报告,参考文献 FB7426771.

现在,您知道为什么 辅助功能自定义操作没有在 Swift 中公布...只是有时在 iOS 13 中公布。