-
Notifications
You must be signed in to change notification settings - Fork 55
Basic accessibility
ZieIony edited this page Apr 11, 2020
·
1 revision
Making views accessible means designing them in a way that all users can use them. This is important because each user becomes impaired in certain conditions. For example, in strong light, even people with very good eyesight can struggle to use an interface with not enough contrast. There's a couple of usual things you should consider:
- Contrast. Keeping enough contrast helps users with poor eyesight, and those using your app in bad lighting. Material Design guidelines specify minimal contrast for all kinds of colors.
- Size. Making items larger helps people with big fingers, motion impaired, using your app while moving, etc. Material Design guidelines specify minimal sizes for all kinds of views already. If you don't want to make clickable items look too big, use transparent, clickable areas to make items easier to click.
- Spacing. It's a very similar case to size. Adding some space between items makes it easier to click them without mistakes. Bigger screens usually require larger spacing values than phones.
- Position. This depends on the type of the device you're working with and doesn't apply that much to custom views but rather layouts and interactions. For example, users with larger phones usually can't reach all the screen when holding the phone with one hand. If you think that your app will be used mostly one-handed, you should consider moving key things to the bottom of the screen.
As you can see, the Material Design guidelines help quite a lot with accessibility. They contain all minimal values for brightness, contrast, size, and spacing to start with. These values come from designers working with real people with all types of impairments. There's also a lot of suggestions on how to make layouts and apps more accessible, but that's out of scope of custom views.