-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Autocompleters: Change user slug color #69003
Autocompleters: Change user slug color #69003
Conversation
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Unlinked AccountsThe following contributors have not linked their GitHub and WordPress.org accounts: @rotemg-elementor. Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases. If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
2799c7c
to
1e8ae0b
Compare
1e8ae0b
to
82a9f54
Compare
@SainathPoojary, can you rebase this on top of the latest trunk? |
82a9f54
to
ba51d41
Compare
Thanks, @SainathPoojary! While this solves the color contrast issue for the selected option, it introduces another issue. If we remove Maybe instead we should only apply color for items that aren't currently selected. What do you think? diff --git packages/editor/src/components/autocompleters/style.scss packages/editor/src/components/autocompleters/style.scss
index 295d63b8e57..475ed306b3b 100644
--- packages/editor/src/components/autocompleters/style.scss
+++ packages/editor/src/components/autocompleters/style.scss
@@ -24,7 +24,6 @@
}
.editor-autocompleters__user-slug {
margin-left: 8px;
- color: $gray-700;
white-space: nowrap;
text-overflow: ellipsis;
overflow: none;
@@ -32,7 +31,7 @@
flex-grow: 0;
flex-shrink: 0;
}
- &:hover .editor-autocompleters__user-slug {
- color: var(--wp-admin-theme-color);
+ &:not(.is-primary) .editor-autocompleters__user-slug {
+ color: $gray-700;
}
} |
Thanks, @Mamaduka! That makes sense. Instead of completely removing $gray-700, I’ll update the PR so that the color only applies to items that aren’t currently selected. This way, the slug text remains visually distinct while ensuring proper emphasis on the selected item. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @SainathPoojary!
What?
Closes #69001
This PR improves the accessibility and readability of user slugs in the autocompleter dropdown when selecting a user.
Why?
The current color contrast of the user slug text in the autocompleter list is insufficient, making it hard to read.
1:1
(#757575
on#007cba
)1.26:1
(#007cba
on#006ba1
)These values do not meet accessibility guidelines and hinder usability.
How?
$gray-700
color for the slug text.var(--wp-admin-theme-color)
) to avoid low contrast issues.Testing Instructions
@
in the editor to trigger the user autocompleter dropdown.Screencast
Screen.Recording.2025-02-06.at.1.36.57.PM.mov