Commit dee71cd
Fix null Name on empty page header description (MAS 4.1.2) (#781)
The PageHeader description Label is a focusable tab stop, but its
visibility used NullToVisibilityConverter, which only collapses on null -
not on an empty string. Pages whose description is "" (Label, TextBox,
TextBlock, RichTextEdit, PasswordBox and many others) therefore rendered
an empty, focusable element with a null UI Automation Name, flagged by
Accessibility Insights as "The Name property of a focusable element must
not be null" (MAS 4.1.2 - Name, Role, Value).
- Switch the description Label visibility to EmptyToVisibilityConverter so
it collapses on null, empty, or whitespace, removing the empty focusable
element entirely.
- Add AutomationProperties.Name bound to Description so the description has
a meaningful Name when it is visible.
- Remove the now-unused NullToVisibilityConverter resource declaration.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 0238f8a commit dee71cd
1 file changed
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
31 | | - | |
| 32 | + | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
| |||
0 commit comments