Skip to content

A11y: Fix code-pane focus order, focus visibility, tooltips, and View code button#613

Merged
haoliuu merged 7 commits into
mainfrom
haoliu/a11y-fix-3
Jun 26, 2026
Merged

A11y: Fix code-pane focus order, focus visibility, tooltips, and View code button#613
haoliuu merged 7 commits into
mainfrom
haoliu/a11y-fix-3

Conversation

@haoliuu

@haoliuu haoliuu commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator

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

Fixes

  • Code pane focus navigation (samples): Tab from the Code button now moves focus into the code pane (selected tab), and Shift+Tab from the pane returns focus to the Code button, instead of skipping far across the XAML tree.
  • Focused link visibility (model page): Added bottom padding so the focus rectangle on the last documentation link is fully visible instead of being clipped by the card edge.
  • Suggested sample tooltips (model page): Sample chips whose names are truncated now show a tooltip with the full name on hover/focus.
  • Empty output focus (samples): Output scroll areas no longer take keyboard focus when empty, so Tab moves to the next interactive control. Applied consistently across 11 samples to match those already working correctly.
  • View code button: Restyled the "View code" affordance with a bordered pill so it's clearly distinguishable from normal text.

Validation

Verified manually with keyboard navigation and Accessibility Insights for Windows on the reported page.

Copilot AI review requested due to automatic review settings June 24, 2026 03:18

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

Accessibility-focused updates across the Scenario page, Model page, and multiple samples to improve keyboard navigation, focus visibility, and discoverability of UI affordances in AI Dev Gallery.

Changes:

  • Updated sample output panes to avoid taking keyboard focus when they are non-interactive (ScrollViewer IsTabStop="False").
  • Improved code-pane keyboard focus flow (Tab into code tabs; Shift+Tab back to the Code toggle) and focus visuals in the code viewer.
  • Model page and card UI tweaks: padding fix to prevent clipped focus rectangles, added tooltips for sample chips, and restyled “View code” to read as a button.

Reviewed changes

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

Show a summary per file
File Description
AIDevGallery/Samples/WCRAPIs/TextToTable.xaml Removes output scroll area from tab order.
AIDevGallery/Samples/WCRAPIs/TextSummarize.xaml Removes output scroll area from tab order.
AIDevGallery/Samples/WCRAPIs/TextRewrite.xaml Removes output scroll area from tab order.
AIDevGallery/Samples/WCRAPIs/PhiSilicaBasic.xaml Removes output scroll area from tab order.
AIDevGallery/Samples/WCRAPIs/DescribeYourChange.xaml Removes output scroll area from tab order.
AIDevGallery/Samples/Open Source Models/Language Models/Translate.xaml Removes output scroll area from tab order.
AIDevGallery/Samples/Open Source Models/Language Models/SentimentAnalysis.xaml Removes output scroll area from tab order.
AIDevGallery/Samples/Open Source Models/Language Models/Paraphrase.xaml Removes output scroll area from tab order.
AIDevGallery/Samples/Open Source Models/Language Models/GrammarCheck.xaml Removes output scroll area from tab order.
AIDevGallery/Samples/Open Source Models/Language Models/GenerateCode.xaml Removes output scroll area from tab order.
AIDevGallery/Samples/Open Source Models/Language Models/ExplainCode.xaml Removes output scroll area from tab order.
AIDevGallery/Pages/Scenarios/ScenarioPage.xaml.cs Adds keyboard handling and focus return integration for the code pane.
AIDevGallery/Pages/Scenarios/ScenarioPage.xaml Wires Code toggle PreviewKeyDown for Tab-to-code-pane behavior.
AIDevGallery/Pages/Models/ModelPage.xaml Adds padding for focus visibility and tooltips for sample chips.
AIDevGallery/Controls/SampleContainer.xaml.cs Adds focus-bridging helpers/events and code tab focus logic.
AIDevGallery/Controls/SampleContainer.xaml Wires TabView PreviewKeyDown and enables system focus visuals for code border.
AIDevGallery/Controls/Card.xaml Restyles “View code” into a more button-like pill while preserving the button behavior.

Comment thread AIDevGallery/Pages/Scenarios/ScenarioPage.xaml.cs
@haoliuu haoliuu merged commit 72eee2f into main Jun 26, 2026
8 checks passed
@haoliuu haoliuu deleted the haoliu/a11y-fix-3 branch June 26, 2026 04:32
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