diff options
author | iain holmes <iain@xamarin.com> | 2017-06-12 15:27:54 +0300 |
---|---|---|
committer | iain holmes <iain@xamarin.com> | 2017-06-12 16:54:38 +0300 |
commit | 47e0ef304210423d6699f6088259531d53a3c2fd (patch) | |
tree | 319d5ee86e8e946f822c414a480bfaadf27cac2c | |
parent | fcaeb092d370fa40966ea9887699e4828c403b21 (diff) |
[A11y] Add an identifer to the accessibility interface
-rw-r--r-- | Xwt.Gtk/Xwt.GtkBackend/AccessibleBackend.cs | 9 | ||||
-rw-r--r-- | Xwt.XamMac/Xwt.Mac/AccessibleBackend.cs | 9 | ||||
-rw-r--r-- | Xwt/Xwt.Accessibility/Accessible.cs | 11 | ||||
-rw-r--r-- | Xwt/Xwt.Accessibility/IAccessibleBackend.cs | 2 |
4 files changed, 31 insertions, 0 deletions
diff --git a/Xwt.Gtk/Xwt.GtkBackend/AccessibleBackend.cs b/Xwt.Gtk/Xwt.GtkBackend/AccessibleBackend.cs index 50e123c1..16b4c04e 100644 --- a/Xwt.Gtk/Xwt.GtkBackend/AccessibleBackend.cs +++ b/Xwt.Gtk/Xwt.GtkBackend/AccessibleBackend.cs @@ -97,6 +97,15 @@ namespace Xwt.GtkBackend public virtual string Label { get; set; } + public string Identifier { + get { + return widget.Accessible.Name; + } + set { + widget.Accessible.Name = value; + } + } + public Role Role { get { return widget.Accessible.Role.ToXwtRole (); diff --git a/Xwt.XamMac/Xwt.Mac/AccessibleBackend.cs b/Xwt.XamMac/Xwt.Mac/AccessibleBackend.cs index 8c862083..70ec0c02 100644 --- a/Xwt.XamMac/Xwt.Mac/AccessibleBackend.cs +++ b/Xwt.XamMac/Xwt.Mac/AccessibleBackend.cs @@ -73,6 +73,15 @@ namespace Xwt.Mac return res; } + string IAccessibleBackend.Identifier { + get { + return widget.AccessibilityIdentifier; + } + set { + widget.AccessibilityIdentifier = value; + } + } + string IAccessibleBackend.Label { get { return widget.AccessibilityLabel; diff --git a/Xwt/Xwt.Accessibility/Accessible.cs b/Xwt/Xwt.Accessibility/Accessible.cs index 8ac1fd37..b37414cb 100644 --- a/Xwt/Xwt.Accessibility/Accessible.cs +++ b/Xwt/Xwt.Accessibility/Accessible.cs @@ -102,6 +102,15 @@ namespace Xwt.Accessibility } } + public string Identifier { + get { + return Backend.Identifier; + } + set { + Backend.Identifier = value; + } + } + public string Label { get { return Backend.Label; @@ -191,6 +200,8 @@ namespace Xwt.Accessibility public string Description { get; set; } + public string Identifier { get; set; } + public string Label { get; set; } public Role Role { get; set; } diff --git a/Xwt/Xwt.Accessibility/IAccessibleBackend.cs b/Xwt/Xwt.Accessibility/IAccessibleBackend.cs index e277976e..e6068e33 100644 --- a/Xwt/Xwt.Accessibility/IAccessibleBackend.cs +++ b/Xwt/Xwt.Accessibility/IAccessibleBackend.cs @@ -36,6 +36,8 @@ namespace Xwt.Backends bool IsAccessible { get; set; } + string Identifier { get; set; } + string Label { get; set; } string Title { get; set; } |