Skip to content

A11y: Fix model picker Names, unique accelerator labels, and code sample Name length#611

Open
haoliuu wants to merge 6 commits into
mainfrom
haoliu/a11y-fix-2
Open

A11y: Fix model picker Names, unique accelerator labels, and code sample Name length#611
haoliuu wants to merge 6 commits into
mainfrom
haoliu/a11y-fix-2

Conversation

@haoliuu

@haoliuu haoliuu commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

Fixes for accessibility bugs reported against AI Dev Gallery. Each fix is in its own commit for independent review.

Fixes

  • Model picker buttons: Panel-content buttons (Run sample, Add model, Open AI Toolkit, View documentation) now expose a UIA Name instead of null.
  • Hardware accelerator badges: CPU/GPU/NPU "More info" buttons now have unique Names (e.g. "GPU more info") so focusable siblings aren't identical.
  • Markdown lists: Decorative list-item wrappers and bullet glyphs are excluded from the accessibility tree to avoid whitespace-only Names.
  • API code sample: The code RichTextBlock/ScrollViewer now exposes a concise Name instead of the full source (was exceeding 512 characters).

Validation

Verified manually with Accessibility Insights for Windows on the reported pages; project builds clean for x64.

Copilot AI review requested due to automatic review settings June 16, 2026 05:05

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses several accessibility (UIA) issues in AI Dev Gallery by ensuring key interactive UI elements have meaningful, non-null, and non-duplicated accessible names, and by reducing excessively long accessible names for code samples.

Changes:

  • Adds explicit AutomationProperties.Name values for model picker actions (e.g., Run sample / Add model / View documentation / Open AI Toolkit tool) and the API code sample surface.
  • Makes hardware-accelerator “More info” buttons uniquely named per accelerator (CPU/GPU/NPU/…).
  • Adjusts Markdown list rendering to suppress decorative bullet UI from the accessibility tree (but see comment on list-item content visibility).

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
AIDevGallery/Utils/AppUtils.cs Adds helper to generate unique accelerator “more info” UIA Names.
AIDevGallery/Pages/APIs/APIPage.xaml Sets a concise UIA Name for the code sample ScrollViewer.
AIDevGallery/Controls/ModelSelectionControl.xaml Uses the new accelerator “more info” UIA Name helper in templates.
AIDevGallery/Controls/ModelPicker/ModelPickerViews/OnnxPickerView.xaml Adds UIA Names for action buttons and unique accelerator “more info” Names.
AIDevGallery/Controls/ModelPicker/ModelOrApiPicker.xaml Adds unique accelerator “more info” Names and a UIA Name for “Run sample”.
AIDevGallery/Controls/ModelPicker/AddHFModelView.xaml Uses the new accelerator “more info” UIA Name helper in templates.
AIDevGallery/Controls/Markdown/TextElements/MyList.cs Excludes bullet glyphs from the accessibility tree (but currently also excludes list item content).

Comment thread AIDevGallery/Controls/Markdown/TextElements/MyList.cs
Comment thread AIDevGallery/Controls/Markdown/TextElements/MyList.cs
<controls:WrapPanel Orientation="Horizontal" ItemSpacing="12" LineSpacing="12">
<Button
x:Name="OpenAIToolkitButton"
AutomationProperties.Name="Open AI Toolkit's Conversion tool"

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@weiyuanyue weiyuanyue self-requested a review June 16, 2026 12:26
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.

3 participants