liveBook · Manning

Semantic properties

As explained in .NET MAUI in Action

Semantic properties are .NET MAUI UI metadata that communicates accessibility meaning, such as heading level, to assistive technologies.

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

How .NET MAUI in Action covers it

How deep it goes
Defines descriptive metadata and demonstrates image descriptions, heading levels, and input hints without detailing assistive-technology internals.
Examples
Uses a waving bot image, heading labels, and a FindMe name Entry with a location-sharing hint.
What it assumes
Introduces semantic metadata through familiar .NET MAUI controls without assuming prior mobile accessibility knowledge.
What you can do after
Apply it via .NET MAUI properties to describe images, expose heading hierarchy, and clarify text input for screen readers.
How it connects
Connects accessibility, screen readers, WCAG 2.1, labels, images, entries, color, and contrast.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of .NET MAUI in Action. The section links point to the parts of the book it draws on.