Last active
August 29, 2015 14:02
-
-
Save jwill/6e10a96fb5cfde9dd3a3 to your computer and use it in GitHub Desktop.
t
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
That looks pretty sweet -- but what about users who can’t see your shiny new control? Accessibility is a key consideration when building apps, and particularly when creating new Views. | |
You can start by adding a contentDescription[draw] as you would for every other View in your layout. | |
But what about Views like our wind speed & direction gauge -- where the content isn’t static. Knowing you’re looking at a wind gauge isn’t very useful if we don’t know what what the speed and direction it’s displaying is. | |
Well within your control, send an accessibility event[draw] whenever the visual content has been modified. | |
Then override the dispatchPopulateAccessibilityEvent handler [draw] adding the current control’s visual value to the accessibiliy event | |
Add accessibility handlers to your View -- in XML, and within the View if appropriate, and click here when you’re done. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment