Screenreader (NVDA) only reads WPF Window-Title

寵の児 提交于 2019-12-11 04:39:45

问题


I'm trying to have Screenreaders (I'm testing with NVDA) read out the AutomationProperties.Name and AutomationProperties.Helptext of the focused Controls.

However all it does is saying "MAINWINDOW", when I focus the Application.

<Window x:Class="AutomationPropertiesTest.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="MainWindow" Height="394" Width="307"       
    >

<Grid>
    <Label Content="Summand" Height="28" HorizontalAlignment="Left" Margin="12,8,0,0" Name="label1" VerticalAlignment="Top" />
    <Label Content="Summand" Height="28" HorizontalAlignment="Left" Margin="12,43,0,0" Name="label2" VerticalAlignment="Top" />
    <Label Content="Summe" Height="28" HorizontalAlignment="Left" Margin="12,125,0,0" Name="label3" VerticalAlignment="Top" />
    <Rectangle Height="2" HorizontalAlignment="Left" Margin="0,80,0,0" Name="rectangle1" Stroke="Black" VerticalAlignment="Top" Width="336" />


    <Button x:Name="btnBerechnen" Content="Berechnen" AutomationProperties.AutomationId="MainWindow_Button_Berechnen" AutomationProperties.IsRequiredForForm="True" AutomationProperties.Name="Summe Berechnen" AutomationProperties.HelpText="Mit diesem Knopf starten Sie die Berechnung" Height="23" HorizontalAlignment="Left" Margin="12,88,0,0" VerticalAlignment="Top" Width="261" />

    <TextBox x:Uid="summand 1" AutomationProperties.AutomationId="MainWindow_TextBox_Summand1" AutomationProperties.IsRequiredForForm="True" AutomationProperties.Name="Summand 1" AutomationProperties.HelpText="Bitte geben Sie den ersten Summanden ein" Height="23" HorizontalAlignment="Left" Margin="82,10,0,0" Name="textBox1" VerticalAlignment="Top" Width="120" />
    <TextBox AutomationProperties.AutomationId="MainWindow_TextBox_Summand2" AutomationProperties.IsRequiredForForm="True" AutomationProperties.Name="Summand 2" AutomationProperties.HelpText="Bitte geben Sie den zweiten Summanden ein" Height="23" HorizontalAlignment="Left" Margin="82,43,0,0" Name="textBox2" VerticalAlignment="Top" Width="120" />
    <TextBox AutomationProperties.AutomationId="MainWindow_TextBox_Summe" AutomationProperties.IsRequiredForForm="False" AutomationProperties.Name="Summe" AutomationProperties.HelpText="Hier steht das Ergebnis" Height="26" HorizontalAlignment="Left" Margin="82,125,0,0" Name="textBox3" VerticalAlignment="Top" Width="120" />
</Grid>

Any ideas on how to fix this?


回答1:


Found the answer myself... this happens only when I run the program (debug) from within Visual Studio. When I start the .exe itself its working properly.



来源:https://stackoverflow.com/questions/11139641/screenreader-nvda-only-reads-wpf-window-title

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!