diff options
author | iain holmes <iain@xamarin.com> | 2017-10-31 13:52:41 +0300 |
---|---|---|
committer | iain holmes <iain@xamarin.com> | 2018-03-16 19:48:12 +0300 |
commit | 9f0df0c821838ce09327121f7bc30165cc2f02cd (patch) | |
tree | a301bc8bb62f581cada6eaa2e91095e86dd5fc11 /Xwt | |
parent | fe71fe0dba8386ed25b9c7cc5deee63baea37cd1 (diff) |
[A11y] Allow native accessible children to be added to Xwt.Accessible
Sometimes widgets have subregions that need their own accessible object. This
change allows native accessible objects to be added to Xwt.Accessible objects
as children
Diffstat (limited to 'Xwt')
-rw-r--r-- | Xwt/Xwt.Accessibility/Accessible.cs | 22 | ||||
-rw-r--r-- | Xwt/Xwt.Accessibility/IAccessibleBackend.cs | 4 |
2 files changed, 26 insertions, 0 deletions
diff --git a/Xwt/Xwt.Accessibility/Accessible.cs b/Xwt/Xwt.Accessibility/Accessible.cs index 9ddb4799..a7b91899 100644 --- a/Xwt/Xwt.Accessibility/Accessible.cs +++ b/Xwt/Xwt.Accessibility/Accessible.cs @@ -183,6 +183,16 @@ namespace Xwt.Accessibility } } + public void AddChild (object nativeChild) + { + Backend.AddChild (nativeChild); + } + + public void RemoveChild (object nativeChild) + { + Backend.RemoveChild (nativeChild); + } + bool OnPress () { var args = new WidgetEventArgs (); @@ -225,6 +235,18 @@ namespace Xwt.Accessibility public bool IsAccessible { get; set; } + public void AddChild (object nativeChild) + { + } + + public void RemoveChild (object nativeChild) + { + } + + public void RemoveAllChildren () + { + } + public void DisableEvent (object eventId) { } diff --git a/Xwt/Xwt.Accessibility/IAccessibleBackend.cs b/Xwt/Xwt.Accessibility/IAccessibleBackend.cs index bd2a4b08..3d00f54d 100644 --- a/Xwt/Xwt.Accessibility/IAccessibleBackend.cs +++ b/Xwt/Xwt.Accessibility/IAccessibleBackend.cs @@ -53,6 +53,10 @@ namespace Xwt.Backends Role Role { get; set; } string RoleDescription { get; set; } + + void AddChild (object nativeChild); + void RemoveChild (object nativeChild); + void RemoveAllChildren (); } public interface IAccessibleEventSink |