diff options
author | Matt Ward <matt.ward@microsoft.com> | 2019-11-26 14:12:31 +0300 |
---|---|---|
committer | monojenkins <jo.shields+jenkins@xamarin.com> | 2019-11-26 14:26:36 +0300 |
commit | e06664214f74dab6690f87f301eb835e2978b077 (patch) | |
tree | 245a5b6a0122dca251fdfb6dd3ec33880a91543c /main | |
parent | 3b9a09bc6eb9bd3c70873da7e00a2b0be157a92c (diff) |
[NuGet] Announce status messages using Voice Over
The status message that is displayed with the spinner is now
announced by Voice Over. When the status message is removed another
message is announced by Voice Over to say the loading has completed
or, if a search filter was entered, search was completed. If no
packages are found when searching this message is also announced
by Voice Over.
Fixes VSTS #1022830 - Accessibility: NuGet Packages: VoiceOver is
not announcing the status message.
Diffstat (limited to 'main')
2 files changed, 13 insertions, 1 deletions
diff --git a/main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement.Gui/ManagePackagesDialog.UI.cs b/main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement.Gui/ManagePackagesDialog.UI.cs index b2106e2e63..b2761fc54f 100644 --- a/main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement.Gui/ManagePackagesDialog.UI.cs +++ b/main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement.Gui/ManagePackagesDialog.UI.cs @@ -61,6 +61,7 @@ namespace MonoDevelop.PackageManagement Label errorMessageLabel; Label loadingSpinnerLabel; FrameBox noPackagesFoundFrame; + Label noPackagesFoundLabel; ComboBox packageVersionComboBox; HBox packageVersionsHBox; Label packageVersionsLabel; @@ -216,7 +217,7 @@ namespace MonoDevelop.PackageManagement var noPackagesFoundHBox = new HBox (); noPackagesFoundHBox.HorizontalPlacement = WidgetPlacement.Center; - var noPackagesFoundLabel = new Label (); + noPackagesFoundLabel = new Label (); noPackagesFoundLabel.Text = GettextCatalog.GetString ("No matching packages found."); noPackagesFoundHBox.PackEnd (noPackagesFoundLabel); diff --git a/main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement.Gui/ManagePackagesDialog.cs b/main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement.Gui/ManagePackagesDialog.cs index 983ac1b352..ac6f6b1641 100644 --- a/main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement.Gui/ManagePackagesDialog.cs +++ b/main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement.Gui/ManagePackagesDialog.cs @@ -27,6 +27,7 @@ using System; using System.Collections.Generic; using System.Linq; +using MonoDevelop.Components.AtkCocoaHelper; using MonoDevelop.Core; using MonoDevelop.Ide; using MonoDevelop.Projects; @@ -304,6 +305,8 @@ namespace MonoDevelop.PackageManagement if (!String.IsNullOrWhiteSpace (packageSearchEntry.Text)) { packagesListView.Visible = false; noPackagesFoundFrame.Visible = true; + + IdeApp.Workbench.RootWindow.Accessible.MakeAccessibilityAnnouncement (noPackagesFoundLabel.Text); } } @@ -553,6 +556,7 @@ namespace MonoDevelop.PackageManagement // Show spinner? } else if (viewModel.IsReadingPackages) { ClearPackages (); + IdeApp.Workbench.RootWindow.Accessible.MakeAccessibilityAnnouncement (loadingSpinnerLabel.Text); } else { HideLoadingMessage (); } @@ -607,6 +611,11 @@ namespace MonoDevelop.PackageManagement if (packagesListViewWasEmpty && (packageStore.RowCount > 0)) { packagesListView.SelectRow (0); + + string message = string.IsNullOrWhiteSpace (packageSearchEntry.Text) + ? GettextCatalog.GetString ("Packages loaded") + : GettextCatalog.GetString ("Search completed"); + IdeApp.Workbench.RootWindow.Accessible.MakeAccessibilityAnnouncement (message); } if (!viewModel.IsReadingPackages && (packageStore.RowCount == 0)) { @@ -886,6 +895,8 @@ namespace MonoDevelop.PackageManagement viewModel.SearchTerms = this.packageSearchEntry.Text; viewModel.Search (); + IdeApp.Workbench.RootWindow.Accessible.MakeAccessibilityAnnouncement (loadingSpinnerLabel.Text); + return false; } |