Skip to content

Commit 9ef875d

Browse files
committed
Announce the add-source validation message to screen readers
1 parent 7b2542c commit 9ef875d

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/UniGetUI.Avalonia/ViewModels/Pages/SettingsPages/SourceManagerCardViewModel.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
using System.Collections.Generic;
33
using System.Collections.ObjectModel;
44
using System.Threading.Tasks;
5+
using Avalonia.Automation;
56
using CommunityToolkit.Mvvm.ComponentModel;
67
using CommunityToolkit.Mvvm.Input;
78
using UniGetUI.Avalonia.Infrastructure;
@@ -159,6 +160,9 @@ private void DeleteSource(IManagerSource source)
159160
Sources.Remove(source);
160161
}
161162

163+
partial void OnAddErrorChanged(string value)
164+
=> AccessibilityAnnouncementService.Announce(value, AutomationLiveSetting.Assertive);
165+
162166
partial void OnNewSourceNameChanged(string value) => AddError = "";
163167

164168
partial void OnNewSourceUrlChanged(string value) => AddError = "";

0 commit comments

Comments
 (0)