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:
authorMatt Ward <matt.ward@microsoft.com>2019-01-17 13:26:25 +0300
committerMatt Ward <matt.ward@microsoft.com>2019-01-17 13:26:25 +0300
commitc33fc7e5d8cd1b31ff75d0081efab12a3bc79c8c (patch)
tree2b62c3e28a4dcfbaffc2f060cab8b63510603c86 /main/src/addins/MonoDevelop.Packaging
parent5dc09adb15264be888cfc5468dc5cf8820d95308 (diff)
[Packaging] Fix voice over not reading warning label in project options
In project options - NuGet Package - Build the check box to enable creation of a NuGet package at build time will show a warning label if there is no associated package metadata defined for the project. This warning label was not being read by voice over when the check box is selected. Now the accessibility text is updated and includes the warning text if it is applies so this is now read by voice over when the check box is selected. Fixes VSTS #753475 - Accessibility: Voice Over is not reading the alert text revealed after the "Create a NuGet Package" checkbox is checked.
Diffstat (limited to 'main/src/addins/MonoDevelop.Packaging')
-rw-r--r--main/src/addins/MonoDevelop.Packaging/MonoDevelop.Packaging.Gui/GtkProjectNuGetBuildOptionsPanelWidget.cs19
1 files changed, 14 insertions, 5 deletions
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 3645bd12ac..38468f2f14 100644
--- a/main/src/addins/MonoDevelop.Packaging/MonoDevelop.Packaging.Gui/GtkProjectNuGetBuildOptionsPanelWidget.cs
+++ b/main/src/addins/MonoDevelop.Packaging/MonoDevelop.Packaging.Gui/GtkProjectNuGetBuildOptionsPanelWidget.cs
@@ -44,9 +44,13 @@ namespace MonoDevelop.Packaging.Gui
SetupAccessibility ();
}
- void SetupAccessibility ()
+ void SetupAccessibility (bool includeMissingMetadataLabelText = false)
{
- packOnBuildButton.SetCommonAccessibilityAttributes ("NugetBuildOptionsPanel.PackOnBuild", "",
+ string accessibilityLabel = packOnBuildButton.Label;
+ if (includeMissingMetadataLabelText) {
+ accessibilityLabel += " " + missingMetadataLabel.Text;
+ }
+ packOnBuildButton.SetCommonAccessibilityAttributes ("NugetBuildOptionsPanel.PackOnBuild", accessibilityLabel,
GettextCatalog.GetString ("Check to create a NuGet package when building"));
}
@@ -73,10 +77,15 @@ namespace MonoDevelop.Packaging.Gui
void UpdateMissingMetadataLabelVisibility ()
{
- if (packOnBuildButton.Active) {
- missingMetadataLabel.Visible = !ProjectHasMetadata;
+ bool visible = packOnBuildButton.Active && !ProjectHasMetadata;
+ missingMetadataLabel.Visible = visible;
+
+ // Refresh accessibility information so missing metadata label text is available to Voice Over
+ // when the check box is selected.
+ if (visible) {
+ SetupAccessibility (includeMissingMetadataLabelText: true);
} else {
- missingMetadataLabel.Visible = false;
+ SetupAccessibility ();
}
}