Basic Accessibility Support: ToolbarItems

SamanthaHoutsSamanthaHouts USXamarin Team Xamurai
edited April 2017 in Xamarin.Forms

Summary

Building on https://forums.xamarin.com/discussion/85909/basic-accessibility-support, this would add VoiceOver/TalkBack/Narrator capability to ToolBarItems. Included in this change would be limited support for setting accessibility properties on the MasterDetailPage toggle button and the NavigationBar back button.

Proposed changes

ToolbarItems

  • [All] ToolbarItems with Text will already read the Text if no Accessibility.Name or .Hint are supplied. No change.
  • [iOS/UWP] Accessibility.Name will replace the Text that is read aloud on iOS and UWP. This is consistent with the platforms.
  • [Android] Accessibility.Name and/or Accessibility.Hint will completely replace the Text that is both visible and read aloud on Android. This is a limitation of API<26 and may be resolved later to be consistent with iOS and UWP.

MasterDetailPage Toggle Button

  • [iOS/UWP] Set Accessibility.Name and Accessibility.Hint on a MasterDetailPage to set the text that is read aloud on the toggle button. Setting these properties will have no effect on Android.
  • [Android] Add string resources to the Android project to set the text that is read aloud on the MasterDetailPage toggle button.
    <string name="mdp_open_a11y_name">Show Master Page</string>   <string name="mdp_close_a11y_name">Hide Master Page</string>

NavigationPage Back Button

  • [Android] Set Accessibility.Name and Accessibility.Hint on a Page to set the text that is read aloud on the Back arrow in the Action Bar. This will have no effect on OS back buttons.
  • [UWP] Not applicable.
  • [iOS] Not supported; will read the title of the page as usual.

See https://github.com/xamarin/Xamarin.Forms/pull/889 for proposed implementation.

Intended Use Case

A potential user of a Xamarin.Forms app with a visual disability should be able to navigate the application using the built in screen reading features of the native OS. Developers should be able to add correct names and hints that the screen reader understands without having to resort to external libraries.

Open · Last Updated

Sign In or Register to comment.