@@ -61,6 +61,7 @@ internal partial class ManagePackagesDialog : ExtendedTitleBarDialog
61
61
Label errorMessageLabel ;
62
62
Label loadingSpinnerLabel ;
63
63
FrameBox noPackagesFoundFrame ;
64
+ Label noPackagesFoundLabel ;
64
65
ComboBox packageVersionComboBox ;
65
66
HBox packageVersionsHBox ;
66
67
Label packageVersionsLabel ;
@@ -94,9 +95,19 @@ void Build ()
94
95
var topHBox = new HBox ( ) ;
95
96
topHBox . Margin = new WidgetSpacing ( 8 , 5 , 6 , 5 ) ;
96
97
98
+ // HACK: VoiceOver does not work when using Accessible.Label so workaround this by using
99
+ // Accessible.LabelWidget and hide the label since we do not need it.
100
+ var packageSourceLabel = new Label ( ) ;
101
+ packageSourceLabel . Text = GettextCatalog . GetString ( "Package source" ) ;
102
+ packageSourceLabel . Visible = false ;
103
+ topHBox . PackStart ( packageSourceLabel ) ;
104
+
97
105
packageSourceComboBox = new ComboBox ( ) ;
98
106
packageSourceComboBox . Name = "packageSourceComboBox" ;
99
107
packageSourceComboBox . MinWidth = 200 ;
108
+ // Does not work:
109
+ //packageSourceComboBox.Accessible.Label = GettextCatalog.GetString ("Package source");
110
+ packageSourceComboBox . Accessible . LabelWidget = packageSourceLabel ;
100
111
topHBox . PackStart ( packageSourceComboBox ) ;
101
112
102
113
int tabLabelMinWidth = 60 ;
@@ -137,6 +148,7 @@ void Build ()
137
148
packageSearchEntry = new SearchTextEntry ( ) ;
138
149
packageSearchEntry . Name = "managePackagesDialogSearchEntry" ;
139
150
packageSearchEntry . WidthRequest = 187 ;
151
+ packageSearchEntry . PlaceholderText = GettextCatalog . GetString ( "Search" ) ;
140
152
packageSearchEntry . Accessible . Label = GettextCatalog . GetString ( "Package Search" ) ;
141
153
topHBox . PackEnd ( packageSearchEntry ) ;
142
154
@@ -179,6 +191,7 @@ void Build ()
179
191
packagesListView = new ListView ( ) ;
180
192
packagesListView . BorderVisible = false ;
181
193
packagesListView . HeadersVisible = false ;
194
+ packagesListView . Accessible . Label = GettextCatalog . GetString ( "Packages" ) ;
182
195
packagesListVBox . PackStart ( packagesListView , true , true ) ;
183
196
184
197
// Loading spinner.
@@ -204,7 +217,7 @@ void Build ()
204
217
var noPackagesFoundHBox = new HBox ( ) ;
205
218
noPackagesFoundHBox . HorizontalPlacement = WidgetPlacement . Center ;
206
219
207
- var noPackagesFoundLabel = new Label ( ) ;
220
+ noPackagesFoundLabel = new Label ( ) ;
208
221
noPackagesFoundLabel . Text = GettextCatalog . GetString ( "No matching packages found." ) ;
209
222
noPackagesFoundHBox . PackEnd ( noPackagesFoundLabel ) ;
210
223
@@ -273,17 +286,19 @@ void Build ()
273
286
274
287
var packageIdLabel = new Label ( ) ;
275
288
packageIdLabel . Font = packageInfoBoldFont ;
276
- packageIdLabel . Text = GettextCatalog . GetString ( "Id " ) ;
289
+ packageIdLabel . Text = GettextCatalog . GetString ( "ID " ) ;
277
290
packageIdHBox . PackStart ( packageIdLabel ) ;
278
291
279
292
packageId = new Label ( ) ;
280
293
packageId . Ellipsize = EllipsizeMode . End ;
281
294
packageId . TextAlignment = Alignment . End ;
282
295
packageId . Font = packageInfoSmallFont ;
296
+ packageId . Accessible . LabelWidget = packageIdLabel ;
283
297
packageIdLink = new LinkLabel ( ) ;
284
298
packageIdLink . Ellipsize = EllipsizeMode . End ;
285
299
packageIdLink . TextAlignment = Alignment . End ;
286
300
packageIdLink . Font = packageInfoSmallFont ;
301
+ packageIdLink . Accessible . LabelWidget = packageIdLabel ;
287
302
packageIdHBox . PackEnd ( packageIdLink , true ) ;
288
303
packageIdHBox . PackEnd ( packageId , true ) ;
289
304
@@ -300,6 +315,7 @@ void Build ()
300
315
packageAuthor . TextAlignment = Alignment . End ;
301
316
packageAuthor . Ellipsize = EllipsizeMode . End ;
302
317
packageAuthor . Font = packageInfoSmallFont ;
318
+ packageAuthor . Accessible . LabelWidget = packageAuthorLabel ;
303
319
packageAuthorHBox . PackEnd ( packageAuthor , true ) ;
304
320
305
321
// Package published
@@ -313,6 +329,7 @@ void Build ()
313
329
314
330
packagePublishedDate = new Label ( ) ;
315
331
packagePublishedDate . Font = packageInfoSmallFont ;
332
+ packagePublishedDate . Accessible . LabelWidget = packagePublishedLabel ;
316
333
packagePublishedHBox . PackEnd ( packagePublishedDate ) ;
317
334
318
335
// Package downloads
@@ -326,6 +343,7 @@ void Build ()
326
343
327
344
packageDownloads = new Label ( ) ;
328
345
packageDownloads . Font = packageInfoSmallFont ;
346
+ packageDownloads . Accessible . LabelWidget = packageDownloadsLabel ;
329
347
packageDownloadsHBox . PackEnd ( packageDownloads ) ;
330
348
331
349
// Package license.
@@ -354,6 +372,7 @@ void Build ()
354
372
packageProjectPageLink = new LinkLabel ( ) ;
355
373
packageProjectPageLink . Text = GettextCatalog . GetString ( "Visit Page" ) ;
356
374
packageProjectPageLink . Font = packageInfoSmallFont ;
375
+ packageProjectPageLink . Accessible . Label = GettextCatalog . GetString ( "Visit Project Page" ) ;
357
376
packageProjectPageHBox . PackEnd ( packageProjectPageLink ) ;
358
377
359
378
// Package dependencies
@@ -368,6 +387,7 @@ void Build ()
368
387
packageDependenciesNoneLabel = new Label ( ) ;
369
388
packageDependenciesNoneLabel . Text = GettextCatalog . GetString ( "None" ) ;
370
389
packageDependenciesNoneLabel . Font = packageInfoSmallFont ;
390
+ packageDependenciesNoneLabel . Accessible . LabelWidget = packageDependenciesLabel ;
371
391
packageDependenciesHBox . PackEnd ( packageDependenciesNoneLabel ) ;
372
392
373
393
// Package dependencies list.
@@ -379,6 +399,7 @@ void Build ()
379
399
packageDependenciesList . Wrap = WrapMode . WordAndCharacter ;
380
400
packageDependenciesList . Margin = new WidgetSpacing ( 5 ) ;
381
401
packageDependenciesList . Font = packageInfoSmallFont ;
402
+ packageDependenciesList . Accessible . LabelWidget = packageDependenciesLabel ;
382
403
packageDependenciesListHBox . PackStart ( packageDependenciesList , true ) ;
383
404
384
405
// Current package version.
@@ -400,11 +421,13 @@ void Build ()
400
421
401
422
currentPackageVersion = new Label ( ) ;
402
423
currentPackageVersion . Font = packageInfoSmallFont ;
424
+ currentPackageVersion . Accessible . LabelWidget = currentPackageVersionLabel ;
403
425
currentPackageVersionWithInfoPopoverHBox . PackStart ( currentPackageVersion ) ;
404
426
405
427
currentPackageVersionInfoPopoverWidget = new InformationPopoverWidget ( ) ;
406
428
currentPackageVersionInfoPopoverWidget . Severity = Ide . Tasks . TaskSeverity . Information ;
407
429
currentPackageVersionInfoPopoverWidget . Margin = new WidgetSpacing ( 5 , 0 , 0 , 2 ) ;
430
+ currentPackageVersionInfoPopoverWidget . Accessible . LabelWidget = currentPackageVersionLabel ;
408
431
currentPackageVersionWithInfoPopoverHBox . PackStart ( currentPackageVersionInfoPopoverWidget ) ;
409
432
410
433
currentPackageVersionHBox . PackStart ( currentPackageVersionWithInfoPopoverHBox ) ;
@@ -422,6 +445,7 @@ void Build ()
422
445
423
446
packageVersionComboBox = new ComboBox ( ) ;
424
447
packageVersionComboBox . Name = "packageVersionComboBox" ;
448
+ packageVersionComboBox . Accessible . LabelWidget = packageVersionsLabel ;
425
449
packageVersionsHBox . Spacing = 15 ;
426
450
packageVersionsHBox . PackStart ( packageVersionComboBox , true , true ) ;
427
451
0 commit comments