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

Commit dbb128a

Browse files
committed
[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.
1 parent 193fbf1 commit dbb128a

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement.Gui/ManagePackagesDialog.UI.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ internal partial class ManagePackagesDialog : ExtendedTitleBarDialog
6161
Label errorMessageLabel;
6262
Label loadingSpinnerLabel;
6363
FrameBox noPackagesFoundFrame;
64+
Label noPackagesFoundLabel;
6465
ComboBox packageVersionComboBox;
6566
HBox packageVersionsHBox;
6667
Label packageVersionsLabel;
@@ -216,7 +217,7 @@ void Build ()
216217
var noPackagesFoundHBox = new HBox ();
217218
noPackagesFoundHBox.HorizontalPlacement = WidgetPlacement.Center;
218219

219-
var noPackagesFoundLabel = new Label ();
220+
noPackagesFoundLabel = new Label ();
220221
noPackagesFoundLabel.Text = GettextCatalog.GetString ("No matching packages found.");
221222
noPackagesFoundHBox.PackEnd (noPackagesFoundLabel);
222223

main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement.Gui/ManagePackagesDialog.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
using System;
2828
using System.Collections.Generic;
2929
using System.Linq;
30+
using MonoDevelop.Components.AtkCocoaHelper;
3031
using MonoDevelop.Core;
3132
using MonoDevelop.Ide;
3233
using MonoDevelop.Projects;
@@ -304,6 +305,8 @@ void ShowNoPackagesFoundMessage ()
304305
if (!String.IsNullOrWhiteSpace (packageSearchEntry.Text)) {
305306
packagesListView.Visible = false;
306307
noPackagesFoundFrame.Visible = true;
308+
309+
IdeApp.Workbench.RootWindow.Accessible.MakeAccessibilityAnnouncement (noPackagesFoundLabel.Text);
307310
}
308311
}
309312

@@ -553,6 +556,7 @@ void ShowPackages ()
553556
// Show spinner?
554557
} else if (viewModel.IsReadingPackages) {
555558
ClearPackages ();
559+
IdeApp.Workbench.RootWindow.Accessible.MakeAccessibilityAnnouncement (loadingSpinnerLabel.Text);
556560
} else {
557561
HideLoadingMessage ();
558562
}
@@ -607,6 +611,11 @@ void AppendPackagesToListView ()
607611

608612
if (packagesListViewWasEmpty && (packageStore.RowCount > 0)) {
609613
packagesListView.SelectRow (0);
614+
615+
string message = string.IsNullOrWhiteSpace (packageSearchEntry.Text)
616+
? GettextCatalog.GetString ("Packages loaded")
617+
: GettextCatalog.GetString ("Search completed");
618+
IdeApp.Workbench.RootWindow.Accessible.MakeAccessibilityAnnouncement (message);
610619
}
611620

612621
if (!viewModel.IsReadingPackages && (packageStore.RowCount == 0)) {
@@ -886,6 +895,8 @@ bool Search ()
886895
viewModel.SearchTerms = this.packageSearchEntry.Text;
887896
viewModel.Search ();
888897

898+
IdeApp.Workbench.RootWindow.Accessible.MakeAccessibilityAnnouncement (loadingSpinnerLabel.Text);
899+
889900
return false;
890901
}
891902

0 commit comments

Comments
 (0)