|
74 | 74 | ContentSource="Header"
|
75 | 75 | RecognizesAccessKey="True"
|
76 | 76 | TextElement.Foreground="{TemplateBinding Foreground}" />
|
| 77 | + <!-- TextBlock added so that screen readers don't try to read Icon --> |
| 78 | + <TextBlock Grid.Column="0" |
| 79 | + Grid.ColumnSpan="3" |
| 80 | + Width="{Binding Width, RelativeSource={RelativeSource AncestorType={x:Type MenuItem}}}" |
| 81 | + Height="{Binding Height, RelativeSource={RelativeSource AncestorType={x:Type MenuItem}}}" |
| 82 | + Margin="-10" |
| 83 | + FontSize="1" |
| 84 | + Opacity="0" |
| 85 | + Text="{Binding AutomationProperties.Name, RelativeSource={RelativeSource AncestorType={x:Type MenuItem}}}" |
| 86 | + Background="Black"/> |
77 | 87 | </Grid>
|
78 | 88 |
|
79 | 89 | <Popup
|
|
181 | 191 | ContentSource="Header"
|
182 | 192 | RecognizesAccessKey="True"
|
183 | 193 | TextElement.Foreground="{TemplateBinding Foreground}" />
|
| 194 | + <!-- TextBlock added so that screen readers don't try to read Icon --> |
| 195 | + <TextBlock Grid.Column="0" |
| 196 | + Grid.ColumnSpan="3" |
| 197 | + Width="{Binding Width, RelativeSource={RelativeSource AncestorType={x:Type MenuItem}}}" |
| 198 | + Height="{Binding Height, RelativeSource={RelativeSource AncestorType={x:Type MenuItem}}}" |
| 199 | + Margin="-10" |
| 200 | + FontSize="1" |
| 201 | + Opacity="0" |
| 202 | + Text="{Binding AutomationProperties.Name, RelativeSource={RelativeSource AncestorType={x:Type MenuItem}}}" |
| 203 | + Background="Black"/> |
184 | 204 | </Grid>
|
185 | 205 | </Border>
|
186 | 206 | <ControlTemplate.Triggers>
|
|
264 | 284 | FontSize="11"
|
265 | 285 | Foreground="{DynamicResource TextFillColorDisabledBrush}"
|
266 | 286 | Text="{TemplateBinding InputGestureText}" />
|
| 287 | + |
| 288 | + <!-- TextBlock added so that screen readers don't try to read Icon --> |
| 289 | + <TextBlock Grid.Column="0" |
| 290 | + Grid.ColumnSpan="5" |
| 291 | + Width="{Binding Width, RelativeSource={RelativeSource AncestorType={x:Type MenuItem}}}" |
| 292 | + Height="{Binding Height, RelativeSource={RelativeSource AncestorType={x:Type MenuItem}}}" |
| 293 | + Margin="-10" |
| 294 | + FontSize="1" |
| 295 | + Opacity="0" |
| 296 | + Text="{Binding AutomationProperties.Name, RelativeSource={RelativeSource AncestorType={x:Type MenuItem}}}" |
| 297 | + Background="Black"/> |
267 | 298 | </Grid>
|
268 | 299 | </Border>
|
269 | 300 | <ControlTemplate.Triggers>
|
|
334 | 365 | FontSize="{TemplateBinding FontSize}"
|
335 | 366 | Symbol="ChevronRight20" />
|
336 | 367 | </Grid>
|
| 368 | + |
| 369 | + <!-- Fix double narration from mousing over the button and then the associated text --> |
| 370 | + <TextBlock Grid.Column="0" |
| 371 | + Grid.ColumnSpan="3" |
| 372 | + Width="{Binding Width, RelativeSource={RelativeSource AncestorType={x:Type MenuItem}}}" |
| 373 | + Height="{Binding Height, RelativeSource={RelativeSource AncestorType={x:Type MenuItem}}}" |
| 374 | + Margin="-10" |
| 375 | + FontSize="1" |
| 376 | + Opacity="0" |
| 377 | + Text="{Binding AutomationProperties.Name, RelativeSource={RelativeSource AncestorType={x:Type MenuItem}}}" |
| 378 | + Background="Black"/> |
337 | 379 | </Grid>
|
338 | 380 | </Border>
|
339 | 381 |
|
|
0 commit comments