Repository navigation
[release/17.0] Avoid highlighting dashboard menu items on pointer open - #22388
Jose Perez Rodriguez (joperezr) merged 1 commit into
Conversation
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 22388Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 22388" |
This comment has been minimized.
This comment has been minimized.
Co-authored-by: Copilot <[email protected]>
c28dfa1 to
b9feb5e
Compare
There was a problem hiding this comment.
🟢 Approval recommended
There are no active review issues for the menu-item focus styling change.
No open issues 🎉
What changed in this PR
This PR adjusts dashboard menu styling so programmatic focus no longer highlights the first item when a menu opens by pointer, while preserving keyboard-focus highlighting.
Changes:
- Removes plain
:focusfrom the menu-item highlight rule, retaining:hover,:state(active), and:focus-visible. - Updates the CSS comment to explain the intended pointer-open behavior.
| File | Description |
|---|---|
src/Aspire.Dashboard/wwwroot/css/controls.css |
Refines menu-item highlight selectors and documents pointer-open behavior. |
Review effort: Balanced
|
Before approving (change is good) don't you want to target main, and then we cherry pick the PRs we want to backport (maybe in blocks), there are other changes we'll apply. Otherwise you'll depend on the reverse merge which might take longer or be blocked, and if the answer to that is to create another PR then it would be the same as starting with main anyway. |
main is way behind release on dashboard at the moment. I'll ensure it gets to both. Once main has caught up then will go back to normal backport pattern. |
|
closing and reopening as this as CI didn't run |
Tests selector13 / 101 PR test projects · 2 PR jobs, from 1 changed file. Selected PR test projects (13 / 101)
Selected PR jobs (2)
How these were chosen — grouped by what changed
🔧 📦 affected project Job reasons
Selection computed for commit |
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
bc48a93
into
release/17.0
|
✅ No documentation update needed. excluded → base_branch_is_release, title_release_prefix. This is a backport ( |
|
/backport to main |
|
Started backporting to |
Description
The first item in a dashboard context menu looked hovered as soon as the menu opened, even when the pointer was elsewhere. The dashboard now leaves that item unhighlighted on pointer open. The menu still moves focus to the first enabled item, so keyboard navigation works as before.
The hover-color rule keeps
:hover,:state(active), and:focus-visible. Removing plain:focusfrom the rule added in #21943 prevents programmatic focus alone from applying the hover color.Fixes # (issue)
User-facing usage
Right-click a resource row in the dashboard. With the pointer outside the menu items, View JSON should have the same background as the other items. Hover an item or press an arrow key to see the highlight. Opening the context menu with Shift+F10 still makes the first item's keyboard focus visible.
Screenshots / Recordings
Both screenshots in each row show the TestShop
frontendcontext menu opened by right-click, with the pointer outside the items. The before screenshots restore only the original:focusselector in the browser.Validation
git diff --cached --checkpassed before committing. No unit tests were added for this CSS-only change.Checklist
<remarks />and<code />elements on your triple slash comments?