Semantic properties add accessibility metadata to a .NET MAUI interface. They give assistive technologies, including screen readers, meaning that sighted users may otherwise get from visual cues such as size, hierarchy, color, or a success icon. A screen reader can therefore announce not only a label’s text but also its place in the heading hierarchy. section 2.3 section 3.2
Use semantic properties alongside visual design rather than treating appearance as the only signal. Color and contrast can improve readability, but a red error label or green success tick alone may not communicate its purpose to every user. Descriptive metadata provides another way for people to understand and use a control. section 3.2
Add metadata where a control’s visible presentation does not fully express its role or purpose:
- Describe an image so a screen reader can convey what it represents, such as the waving .NET bot image. section 2.3
- Declare a label’s heading level when its typography visually signals importance or hierarchy. section 2.3
- Provide a hint for an input when users need context beyond its placeholder, such as explaining that a name will be used for location sharing. section 3.2
Make a name field clearer
In a location-sharing form, an Entry can display the placeholder “Enter your name” while SemanticProperties.Hint explains that the name is used when sharing location. The visible prompt helps sighted users; the hint supplies descriptive context for assistive technology. section 3.2
<Entry #1
Placeholder="Enter your name" #2
SemanticProperties.Hint="Enter your name to be used when sharing location"
HorizontalOptions="Center"
x:Name="UsernameEntry"/> #3
Inspect the Entry markup to see a placeholder paired with SemanticProperties.Hint and an x:Name for later code access. section 3.2
Accessibility is broader than a few properties. Semantic metadata is a practical part of making a UI understandable when visual conventions are unavailable, but accessible design also requires continued attention to guidance and platform-specific accessibility practices. section 2.3 section 3.2
