Skip to content

Add MAUI SemanticProperties to inspector properties panel#150

Open
Redth wants to merge 1 commit intomainfrom
redth/add-semantic-properties-inspector
Open

Add MAUI SemanticProperties to inspector properties panel#150
Redth wants to merge 1 commit intomainfrom
redth/add-semantic-properties-inspector

Conversation

@Redth
Copy link
Copy Markdown
Owner

@Redth Redth commented Apr 17, 2026

The DevFlow inspector's Visual Tree properties panel shows Appearance, Layout, Behavior, and Transform groups but has no visibility into accessibility metadata. This makes it harder to verify that SemanticProperties are correctly set on MAUI elements during development.

Approach

Adds a new Accessibility property group that queries MAUI's SemanticProperties attached properties via the DevFlow agent's property API:

  • SemanticProperties.Description -- descriptive text for screen readers (text editor)
  • SemanticProperties.Hint -- hint about what happens on interaction (text editor)
  • SemanticProperties.HeadingLevel -- heading level enum (None, Level1--Level9)

These are registered in the PropertyRegistry alongside existing common properties, so they're fetched automatically when an element is selected. The "Accessibility" group appears between Behavior and Transform in the panel ordering.

Additionally, enriches the DevFlowElementInfo model with optional semanticDescription, semanticHint, and semanticHeadingLevel fields. When a MauiDevFlow agent includes these in tree data, they're displayed in a dedicated section in the Element identity area with a universal-access icon.

Graceful degradation

Properties with null values are already filtered out by the existing Where(p => p.Value != null) pipeline, so if the connected agent doesn't support attached property queries, the Accessibility section simply won't appear -- no errors, no empty groups.

Add a new 'Accessibility' group to the Visual Tree inspector's properties
panel that queries and displays MAUI's SemanticProperties attached properties:
- SemanticProperties.Description (text editor)
- SemanticProperties.Hint (text editor)
- SemanticProperties.HeadingLevel (enum: None, Level1-Level9)

Also enrich DevFlowElementInfo model with optional semantic fields
(semanticDescription, semanticHint, semanticHeadingLevel) so agents
can include them in tree data. When present, these are shown in a
dedicated Accessibility section in the Element identity panel.

Properties gracefully degrade - they only appear when the agent
returns non-null values.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant