在VoiceOver启用时,如何在Chrome中滑动一个DOM元素?

huangapple go评论67阅读模式
英文:

How do you swipe a DOM element in Chrome when VoiceOver is on?

问题

我正在开发一个应用程序,在Chrome中有一个DOM元素,通常通过滑动进行交互。但是当VoiceOver打开时,滑动会导航到下一个和上一个UI元素,正如在您的应用程序中支持VoiceOver中所记录的。

我的问题是:

当VoiceOver打开时,是否可以通过其滑动界面与DOM元素进行交互,还是必须完全避免滑动?

谢谢!

英文:

I am working on an app that has a DOM element in Chrome that is often interacted with through swipes. However when VoiceOver is on, the swipes are navigating to the next and previous UI elements, as it is documented in Supporting VoiceOver in your app.

My question is:

Is it possible to interact with a DOM element through its swiping interface when VoiceOver is on or do you have to avoid swiping altogether?

Thanks!

答案1

得分: 0

如果用户与可滚动区域进行交互,将使用三指滑动手势来滚动内容:
https://support.apple.com/en-gb/guide/iphone/iph3e2e2281/ios#ipha9fcf687a

VoiceOver有一个“传递”手势。您可以使用一个手指双击触摸屏,但要保持第二次点击,直到听到音频提示(三个音调),表明手势现在将绕过VoiceOver的手势导航模型。一旦您将手指从屏幕上抬起,它将恢复到VoiceOver的通常导航模式。它可以用于更精细地控制滑块值,例如。它可能允许您与您的Web应用进行交互。

原生应用程序将使用allowsDirectInteraction特性,这本质上允许VoiceOver用户直接与UI元素进行交互,绕过VoiceOver的手势导航模型。它用于允许VoiceOver用户与手写功能、签名框、音乐应用程序(如钢琴)等进行交互。我期望Chrome使用类似的方法来启用与<canvas>元素等的交互。
https://developer.apple.com/documentation/uikit/uiaccessibilitytraits/1620172-allowsdirectinteraction

英文:

If a user is interacting with a scrollable area, three-finger swipe gestures are used to scroll the content:
https://support.apple.com/en-gb/guide/iphone/iph3e2e2281/ios#ipha9fcf687a

VoiceOver has a "pass-thru" gesture. You double-tap on the touchscreen with one finger but hold the second tap down until you hear an audio prompt (three tones) indicating that the gesture will now bypass VoiceOver's gesture navigation model. As soon as you lift your finger off the screen, it goes back to VoiceOver's usual navigation mode. It can be used to have finer control over slider values, for example. It might allow you to interact with your web app.

What a native app would use is the allowsDirectInteraction trait, which essentially allows VoiceOver users to interact with the UI element directly, bypassing VoiceOver's own gesture navigation model. It's used to allow VoiceOver users to interact with handwriting features, signature boxes, musical apps like a piano. I would expect Chrome to use something like this to enable interaction with things like &lt;canvas&gt; elements.
https://developer.apple.com/documentation/uikit/uiaccessibilitytraits/1620172-allowsdirectinteraction

huangapple
  • 本文由 发表于 2023年6月26日 21:45:05
  • 转载请务必保留本文链接:https://go.coder-hub.com/76557276.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定