Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoriain holmes <iain@xamarin.com>2017-05-05 14:38:17 +0300
committeriain holmes <iain@xamarin.com>2017-05-15 13:17:41 +0300
commit24f6b2f64aa391cae29f656b867ebc3a981e62db (patch)
treec7dd1cdfbdd2b42d67e77d4f77f2afdec3b381d5 /main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels
parent6fcac94d6ee2424be5f61a36936a005447b5edd3 (diff)
[A11y] Make the project options panels accessible
Adds label and help to most of the project options panels in the main repo. Panels using Xwt can't be made accessible yet. Partially fixes #53537
Diffstat (limited to 'main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels')
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/BaseDirectoryPanelWidget.cs11
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/CommonAssemblySigningPreferences.cs19
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/CustomCommandWidget.cs25
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/GeneralProjectOptions.cs38
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/NamespaceSynchronisationPanel.cs20
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/OutputOptionsPanel.cs16
6 files changed, 125 insertions, 4 deletions
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/BaseDirectoryPanelWidget.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/BaseDirectoryPanelWidget.cs
index 520fc66781..0094dea3de 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/BaseDirectoryPanelWidget.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/BaseDirectoryPanelWidget.cs
@@ -1,4 +1,4 @@
-// BaseDirectoryPanel.cs
+// BaseDirectoryPanel.cs
//
// Author:
// Lluis Sanchez Gual <lluis@novell.com>
@@ -27,6 +27,9 @@
using System;
+using MonoDevelop.Components.AtkCocoaHelper;
+using MonoDevelop.Core;
+
namespace MonoDevelop.Ide.Projects.OptionPanels
{
@@ -38,6 +41,12 @@ namespace MonoDevelop.Ide.Projects.OptionPanels
public BaseDirectoryPanelWidget()
{
this.Build();
+ var a = folderentry.EntryAccessible;
+ a.SetTitleUIElement (label3.Accessible);
+ label3.Accessible.SetTitleFor (a);
+ folderentry.SetEntryAccessibilityAttributes ("BaseDirectory.FolderEntry",
+ GettextCatalog.GetString ("Root Directory"),
+ GettextCatalog.GetString ("Entry the root directory for the project"));
}
public string BaseDirectory {
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/CommonAssemblySigningPreferences.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/CommonAssemblySigningPreferences.cs
index c0a509bfc6..60ed5f2b2f 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/CommonAssemblySigningPreferences.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/CommonAssemblySigningPreferences.cs
@@ -29,6 +29,7 @@
using System;
using System.Collections.Generic;
using MonoDevelop.Components;
+using MonoDevelop.Components.AtkCocoaHelper;
using MonoDevelop.Ide.Gui.Dialogs;
using MonoDevelop.Projects;
using MonoDevelop.Core;
@@ -43,8 +44,24 @@ namespace MonoDevelop.Ide.Projects.OptionPanels
public CommonAssemblySigningPreferences ()
{
this.Build();
+
+ SetupAccessibility ();
}
-
+
+ void SetupAccessibility ()
+ {
+ signAssemblyCheckbutton.SetCommonAccessibilityAttributes ("SigningOptions.Sign", null,
+ GettextCatalog.GetString ("Check to enable assembly signing"));
+ strongNameFileEntry.EntryAccessible.Name = "SigningOptions.NameFile";
+ strongNameFileEntry.EntryAccessible.SetLabel (GettextCatalog.GetString ("Strong Name File"));
+ strongNameFileEntry.EntryAccessible.Description = GettextCatalog.GetString ("Enter the Strong Name File");
+ strongNameFileEntry.EntryAccessible.SetTitleUIElement (strongNameFileLabel.Accessible);
+ strongNameFileLabel.Accessible.SetTitleFor (strongNameFileEntry.EntryAccessible);
+
+ delaySignCheckbutton.SetCommonAccessibilityAttributes ("SigningOptions.Delay", null,
+ GettextCatalog.GetString ("Delay signing the assembly"));
+ }
+
public void LoadPanelContents (Project project, ItemConfiguration[] configurations)
{
this.configurations = configurations;
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/CustomCommandWidget.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/CustomCommandWidget.cs
index f016c28e3e..3abd9f6f20 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/CustomCommandWidget.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/CustomCommandWidget.cs
@@ -97,8 +97,31 @@ namespace MonoDevelop.Ide.Projects.OptionPanels
tagSelectorCommand.ButtonAccessible.SetCommonAttributes ("CustomCommand.TagSelector",
GettextCatalog.GetString ("Tag Selector"),
GettextCatalog.GetString ("Insert a custom tag into the command entry"));
+
+ SetupAccessibility ();
}
-
+
+ void SetupAccessibility ()
+ {
+ comboType.SetCommonAccessibilityAttributes ("CustomCommands.OperationType",
+ GettextCatalog.GetString ("Select a project operation"),
+ GettextCatalog.GetString ("Select the type of project operation to add a custom command for"));
+ buttonRemove.SetCommonAccessibilityAttributes ("CustomCommands.Remove", null, GettextCatalog.GetString ("Click to remove this custom command"));
+
+ entryCommand.SetCommonAccessibilityAttributes ("CustomCommand.CommandEntry", GettextCatalog.GetString ("Command"),
+ GettextCatalog.GetString ("Enter the custom command"));
+ entryCommand.SetAccessibilityLabelRelationship (label3);
+ buttonBrowse.SetCommonAccessibilityAttributes ("CustomCommand.CommandBrowse", "", GettextCatalog.GetString ("Use a file selector to select a custom command"));
+
+ entryName.SetCommonAccessibilityAttributes ("CustomCommands.WorkingDirectory",
+ GettextCatalog.GetString ("Working Directory"),
+ GettextCatalog.GetString ("Enter the directory for the command to execute in"));
+ entryName.SetAccessibilityLabelRelationship (label1);
+
+ checkExternalCons.SetCommonAccessibilityAttributes ("CustomCommands.RunOnExtConsole", null, GettextCatalog.GetString ("Check for the command to run on an external console"));
+ checkPauseCons.SetCommonAccessibilityAttributes ("CustomCommands.Pause", null, GettextCatalog.GetString ("Check to pause the console output"));
+ }
+
public CustomCommand CustomCommand {
get { return cmd; }
}
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/GeneralProjectOptions.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/GeneralProjectOptions.cs
index c50c616ec6..c3eccb5a71 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/GeneralProjectOptions.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/GeneralProjectOptions.cs
@@ -27,8 +27,10 @@ using System;
using MonoDevelop.Ide.Gui.Dialogs;
using MonoDevelop.Components;
+using MonoDevelop.Components.AtkCocoaHelper;
using MonoDevelop.Projects;
using MonoDevelop.Projects.SharedAssetsProjects;
+using MonoDevelop.Core;
namespace MonoDevelop.Ide.Projects.OptionPanels
{
@@ -78,6 +80,42 @@ namespace MonoDevelop.Ide.Projects.OptionPanels
entryVersion.Text = project.Version;
checkSolutionVersion.Active = project.SyncVersionWithSolution;
entryVersion.Sensitive = !project.SyncVersionWithSolution;
+
+ SetAccessibilityAttributes ();
+ }
+
+ void SetAccessibilityAttributes ()
+ {
+ informationHeaderLabel.Accessible.SetTitleFor (table11.Accessible);
+ table11.Accessible.SetTitleUIElement (informationHeaderLabel.Accessible);
+
+ projectNameEntry.Accessible.SetTitleUIElement (nameLabel.Accessible);
+ projectNameEntry.SetCommonAccessibilityAttributes ("GeneralProjectOptions.ProjectNameEntry",
+ GettextCatalog.GetString ("Project Name"),
+ GettextCatalog.GetString ("Enter the project name"));
+ nameLabel.Accessible.SetTitleFor (projectNameEntry.Accessible);
+
+ entryVersion.Accessible.SetTitleUIElement (label1.Accessible);
+ entryVersion.SetCommonAccessibilityAttributes ("GeneralProjectOptions.VersionEntry",
+ GettextCatalog.GetString ("Project Version"),
+ GettextCatalog.GetString ("Enter the project version"));
+ label1.Accessible.SetTitleFor (entryVersion.Accessible);
+
+ checkSolutionVersion.SetCommonAccessibilityAttributes ("GeneralProjectOptions.SolutionVersion", null,
+ GettextCatalog.GetString ("Check to use the same version as the solution"));
+
+ projectDescriptionTextView.Accessible.SetTitleUIElement (descriptionLabel.Accessible);
+ descriptionLabel.Accessible.SetTitleFor (projectDescriptionTextView.Accessible);
+
+ projectDescriptionTextView.SetCommonAccessibilityAttributes ("GeneralProjectOptions.Description",
+ GettextCatalog.GetString ("Project Description"),
+ GettextCatalog.GetString ("Enter a description of the project"));
+
+ projectDefaultNamespaceEntry.Accessible.SetTitleUIElement (defaultNamespaceLabel.Accessible);
+ projectDefaultNamespaceEntry.SetCommonAccessibilityAttributes ("GeneralProjectOptions.Namespace",
+ GettextCatalog.GetString ("Default Namespace"),
+ GettextCatalog.GetString ("Enter the default namespace for the project"));
+ defaultNamespaceLabel.Accessible.SetTitleFor (projectDescriptionTextView.Accessible);
}
public void Store ()
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/NamespaceSynchronisationPanel.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/NamespaceSynchronisationPanel.cs
index 1b64831c41..61e9f62a85 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/NamespaceSynchronisationPanel.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/NamespaceSynchronisationPanel.cs
@@ -34,6 +34,7 @@ using MonoDevelop.Projects.Policies;
using MonoDevelop.Ide.Gui.Dialogs;
using System.Linq;
using MonoDevelop.Components;
+using MonoDevelop.Components.AtkCocoaHelper;
namespace MonoDevelop.Ide.Projects.OptionPanels
{
@@ -166,8 +167,25 @@ namespace MonoDevelop.Ide.Projects.OptionPanels
previewFrame.ShowAll ();
UpdatePreview (null, EventArgs.Empty);
+
+ SetupAccessibility ();
}
-
+
+ void SetupAccessibility ()
+ {
+ checkAssociateNamespacesDirectories.SetCommonAccessibilityAttributes ("NamespaceOptions.AssociateNamespace",
+ null,
+ GettextCatalog.GetString ("Check to associate namespaces with directory names"));
+ checkDefaultAsRoot.SetCommonAccessibilityAttributes ("NamespaceOptions.DefaultRoot", null,
+ GettextCatalog.GetString ("Check to use the default namespace as the root of all namespaces"));
+ radioFlat.SetCommonAccessibilityAttributes ("NamespaceOptions.Flat", null,
+ GettextCatalog.GetString ("Check to use a flat folder structure"));
+ radioHierarch.SetCommonAccessibilityAttributes ("NamespaceOptions.Hierarchy", null,
+ GettextCatalog.GetString ("Check to use a hierarchical folder structure"));
+ checkVSStyleResourceNames.SetCommonAccessibilityAttributes ("NamespaceOptions.VSNames", null,
+ GettextCatalog.GetString ("Check to use Visual Studio style resource names"));
+ }
+
public void LoadFrom (DotNetNamingPolicy policy)
{
checkAssociateNamespacesDirectories.Active = (policy.DirectoryNamespaceAssociation != DirectoryNamespaceAssociation.None);
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/OutputOptionsPanel.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/OutputOptionsPanel.cs
index c25deb35ef..afb3211a3f 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/OutputOptionsPanel.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/OutputOptionsPanel.cs
@@ -28,6 +28,7 @@ using System.Collections;
using System.Collections.Generic;
using Gtk;
using MonoDevelop.Components;
+using MonoDevelop.Components.AtkCocoaHelper;
using MonoDevelop.Core;
using MonoDevelop.Ide.Gui.Dialogs;
using MonoDevelop.Projects;
@@ -87,6 +88,21 @@ namespace MonoDevelop.Ide.Projects.OptionPanels
public OutputOptionsPanelWidget ()
{
Build ();
+
+ SetupAccessibility ();
+ }
+
+ void SetupAccessibility ()
+ {
+ assemblyNameEntry.SetCommonAccessibilityAttributes ("OutputOptionsPanel.AssemblyEntry",
+ GettextCatalog.GetString ("Assembly Name"),
+ GettextCatalog.GetString ("Enter the name of the output assembly"));
+ assemblyNameEntry.SetAccessibilityLabelRelationship (label98);
+ outputPathEntry.EntryAccessible.SetCommonAttributes ("OutputOptionsPanel.OutputEntry",
+ GettextCatalog.GetString ("Output Path"),
+ GettextCatalog.GetString ("Enter the output path"));
+ outputPathEntry.EntryAccessible.SetTitleUIElement (label99.Accessible);
+ label99.Accessible.SetTitleFor (outputPathEntry.EntryAccessible);
}
public void Load (Project project, ItemConfiguration[] configs)