Skip to content

A11y: Fix tab order, focus, dark mode, and Name property issues#609

Merged
haoliuu merged 5 commits into
mainfrom
haoliu/a11y-fix
Jun 8, 2026
Merged

A11y: Fix tab order, focus, dark mode, and Name property issues#609
haoliuu merged 5 commits into
mainfrom
haoliu/a11y-fix

Conversation

@haoliuu

@haoliuu haoliuu commented Jun 5, 2026

Copy link
Copy Markdown
Collaborator

First batch of fixes for accessibility bugs reported against AI Dev Gallery.

Fixes

  • Home page tab order: Preview link now receives focus before the carousel tiles when tabbing from the left nav.
  • Custom Parameters sample: Focus stays on Generate after invocation (moves to Stop while generating, returns to Generate when done).
  • Dark mode visibility: OpenAI logo and title bar Min/Max/Close glyphs are now visible in dark mode and follow runtime theme changes.
  • UIA Name property on code panel: CodeTextBlock and LineNumbersTextBlock now expose concise AutomationProperties.Name values instead of the full source / digit sequence (was exceeding 512 characters).
  • 58929691/58932882/58944323/58946033

Validation

Verified manually with keyboard navigation, dark/light theme switching,
and Accessibility Insights for Windows.

Copilot AI review requested due to automatic review settings June 5, 2026 03:01

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 delivers a first batch of accessibility and theming fixes in AI Dev Gallery, improving keyboard navigation/focus behavior, UI Automation (UIA) naming, and dark-mode (theme-aware) icon/title bar rendering.

Changes:

  • Adjusted home header keyboard navigation order (preview hyperlink before carousel tiles) via TabIndex.
  • Improved focus behavior in the Custom Parameters (CustomSystemPrompt) sample by moving focus to Stop while generating and restoring focus to Generate when appropriate.
  • Made dark/light theme changes propagate to model picker branding assets and window caption button colors, and set concise UIA names for the code panel.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
AIDevGallery/Utils/AppUtils.cs Makes theme-asset suffix selection use the window’s resolved ActualTheme when available.
AIDevGallery/Samples/Open Source Models/Language Models/CustomSystemPrompt.xaml.cs Improves keyboard focus behavior during/after generation and on cancel.
AIDevGallery/MainWindow.xaml.cs Updates caption button colors on runtime theme changes and refreshes them when resources update.
AIDevGallery/Controls/SampleContainer.xaml.cs Sets a concise UIA Name for the code panel after rendering code.
AIDevGallery/Controls/SampleContainer.xaml Adds concise AutomationProperties.Name values for line numbers and code display elements.
AIDevGallery/Controls/ModelPicker/ModelPickerViews/OpenAIPickerView.xaml.cs Updates the OpenAI logo to switch based on runtime theme changes.
AIDevGallery/Controls/ModelPicker/ModelPickerViews/OpenAIPickerView.xaml Adds x:Name so the OpenAI logo image can be updated programmatically.
AIDevGallery/Controls/HomePage/Header/HeaderCarousel.xaml Adjusts tab order so the preview link is reachable before the carousel tiles.

Comment thread AIDevGallery/MainWindow.xaml.cs
@haoliuu haoliuu merged commit ccc1812 into main Jun 8, 2026
8 checks passed
@haoliuu haoliuu deleted the haoliu/a11y-fix branch June 8, 2026 02:35
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