jetpack icon indicating copy to clipboard operation
jetpack copied to clipboard

[Block] Form - Date picker title header (month, year, arrows) inherits theme foreground color, making it unreadable on dark themes

Open radtechgh opened this issue 3 years ago • 8 comments

Quick summary

User added a Form block, used date picker. On live view, the calendar shows the day numbers, but not the month, year, or prev/next arrows.

Steps to reproduce

  1. Form with date picker field added to page.
  2. Publish page.
  3. View page, select date picker, title header appears blank.
  4. Switch to another FSE theme (Zoologist in my test), form date picker now shows the proper calendar with titles.

What you expected to happen

Date picker should show the month, year and previous/next arrows. Plus day date numbers.

What actually happened

Entire title area of date picker is blank.

Impact

Some (< 50%)

Available workarounds?

Yes, easy to implement

Platform (Simple and/or Atomic)

Atomic

Logs or notes

CSS (provided by another HE) will add the month and year back, but not the prev/next arrows:

div#ui-datepicker-div {
    color: #333;
}

radtechgh avatar Mar 25 '23 17:03 radtechgh

initial site: 6067936-zen

radtechgh avatar Mar 25 '23 17:03 radtechgh

Support References

This comment is automatically generated. Please do not edit it.

  • [ ] 6067936-zen
  • [ ] 7720615-zen
  • [ ] 7627294-zen
  • [ ] 8022733-zen
  • [ ] 9310622-zen

github-actions[bot] avatar Mar 25 '23 17:03 github-actions[bot]

📌 SCRUBBING : RESULT - Replicated / Could Not Replicate / Uncertain

  • Tested on Simple: Replicated
  • Tested on AT: Replicated

📌 FINDINGS/SCREENSHOTS/VIDEO

  • Replicated in AT and Simple, using multiple themes with a dark background and white foreground color by default. (Tested in VideoMaker, Remote). The date picker has a white background, and then the text is inheriting the foreground color of the theme due to this CSS:
body {
  color: var(--wp--custom--color--foreground);

AT Example Markup on 2023-03-29 at 17:48:32

Simple Example

Markup on 2023-03-29 at 17:43:12

Screen Capture on 2023-03-29 at 17-44-06

📌 ACTIONS

  • Assigned to Apex
  • Transferred to jetpack repo

cuemarie avatar Mar 30 '23 00:03 cuemarie

This issue has been marked as stale. This happened because:

  • It has been inactive for the past 6 months.
  • It hasn’t been labeled `[Pri] BLOCKER`, `[Pri] High`, `[Type] Feature Request`, `[Type] Enhancement`, `[Type] Janitorial`, `Good For Community`, `[Type] Good First Bug`, etc.

No further action is needed. But it's worth checking if this ticket has clear reproduction steps and it is still reproducible. Feel free to close this issue if you think it's not valid anymore — if you do, please add a brief explanation.

github-actions[bot] avatar Sep 27 '23 00:09 github-actions[bot]

Issue is still present.

If nothing else, probably https://github.com/Automattic/jetpack/blob/trunk/projects/packages/forms/src/contact-form/css/jquery-ui-datepicker.css should do more overriding of styles if it's not going to try to use theme variables.

anomiex avatar Oct 16 '23 20:10 anomiex

Another report here: 7720615-zen

Gustavo-Hilario avatar Feb 10 '24 14:02 Gustavo-Hilario

Encountered this here on a light theme as well: 7627294-zen

Example: (Content highlighted so you can see it, but its white text on white bg):

CleanShot 2024-02-12 at 10 55 19@2x

Provided CSS to resolve the issue.

#ui-datepicker-div {
    color: #000;
}

cuemarie avatar Feb 12 '24 17:02 cuemarie

Reported here: 8022733-zd-a8c

Provided CSS to resolve issue.

upwardmomentum84 avatar May 10 '24 12:05 upwardmomentum84

Reported here: 9310622-zd-a8c Provided CSS to resolve the issue

rosepajaroja avatar Jan 24 '25 07:01 rosepajaroja

Fixed with https://github.com/Automattic/jetpack/pull/41342

enejb avatar Jan 28 '25 12:01 enejb