diff options
author | Sergey Shakhnazarov <v-seshak@microsoft.com> | 2019-10-11 15:40:08 +0300 |
---|---|---|
committer | Sergey Shakhnazarov <v-seshak@microsoft.com> | 2019-10-11 15:40:08 +0300 |
commit | 0893ad38d87373d65320f47c458d8bd46858ae0c (patch) | |
tree | 2fc6ce34b2d908c4084f9da88804096b54e81555 /Xwt.Gtk | |
parent | df28393f5a9a4c70a95417748c913c05d902010e (diff) |
[WPF][XamMac][GtkMac] A11y helper
* Allows to check whether accessibility means are in use (Narrator/3rd party tools on Windows, VoiceOver on macOS)
* Adds Accessible.MakeAnnouncement (string message, bool polite = false) method for making a custom announcement for user per request (uses LiveRegion on Windows and NSAccessibility.PostNotification on macOS)
WPF version requires target framework version .NET 4.7.2
Diffstat (limited to 'Xwt.Gtk')
-rw-r--r-- | Xwt.Gtk/Xwt.GtkBackend/AccessibleBackend.cs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Xwt.Gtk/Xwt.GtkBackend/AccessibleBackend.cs b/Xwt.Gtk/Xwt.GtkBackend/AccessibleBackend.cs index 771b1710..b69bf2ec 100644 --- a/Xwt.Gtk/Xwt.GtkBackend/AccessibleBackend.cs +++ b/Xwt.Gtk/Xwt.GtkBackend/AccessibleBackend.cs @@ -49,6 +49,12 @@ namespace Xwt.GtkBackend IAccessibleEventSink eventSink; ApplicationContext context; + public virtual event EventHandler AccessibilityInUseChanged; + protected virtual void OnAccessibilityInUseChanged (object sender, EventArgs eventArgs) + { + AccessibilityInUseChanged?.Invoke (sender, eventArgs); + } + public AccessibleBackend () { } @@ -199,6 +205,8 @@ namespace Xwt.GtkBackend } } + public virtual bool AccessibilityInUse => false; + public virtual void AddChild (object nativeChild) { // TODO @@ -227,5 +235,10 @@ namespace Xwt.GtkBackend public void EnableEvent (object eventId) { } + + public virtual void MakeAnnouncement (string message, bool polite = false) + { + // TODO + } } } |