简体   繁体   English

对于可访问性 (a11y),我们需要使用键盘 (Tab) 访问 TextBlock 项目。 我们怎样才能做到这一点?

[英]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.

相关问题 我们如何在与不同前景 colors 的两个文本块绑定的列表视图中更改点 hover 的前景色? - How can we change the foreground color on point hover in a listview binded with two textblock of the different foreground colors? 如何在 UWP 中更改列表框项目 (Textblock) 的背景 - How to change background of listbox items (Textblock) in UWP 将特定运行添加到 Windows.UI.Xaml.Controls.TextBlock 后,如何以编程方式访问它? - How can I programmatically access a specific Run after adding it to a Windows.UI.Xaml.Controls.TextBlock? 如何从任务/线程访问TextBlock控件? - How to access TextBlock control from a task/thread? 我们如何在UWP Mapcontrol中放置一些自定义按钮? - How we can put some custom button in UWP Mapcontrol? 我们可以在UWP中自定义CommandBar吗 - Can we customize CommandBar in UWP 我们如何在 AdvancedCollectionView uwp 的顶部移动最近更新的项目 - How can we move recent updated item on top in AdvancedCollectionView uwp 如何在按钮 XAML C# UWP 中访问命名的 TextBlock - How to access a named TextBlock in a button XAML C# UWP 为什么我们在使用 SocketActivityTrigger 时需要事件 StreamSocketListener.ConnectionReceived? - Why do we need the event StreamSocketListener.ConnectionReceived when we use SocketActivityTrigger? 如何在静态类中访问文本块或 UI 元素并设置属性 - How to access textblock or UI Element in static class and set the properties
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM