We are building a 508 compliant WPF application and testing it with JAWS 18, and one thing we found was that TextBlocks in every cell of the same Grid are being read off back to back when the first item is selected. Also, it does not work if you are using 'shift' + 'tab' to move selection backwards, only when you use 'tab' alone and move forward. I tested if it was somehow a property of Grids by making a sample application with a Grid and TextBlocks in the columns and rows and selecting the upper left cell, and that did not make JAWS read all items on the Grid. So I don't think it is a general property of the Grid in WPF. I would like to disable this feature.
<ScrollViewer>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="auto"/> //More of these
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<StackPanel Grid.Row="0"
Grid.Column="0"
Style="{StaticResource FacilityDetailsStackPanelStyle}"
Visibility="{Binding SelectedContact.FirstName, Converter={StaticResource StringToVisibilityConverter}}">
<TextBlock Text="{Binding Source={StaticResource ApplicationSettings}, Path=ContactNameLabelText}"/>
<TextBlock>
<TextBlock.Text>
<MultiBinding StringFormat="{}{0} {1}">
<Binding Path="SelectedContact.FirstName"/>
<Binding Path="SelectedContact.LastName"/>
</MultiBinding>
</TextBlock.Text>
<AutomationProperties.Name>
<MultiBinding StringFormat="{}{0} {1} {2}">
<Binding Source="{StaticResource ApplicationSettings}" Path="ContactNameText"/>
<Binding Path="SelectedContact.FirstName"/>
<Binding Path="SelectedContact.LastName"/>
</MultiBinding>
</AutomationProperties.Name>
</TextBlock>
</StackPanel>
<StackPanel Grid.Row="1"
Grid.Column="0"
Style="{StaticResource FacilityDetailsStackPanelStyle}"
Visibility="{Binding Path=SelectedContact.JobTitle, Converter={StaticResource StringToVisibilityConverter}}">
<TextBlock Text="{Binding Source={StaticResource ApplicationSettings}, Path=ContactJobTitleLabelText}"/>
<TextBlock Text="{Binding SelectedContact.JobTitle}">
<AutomationProperties.Name>
<MultiBinding StringFormat="{}{0} {1}">
<Binding Source="{StaticResource ApplicationSettings}" Path="ContactJobTitleText"/>
<Binding Path="SelectedContact.JobTitle"/>
</MultiBinding>
</AutomationProperties.Name>
</TextBlock>
</StackPanel>
<Grid/> //After all the same type of StackPanel/TextBlock structure.
<ScrollViewer/>
SelectedContact is a Contact business class that is selected by binding to SelectedItem property on a DataGrid where the ItemsSource is a list of Contact objects.
The grid was wrapped in a ScrollViewer, but I commented this out and there was no changes to the function. edit: there was no changes to function commenting out ScrollViewer, but adding AutomationProperties.Name
to said ScrollViewer is what solved the problem.
We came to a solution by adding the AutomationProperties.Name
property to the ScrollViewer that wraps the Grid. When we enter into the ScrollViewer it now reads out the text we bound that to.