.NET #MAUI has an ever-improving set of tools to help build apps that are accessible to as many people as possible.
However, I recently needed to add some accessibility-related features to one of my apps, only to find that there wasn't an easy way to do this. So, I made one.
Specifically, I created a library that means that it's possible to see if the device (Windows, Android, iOS, or Mac) that the app is running on has been configured to use reduced motion or to show text at a different size.
It means that I can easily make it so that my app doesn't show animations when a person has requested that the OS (& apps running on it) don't show motion.
Also, while the built-in MAUI text controls automatically account for OS-level text sizing, if I need to draw text myself (e.g. to add to an image), I can do this in a way that respects the needs and requests of the person using the app.
As these are both accessibility-related features, I called the library Plugin.Maui.Accessibility.
The library is available on NuGet, and the source is on GitHub.
It's an almost embarrassingly simple API exposed by the library. It just has two properties. One lets you know if the device is configured to use reduced motion. The other tells you the factor by which to scale any text.
The library is based on the great work that Gerald Versluis did with Plugin.Maui.Feature.
Originally posted on LinkedIn (Note. I currently accept all connection requests there)
0 comments:
Post a Comment
I get a lot of comment spam :( - moderation may take a while.