diff options
author | Samantha Houts <samantha@teamredwall.com> | 2017-01-31 11:49:15 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-31 11:49:15 -0800 |
commit | ae59382c9046501edb37882ad1c065aacce60319 (patch) | |
tree | 3578ce8e0396a38aeb8323d4051f50a19a5340fb /Xamarin.Forms.Controls/CoreGallery.cs | |
parent | 23d228039acc504049f6a5153f5839d4c714930a (diff) | |
download | xamarin-forms-ae59382c9046501edb37882ad1c065aacce60319.tar.gz xamarin-forms-ae59382c9046501edb37882ad1c065aacce60319.tar.bz2 xamarin-forms-ae59382c9046501edb37882ad1c065aacce60319.zip |
[All] Basic Accessibility Support (#713)
* [Core] Add accessibility properties
* [Controls] Add accessibility gallery
* [iOS] Implement accessibility properties
* [Android] Implement accessibilty properties
* [Win] Implement accessibility properties
* [Win] Select ListView item on selected for a11y
* Update docs
* TODO: macOS accessibility
* [iOS] Fix failing UI Tests
Diffstat (limited to 'Xamarin.Forms.Controls/CoreGallery.cs')
-rw-r--r-- | Xamarin.Forms.Controls/CoreGallery.cs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Xamarin.Forms.Controls/CoreGallery.cs b/Xamarin.Forms.Controls/CoreGallery.cs index 83d8ec6c..924d4129 100644 --- a/Xamarin.Forms.Controls/CoreGallery.cs +++ b/Xamarin.Forms.Controls/CoreGallery.cs @@ -212,6 +212,7 @@ namespace Xamarin.Forms.Controls } }; #endif + SetValue(Accessibility.NameProperty, "SwapRoot"); } } @@ -235,9 +236,16 @@ namespace Xamarin.Forms.Controls public Func<Page> Realize { get; set; } public string Title { get; set; } + + public override string ToString() + { + // a11y: let Narrator read a friendly string instead of the default ToString() + return Title; + } } List<GalleryPageFactory> _pages = new List<GalleryPageFactory> { + new GalleryPageFactory(() => new AccessibilityGallery(), "Accessibility"), new GalleryPageFactory(() => new PlatformSpecificsGallery(), "Platform Specifics"), new GalleryPageFactory(() => new NativeBindingGalleryPage(), "Native Binding Controls Gallery"), new GalleryPageFactory(() => new XamlNativeViews(), "Xaml Native Views Gallery"), @@ -368,6 +376,8 @@ namespace Xamarin.Forms.Controls SelectedItem = null; }; + + SetValue(Accessibility.NameProperty, "Core Pages"); } NavigationBehavior navigationBehavior; |