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/addins/MonoDevelop.Packaging
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/addins/MonoDevelop.Packaging')
-rw-r--r--main/src/addins/MonoDevelop.Packaging/MonoDevelop.Packaging.Gui/GtkNuGetPackageMetadataOptionsPanelWidget.cs87
-rw-r--r--main/src/addins/MonoDevelop.Packaging/MonoDevelop.Packaging.Gui/GtkProjectNuGetBuildOptionsPanelWidget.cs10
2 files changed, 97 insertions, 0 deletions
diff --git a/main/src/addins/MonoDevelop.Packaging/MonoDevelop.Packaging.Gui/GtkNuGetPackageMetadataOptionsPanelWidget.cs b/main/src/addins/MonoDevelop.Packaging/MonoDevelop.Packaging.Gui/GtkNuGetPackageMetadataOptionsPanelWidget.cs
index 6ade8ad23e..0008cbeaf2 100644
--- a/main/src/addins/MonoDevelop.Packaging/MonoDevelop.Packaging.Gui/GtkNuGetPackageMetadataOptionsPanelWidget.cs
+++ b/main/src/addins/MonoDevelop.Packaging/MonoDevelop.Packaging.Gui/GtkNuGetPackageMetadataOptionsPanelWidget.cs
@@ -30,6 +30,8 @@ using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using Gtk;
+using MonoDevelop.Components.AtkCocoaHelper;
+using MonoDevelop.Core;
using MonoDevelop.Projects;
namespace MonoDevelop.Packaging.Gui
@@ -46,6 +48,91 @@ namespace MonoDevelop.Packaging.Gui
this.Build ();
PopulateLanguages ();
+
+ SetupAccessibility ();
+ }
+
+ void SetupAccessibility ()
+ {
+ packageIdTextBox.SetCommonAccessibilityAttributes ("NuGetMetadata.ID",
+ GettextCatalog.GetString ("ID"),
+ GettextCatalog.GetString ("Enter the ID of the NuGet package"));
+ packageIdTextBox.SetAccessibilityLabelRelationship (packageIdLabel);
+
+ packageVersionTextBox.SetCommonAccessibilityAttributes ("NuGetMetadata.Version",
+ GettextCatalog.GetString ("Version"),
+ GettextCatalog.GetString ("Enter the version of the NuGet package"));
+ packageVersionTextBox.SetAccessibilityLabelRelationship (packageVersionLabel);
+
+ packageAuthorsTextBox.SetCommonAccessibilityAttributes ("NuGetMetadata.Authors",
+ GettextCatalog.GetString ("Authors"),
+ GettextCatalog.GetString ("Enter the authors of the NuGet package"));
+ packageAuthorsTextBox.SetAccessibilityLabelRelationship (packageAuthorsLabel);
+
+ packageDescriptionTextView.SetCommonAccessibilityAttributes ("NuGetMetadata.Description",
+ GettextCatalog.GetString ("Description"),
+ GettextCatalog.GetString ("Enter the description of the NuGet package"));
+ packageDescriptionTextView.SetAccessibilityLabelRelationship (packageDescriptionLabel);
+
+ packageOwnersTextBox.SetCommonAccessibilityAttributes ("NuGetMetadata.Owners",
+ GettextCatalog.GetString ("Owners"),
+ GettextCatalog.GetString ("Enter the owners of the NuGet package"));
+ packageOwnersTextBox.SetAccessibilityLabelRelationship (packageOwnersLabel);
+
+ packageCopyrightTextBox.SetCommonAccessibilityAttributes ("NuGetMetadata.Copyright",
+ GettextCatalog.GetString ("Copyright"),
+ GettextCatalog.GetString ("Enter the copyright statement for the NuGet package"));
+ packageCopyrightTextBox.SetAccessibilityLabelRelationship (packageCopyrightLabel);
+
+ packageTitleTextBox.SetCommonAccessibilityAttributes ("NuGetMetadata.Title",
+ GettextCatalog.GetString ("Title"),
+ GettextCatalog.GetString ("Enter the title of the NuGet package"));
+ packageTitleTextBox.SetAccessibilityLabelRelationship (packageTitleLabel);
+
+ packageSummaryTextBox.SetCommonAccessibilityAttributes ("NuGetMetadata.Summary",
+ GettextCatalog.GetString ("Summary"),
+ GettextCatalog.GetString ("Enter the summary for the NuGet package"));
+ packageSummaryTextBox.SetAccessibilityLabelRelationship (packageSummaryLabel);
+
+ packageProjectUrlTextBox.SetCommonAccessibilityAttributes ("NuGetMetadata.URL",
+ GettextCatalog.GetString ("Project URL"),
+ GettextCatalog.GetString ("Enter the project URL for the NuGet package"));
+ packageProjectUrlTextBox.SetAccessibilityLabelRelationship (packageProjectUrlLabel);
+
+ packageIconUrlTextBox.SetCommonAccessibilityAttributes ("NuGetMetadata.Icon",
+ GettextCatalog.GetString ("Icon URL"),
+ GettextCatalog.GetString ("Enter the URL for the NuGet package's icon"));
+ packageIconUrlTextBox.SetAccessibilityLabelRelationship (packageIconUrlLabel);
+
+ packageLicenseUrlTextBox.SetCommonAccessibilityAttributes ("NuGetMetadata.licence",
+ GettextCatalog.GetString ("License URL"),
+ GettextCatalog.GetString ("Enter the URL for the NuGet package's license"));
+ packageLicenseUrlTextBox.SetAccessibilityLabelRelationship (packageLicenseUrlLabel);
+
+ packageRequireLicenseAcceptanceCheckBox.SetCommonAccessibilityAttributes ("NuGetMetadata.Acceptance",
+ GettextCatalog.GetString ("Require License Acceptance"),
+ GettextCatalog.GetString ("Check to require the user to accept the NuGet package's license"));
+ packageRequireLicenseAcceptanceCheckBox.SetAccessibilityLabelRelationship (packageRequireLicenseAcceptanceLabel);
+
+ packageDevelopmentDependencyCheckBox.SetCommonAccessibilityAttributes ("NuGetMetadata.Development",
+ GettextCatalog.GetString ("Development Dependency"),
+ GettextCatalog.GetString ("Check to indicate that this is a development dependency"));
+ packageDevelopmentDependencyCheckBox.SetAccessibilityLabelRelationship (packageDevelopmentDependencyLabel);
+
+ packageTagsTextBox.SetCommonAccessibilityAttributes ("NuGetMetadata.Tags",
+ GettextCatalog.GetString ("Tags"),
+ GettextCatalog.GetString ("Enter the tags for this NuGet package"));
+ packageTagsTextBox.SetAccessibilityLabelRelationship (packageTagsLabel);
+
+ packageLanguageComboBox.SetCommonAccessibilityAttributes ("NuGetMetadata.Language",
+ GettextCatalog.GetString ("Language"),
+ GettextCatalog.GetString ("Select the language for this NuGet package"));
+ packageLanguageComboBox.SetAccessibilityLabelRelationship (packageLanguageLabel);
+
+ packageReleaseNotesTextView.SetCommonAccessibilityAttributes ("NuGetMetadata.ReleaseNotes",
+ GettextCatalog.GetString ("Release Notes"),
+ GettextCatalog.GetString ("Enter the release notes for this NuGet package"));
+ packageReleaseNotesTextView.SetAccessibilityLabelRelationship (packageReleaseNotesLabel);
}
internal static System.Action<bool> OnProjectHasMetadataChanged;
diff --git a/main/src/addins/MonoDevelop.Packaging/MonoDevelop.Packaging.Gui/GtkProjectNuGetBuildOptionsPanelWidget.cs b/main/src/addins/MonoDevelop.Packaging/MonoDevelop.Packaging.Gui/GtkProjectNuGetBuildOptionsPanelWidget.cs
index 6e41b7485c..682eb24bb1 100644
--- a/main/src/addins/MonoDevelop.Packaging/MonoDevelop.Packaging.Gui/GtkProjectNuGetBuildOptionsPanelWidget.cs
+++ b/main/src/addins/MonoDevelop.Packaging/MonoDevelop.Packaging.Gui/GtkProjectNuGetBuildOptionsPanelWidget.cs
@@ -25,6 +25,8 @@
// THE SOFTWARE.
using System;
+using MonoDevelop.Components.AtkCocoaHelper;
+using MonoDevelop.Core;
namespace MonoDevelop.Packaging.Gui
{
@@ -38,6 +40,14 @@ namespace MonoDevelop.Packaging.Gui
UpdateMissingMetadataLabelVisibility ();
packOnBuildButton.Toggled += PackOnBuildButtonToggled;
GtkNuGetPackageMetadataOptionsPanelWidget.OnProjectHasMetadataChanged = OnProjectHasMetadataChanged;
+
+ SetupAccessibility ();
+ }
+
+ void SetupAccessibility ()
+ {
+ packOnBuildButton.SetCommonAccessibilityAttributes ("NugetBuildOptionsPanel.PackOnBuild", null,
+ GettextCatalog.GetString ("Check to create a NuGet package when building"));
}
public bool PackOnBuild {