A11y: Fix tab order, focus, dark mode, and Name property issues#609
Merged
Conversation
…umber text blocks
Contributor
There was a problem hiding this comment.
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. |
weiyuanyue
approved these changes
Jun 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
First batch of fixes for accessibility bugs reported against AI Dev Gallery.
Fixes
CodeTextBlockandLineNumbersTextBlocknow expose conciseAutomationProperties.Namevalues instead of the full source / digit sequence (was exceeding 512 characters).Validation
Verified manually with keyboard navigation, dark/light theme switching,
and Accessibility Insights for Windows.