Howdy! 🙋♀️ Continuing with “☃️ Coding Winter 2021 – C # and .NET MAUI ❄️” initiative, today is #DayThirteen and we will be learning about Semantic Focus in .NET MAUI!
Microsoft developer team has been investigating even more into the best practices of accessibility, for this reason, they hold meetings with different developers of companies who work closely with good accessibility practices and have been bringing these improvements to .NET MAUI! I invite you to read this article and see what’s new . 💚💕
Let’s start!
❌ TabIndex and TabStop
Both TabIndex
and TabStop
are properties that help the developer control the order in which a screen reader reads each element of the user interface in Xamarin Forms. For .NET MAUI it’s recommended to work with a thoughtful design approach that will allow you to order the UI specifically how you would like it to be read, this helps us avoid programming alternatives that sometimes can alter performance to handle the screen reader flow. But if you still need to control the screen reader, with .NET we have SemanticOrderView from the community toolkit.
📣 SemanticExtensions class
The SetSemanticFocus
method allow you to move the focus of the screen reader to a specific element. Let’s see an example!
And then, add the action! 😎 In this case, let’s add it in a Click method.
🎯 SemanticScreenReader.Announce();
But we also have the Announce method in Essentials. Which is responsible to establish the text that will be taken into account by the Screenreader.
And done 😎 I hope this article has been super useful for you! ⭐️ Thanks for reading! 💚💕
Spanish post:
References:
3 thoughts on “Semantic focus with .NET MAUI”