Opened 5 years ago
Closed 5 years ago
#48342 closed defect (bug) (reported-upstream)
Twenty Twenty ::selection color invisible with dark backgrounds
Reported by: | afercia | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 5.3 |
Component: | Bundled Theme | Keywords: | has-screenshots has-patch |
Focuses: | accessibility | Cc: |
Description
Twenty Twenty uses a custom color for selected text: black background and white text.
While this works with light background colors (e.g. the default one):
it doesn't work with dark background: here's the same selected text with a dark background set via the Customizer:
Twenty Twenty is smart and when the background is dark it switches the body text to white. However, the ::selection
color is hardcoded in the main stylesheet and doesn't change:
::selection { background: #000; color: #fff; }
This way, operating a text selection is basically impossible as users won't be able to see the selection. Not to mention that even if the background is not a full black and it's some other color, for example a dark blue, the selection would be barely visible as well.
For usability and accessibility it's recommended to not alter the selection color and leave that to the operating systems / browsers defaults.
Attachments (1)
Change History (5)
#2
@
5 years ago
- Keywords close added; commit dev-feedback removed
- Milestone 5.3 deleted
- Resolution set to invalid
- Status changed from new to closed
This needs to be submitted at https://github.com/wordpress/twentytwenty and then closed as reported-upstream.
#3
@
5 years ago
- Keywords close removed
- Milestone set to 5.3
- Resolution invalid deleted
- Status changed from closed to reopened
I'm sorry I disagree. Reopening because the place where development of the bundled theme happens during Release Candidate should at least be discussed during dev chat.
WordPress 5.3 is in Release Candidate period, any code change needs to be reviewed and "signed off" by two core committers. Developing on GitHub and then merging "in block" code changes from GitHub to Trac isn't the best way to manage this process IMHO.
#4
@
5 years ago
- Milestone 5.3 deleted
- Resolution set to reported-upstream
- Status changed from reopened to closed
This has been reported-upstream
in https://github.com/WordPress/twentytwenty/issues/866 and is fixed in https://github.com/WordPress/twentytwenty/pull/867
48342.diff removes the
::selection
ruleset entirely, leaving the selection style up to operating systems and browsers defaults.Being in Release Candidate period, this patch needs to be reviewed and "signed off" by a second core committer.