![](/img/trans.png)
[英]How can we change the foreground color on point hover in a listview binded with two textblock of the different foreground colors?
[英]For accessibility (a11y) we need access to TextBlock items with the keyboard (Tab). How can we manage that?
對於我們的項目,我們需要制作一個 UWP 應用程序,並且它必須可供盲人訪問。 但是我們有靜態文本的問題。
TextBlock 不是從 Control 派生的,因此它不是 Focusable。 我們試圖將它包裝在一個 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>
我們如何將靜態文本放入可訪問性樹中,以便用戶可以使用鍵盤導航到它並可以聽到文本?
當您在按住 de Caps Lock 或 Insert 按鈕時使用箭頭鍵時,可以訪問文本項目並且講述人正在閱讀文本。
所以問題解決了
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.