Fixed Copy command target not being found after multiple registrations - #583
Merged
Merged
Conversation
Vinay Narayana (vinnarayana-msft)
pushed a commit
that referenced
this pull request
Jul 30, 2026
…Icons pages (AB#3036673) Remove FocusManager.IsFocusScope="True" from the copy buttons in ColorTile (Design Guidance -> Color) and IconDataField (Design Guidance -> Icons). The focus scope split logical focus from keyboard focus, so tabbing to a copy button that was scrolled out of view did not raise the framework's IsKeyboardFocused -> BringIntoView, leaving the newly focused button invisible (a WCAG 2.4.3 / 2.4.7 focus-order/focus-visible issue). IsFocusScope was never needed on these buttons: - ColorTile routes ApplicationCommands.Copy via an explicit CommandTarget plus a class CommandBinding, so command routing is focus-independent. (It was added in #564 as plumbing for a target-less Copy command and made redundant by the explicit CommandTarget added in #583.) - IconDataField copies via a Click handler (CopyButton_Click), which does not depend on focus at all. With the focus scope removed, Tab now scrolls the focused copy button into view on both pages, and copy-to-clipboard continues to work. ControlExample's source-code copy buttons are intentionally left unchanged; their tab/scroll behavior is already correct. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 45ee703e-394b-4bdc-a77b-94f2933a5a6d
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.
Microsoft Reviewers: Open in CodeFlow