Skip to content
This repository was archived by the owner on Oct 4, 2021. It is now read-only.

Commit 89fa670

Browse files
committed
Fixes VSTS Bug 807760: Accessibility: Checkout Repository: Voice Over
was not reading the labels of the form controls(text boxes, drop-down) in the dialog https://devdiv.visualstudio.com/DevDiv/_workitems/edit/807760
1 parent 3d42df3 commit 89fa670

File tree

2 files changed

+46
-3
lines changed

2 files changed

+46
-3
lines changed

main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Dialogs/SelectRepositoryDialog.cs

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
using MonoDevelop.Ide;
88
using MonoDevelop.Components;
99
using System.Collections.Generic;
10+
using MonoDevelop.Components.AtkCocoaHelper;
1011

1112
namespace MonoDevelop.VersionControl.Dialogs
1213
{
@@ -78,8 +79,20 @@ public SelectRepositoryDialog (SelectRepositoryMode mode)
7879
}
7980

8081
repoContainer.SetFlag (WidgetFlags.NoWindow);
82+
SetupAccessibility ();
8183
}
82-
84+
85+
void SetupAccessibility ()
86+
{
87+
repCombo.SetCommonAccessibilityAttributes ("SelectRepositoryDialog.repCombo", "",
88+
GettextCatalog.GetString ("Select the repository type"));
89+
repCombo.SetAccessibilityLabelRelationship (label3);
90+
91+
entryFolder.SetCommonAccessibilityAttributes ("SelectRepositoryDialog.entryFolder", "",
92+
GettextCatalog.GetString ("Enter the target directory"));
93+
entryFolder.SetAccessibilityLabelRelationship (labelTargetDir);
94+
}
95+
8396
public Repository Repository {
8497
get {
8598
if (notebook.Page == 0)

main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/UrlBasedRepositoryEditor.cs

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
using System.Collections.Generic;
44
using System.Linq;
55
using MonoDevelop.Components;
6+
using MonoDevelop.Components.AtkCocoaHelper;
67
using MonoDevelop.Core;
78

89
namespace MonoDevelop.VersionControl
@@ -35,12 +36,41 @@ public UrlBasedRepositoryEditor (UrlBasedRepository repo)
3536
Fill ();
3637
UpdateControls ();
3738
updating = false;
39+
SetupAccessibility ();
3840
}
39-
41+
4042
Control IRepositoryEditor.Widget {
4143
get { return this; }
4244
}
43-
45+
46+
void SetupAccessibility ()
47+
{
48+
repositoryUrlEntry.SetCommonAccessibilityAttributes ("UrlBasedRepositoryEditor.repositoryUrlEntry", "",
49+
GettextCatalog.GetString ("Enter the repository url"));
50+
repositoryUrlEntry.SetAccessibilityLabelRelationship (label4);
51+
52+
repositoryUrlEntry.SetCommonAccessibilityAttributes ("UrlBasedRepositoryEditor.comboProtocol", "",
53+
GettextCatalog.GetString ("Enter the protocol to use"));
54+
comboProtocol.SetAccessibilityLabelRelationship (label5);
55+
56+
repositoryServerEntry.SetCommonAccessibilityAttributes ("UrlBasedRepositoryEditor.repositoryServerEntry", "",
57+
GettextCatalog.GetString ("Enter the server"));
58+
repositoryServerEntry.SetAccessibilityLabelRelationship (label11);
59+
60+
repositoryPortSpin.SetCommonAccessibilityAttributes ("UrlBasedRepositoryEditor.repositoryPortSpin", "",
61+
GettextCatalog.GetString ("Enter the port"));
62+
repositoryPortSpin.SetAccessibilityLabelRelationship (label6);
63+
64+
repositoryPathEntry.SetCommonAccessibilityAttributes ("UrlBasedRepositoryEditor.repositoryPathEntry", "",
65+
GettextCatalog.GetString ("Enter the path"));
66+
repositoryPathEntry.SetAccessibilityLabelRelationship (label7);
67+
68+
repositoryUserEntry.SetCommonAccessibilityAttributes ("UrlBasedRepositoryEditor.repositoryUserEntry", "",
69+
GettextCatalog.GetString ("Enter the user"));
70+
repositoryUserEntry.SetAccessibilityLabelRelationship (label8);
71+
}
72+
73+
4474
public bool Validate ()
4575
{
4676
if (!repo.IsUrlValid (repositoryUrlEntry.Text) || !CanCreateUri ()) {

0 commit comments

Comments
 (0)