[英]For accessibility (a11y) we need access to TextBlock items with the keyboard (Tab). How can we manage that?
For our project we need to make an UWP application and it must be accessible for blind people.对于我们的项目,我们需要制作一个 UWP 应用程序,并且它必须可供盲人访问。 But we have a problem with static texts.但是我们有静态文本的问题。
TextBlock is not derived from Control, so it's not Focusable. TextBlock 不是从 Control 派生的,因此它不是 Focusable。 We tried to wrap it within a ContentControl, but that doesn't work either.我们试图将它包装在一个 ContentControl 中,但这也不起作用。
<ContentControl
x:Name="textBlock"
Grid.Row="1"
Margin="24,0,0,24"
HorizontalAlignment="Left"
VerticalAlignment="Top"
IsFocusEngagementEnabled="True"
IsTabStop="True"
TabIndex="20">
<TextBlock IsTextSelectionEnabled="True" TextWrapping="Wrap">
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa.
</TextBlock>
</ContentControl>
How can we get static text into the accessibility tree so the user can navigate to it with the keyboard and can hear the text?我们如何将静态文本放入可访问性树中,以便用户可以使用键盘导航到它并可以听到文本?
When you use the arrow keys when holding de Caps Lock or Insert Button the text items are accessible and Narrator is reading the text.当您在按住 de Caps Lock 或 Insert 按钮时使用箭头键时,可以访问文本项目并且讲述人正在阅读文本。
So problem solved所以问题解决了
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.