Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
lawrence_shaun_introducing_net_maui_build_and_deploy_crosspl.pdf
Скачиваний:
46
Добавлен:
26.06.2023
Размер:
5.15 Mб
Скачать

Chapter 6 Creating Our Own Layout

•\

Look at how you can make use of .NET MAUI

 

functionality

•\

Consider other scenarios and how to support them

•\

Look over some testing options to support your journey

 

to building accessible applications

Source Code

The resulting source code for this chapter can be found on the GitHub repository at ­https://github.com/Apress/Introducing-MAUI/tree/ main/ch06.

Extra Assignment

You will have noticed how a lot of the naming includes the word Fixed. Let’s continue the extra assignment from the previous chapter and build a board that is a variation of this approach. I really like the idea of a freeform board where the user can position their widgets wherever they like. This is a little more involved but if you consider how the BoardLayout can use AbsoluteLayouts rather than Grids, then a new ILayoutManager implementation should hopefully be where the alternative logic will need to be applied. If you do embark on this journey, please feel free to share your experience and findings.

198

CHAPTER 7

Accessibility

In this chapter, you will be taking a break from adding new parts to the user interface in order to gain an understanding of what accessibility is, why you should make your applications accessible, and how .NET MAUI makes this easier. You will also cover some testing options to support your journey to building accessible applications.

I wanted this chapter to appear earlier on in this book. I feel it is such an important topic and one that you really do need to consider early on in your projects. It has come to settle nicely in the middle of the book now because you needed some UI to apply the concepts to.

What Is Accessibility?

The definition of accessibility according to the Cambridge Dictionary (https://dictionary.cambridge.org/dictionary/english/ accessibility) is

“the quality of being easy to understand.”

By considering the scenarios where your application might be less easy to understand for a large percentage of the world’s population that have some form of disability, you can learn to provide ways to break down the complexities in understanding the content. This might be through the use of assistive technologies such as voice-over assistants or screen readers, or even providing the ability to increase the font size to make the content easier to read.

© Shaun Lawrence 2023

199

S. Lawrence, Introducing .NET MAUI, https://doi.org/10.1007/978-1-4842-9234-1_7

 

Chapter 7 Accessibility

All of this can help you as a developer learn how to build applications that are much more inclusive of the entire population of the world.

Why Make Your Applications Accessible?

I heard an excellent quote recently and sadly I have been unable to discover the original author of the quote, but it is “if you don’t know whether your application is accessible, then you can safely say that is it not.”

Essentially, if you are not putting any effort into making it accessible, then you can almost guarantee that it is not.

According to the World Health Organization, globally at least 2.2 billion people have a near or distance vision impairment (www.who.int/news- room/fact-sheets/detail/blindness-and-visual-impairment).

You want to build your applications and make them as successful as possible. Imagine immediately ruling out up to 27% of your potential market purely based on not making your application more inclusive for that population.

What to Consider When Making Your Applications Accessible

There is a whole heap of things you can do in order to make your applications more inclusive. To aid you on your journey to building accessible applications, there is a fantastic set of guidelines known as the Web Content Accessibility Guidelines (WCAG). There are four main principles to consider:

•\ Perceivable: Making sure that you provide information that can be perceived by the user. This can be by providing text-based alternatives to images, suitable contrast ratios, adaptive text sizing, and much more.

200