JAWS or windows narrator not working/announcing localized description of enum bind to combo box for wpf application

Ajay Gera 40 Reputation points
2024-09-27T15:19:25.7666667+00:00

Hi,

I am using JAWS screen reader / windows narrator on wpf dialog for wpf application.

But reader does not says/announce/speaks about description of enum bound to combobox in WPF c# application.

Screen reader speaks/announce enumerator rather than localized description

Can you please let me know or share sample code how to fix screen reader issue so that it speaks/say/announce enumerator localized description?

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,768 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,902 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Hongrui Yu-MSFT 1,765 Reputation points Microsoft Vendor
    2024-09-30T06:34:56.47+00:00

    Hi,@Ajay Gera. Welcome to Microsoft Q&A. 

    You could refer to the following code to read the contents of the ComboBox.

     

    
        <Grid>
    
            <ComboBox x:Name="MyComboBox" HorizontalAlignment="Center" VerticalAlignment="Center" Width="50" AutomationProperties.Name="My ComboBox"  AutomationProperties.LabeledBy="{Binding ElementName=MyComboBox}" >
    
                <ComboBoxItem Content="AA" AutomationProperties.Name="MY AA"></ComboBoxItem>
    
                <ComboBoxItem Content="BB" AutomationProperties.Name="MY BB"></ComboBoxItem>
    
                <ComboBoxItem Content="CC" AutomationProperties.Name="MY CC"></ComboBoxItem>
    
            </ComboBox>
    
        </Grid>
    
    

     

    Run the WPF project and open Narrator by Win+Ctrl+Enter. When the mouse clicks on the ComboBox, you could hear the content of AutomationProperties.Name in the ComboBox, and when the mouse moves to the ComboBoxItem, you could hear the content of AutomationProperties.Name in the ComboBoxItem.


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  2. Ajay Gera 40 Reputation points
    2024-10-01T13:33:28.31+00:00

    I was able to resolve case#1 using ComboBox.ItemContainerStyle . Please note, comboboxitem approach does not work when combobox is bound using ItemsSource

    Following is code snippet

    <ComboBox.ItemContainerStyle>

    <Style TargetType="ComboBoxItem">                                
    
        <Setter Property="AutomationProperties.Name" Value="{Binding Converter={StaticResource EnumDescriptionConverter}}" />
    
    </Style>
    

    </ComboBox.ItemContainerStyle>

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.