Commit 16184ce
committed
Control Panel: two lists announced their type name to screen readers
Found while driving the Control Panel through UI Automation to capture
documentation screenshots: the alias list on the Domains page exposed
"hMailServer.ControlPanel.Views.DomainsView+AliasRow" as its accessible name for
every row, and the live log exposed "LogsView+LogLine" for every line.
Both lists use an ItemTemplate, so the text a sighted user sees comes from a
binding - Display and Text respectively - while a ListViewItem's accessible name
falls back to ToString() on the bound object. Neither class overrode it, so
assistive technology got the CLR type name instead of the content.
The live log is the worse of the two: it is the page an administrator is most
likely to be reading aloud, or reading with a screen reader, at exactly the
moment something has gone wrong.
Scope is genuinely these two. The domain, account and distribution-list views on
the same page bind plain strings and were always correct, and every other list in
the application (IP ranges, queue, routes, rules, certificates, TCP/IP ports) is
a DataGrid, which builds a row's name from its cells rather than from ToString().
AddrItem already had an override, which is what the pattern should look like.
Verified through the same API that exposed the problem. Before, the Domains page
reported one item as "hMailServer.ControlPanel.Views.DomainsView+AliasRow"; it
now reports "info@example.com -> sales@example.com". The live log reports 37
items, 0 of which announce a type name.
Control Panel builds with -warnaserror and no warnings; its 17 unit tests pass.1 parent 92a6599 commit 16184ce
2 files changed
Lines changed: 14 additions & 0 deletions
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
64 | 71 | | |
65 | 72 | | |
66 | 73 | | |
| |||
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
21 | 28 | | |
22 | 29 | | |
23 | 30 | | |
| |||
0 commit comments