Skip to content

Commit

Permalink
Make sure copy button is tab-accessible and visible on tab (dotnet#3192)
Browse files Browse the repository at this point in the history
Co-authored-by: Adam Ratzman <adamratzman@microsoft.com>
  • Loading branch information
adamint and Adam Ratzman authored Apr 3, 2024
1 parent 7a2d4cc commit 2bba2ad
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion src/Aspire.Dashboard/Components/Controls/GridValue.razor
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,12 @@
}

@{
(string, object)[] uncapturedAttributes = [("alt", PreCopyToolTip), ("title", string.Empty), ("aria-label", Loc[nameof(ControlsStrings.GridValueCopyToClipboard)])];
(string, object)[] uncapturedAttributes = [
("alt", PreCopyToolTip),
("title", string.Empty),
("aria-label", Loc[nameof(ControlsStrings.GridValueCopyToClipboard)]),
("tabindex", "0")
];
}

<FluentButton Appearance="Appearance.Lightweight"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
cursor: pointer;
}

::deep:hover .defaultHidden {
::deep:hover .defaultHidden, ::deep:focus-within .defaultHidden {
opacity: 1; /* safari has a bug where hover is not always called on an invisible element, so we use opacity instead */
}

0 comments on commit 2bba2ad

Please sign in to comment.