aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorSimon Rozman <simon@rozman.si>2019-09-09 13:10:44 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2019-10-04 11:43:09 +0200
commit0c1f6272c1647c5871b601dd15fdbabe6249a1bb (patch)
tree05c51b02404da6ebd3368f0275f1ef918af4f01d /ui
parentmod: bump versions (diff)
downloadwireguard-windows-0c1f6272c1647c5871b601dd15fdbabe6249a1bb.tar.xz
wireguard-windows-0c1f6272c1647c5871b601dd15fdbabe6249a1bb.zip
ui: annotate controls
Regarding interface and peer info text boxes: The read-only edit boxes containing interface and peer status and information were read as "<value> read-only multiline" by NVDA screen reader. The read-only edit boxes that serve the informative purpose only must be annotated as ROLE_SYSTEM_STATICTEXT instead of edit box-inherited ROLE_SYSTEM_TEXT role. Regarding logo image in about dialog: NVDA reads "unknown" when reading the dialog without this patch. Signed-off-by: Simon Rozman <simon@rozman.si>
Diffstat (limited to 'ui')
-rw-r--r--ui/aboutdialog.go1
-rw-r--r--ui/confview.go2
-rw-r--r--ui/editdialog.go3
3 files changed, 6 insertions, 0 deletions
diff --git a/ui/aboutdialog.go b/ui/aboutdialog.go
index ab3b17e7..d87727aa 100644
--- a/ui/aboutdialog.go
+++ b/ui/aboutdialog.go
@@ -79,6 +79,7 @@ func runAboutDialog(owner walk.Form) error {
if logo, err := loadLogoIcon(128); err == nil {
iv.SetImage(logo)
}
+ iv.Accessibility().SetName("WireGuard logo image")
wgLbl, err := walk.NewTextLabel(showingAboutDialog)
if err != nil {
diff --git a/ui/confview.go b/ui/confview.go
index c748d2af..250b7427 100644
--- a/ui/confview.go
+++ b/ui/confview.go
@@ -145,6 +145,7 @@ func newLabelStatusLine(parent walk.Container) (*labelStatusLine, error) {
lsl.statusLabel.SetTextSelection(0, 0)
})
lsl.update(manager.TunnelUnknown)
+ lsl.statusLabel.Accessibility().SetRole(walk.AccRoleStatictext)
disposables.Spare()
@@ -201,6 +202,7 @@ func newLabelTextLine(fieldName string, parent walk.Container) (*labelTextLine,
lt.text.FocusedChanged().Attach(func() {
lt.text.SetTextSelection(0, 0)
})
+ lt.text.Accessibility().SetRole(walk.AccRoleStatictext)
disposables.Spare()
diff --git a/ui/editdialog.go b/ui/editdialog.go
index 142d47a2..191b3330 100644
--- a/ui/editdialog.go
+++ b/ui/editdialog.go
@@ -108,11 +108,14 @@ func newEditDialog(owner walk.Form, tunnel *manager.Tunnel) (*EditDialog, error)
layout.SetRange(dlg.pubkeyEdit, walk.Rectangle{1, 1, 1, 1})
dlg.pubkeyEdit.SetReadOnly(true)
dlg.pubkeyEdit.SetText("(unknown)")
+ dlg.pubkeyEdit.Accessibility().SetRole(walk.AccRoleStatictext)
if dlg.syntaxEdit, err = syntax.NewSyntaxEdit(dlg); err != nil {
return nil, err
}
layout.SetRange(dlg.syntaxEdit, walk.Rectangle{0, 2, 2, 1})
+ // TODO: This doesn't work - RTF control overrides us with "RichEdit Control".
+ dlg.syntaxEdit.Accessibility().SetName("Configuration")
buttonsContainer, err := walk.NewComposite(dlg)
if err != nil {