Skip to content
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

fix(locale-modal): replaced placeholder color for a bolder one #4896

Merged

Conversation

IgnacioBecerra
Copy link
Contributor

Related Ticket(s)

#4802

Description

The previous placeholder color for the Web Components version was failing contrast ratio testing. Changed the placeholder text to match the $text-02 token used in the React version, where the contrast ratio has been fixed.

Changelog

Changed

  • <dds-search> placeholder color changed to $text-02 to match React version

@ibmdotcom-bot
Copy link
Contributor

ibmdotcom-bot commented Jan 13, 2021

@ibmdotcom-bot
Copy link
Contributor

ibmdotcom-bot commented Jan 13, 2021

@ibmdotcom-bot
Copy link
Contributor

ibmdotcom-bot commented Jan 13, 2021

Copy link
Contributor

@asudoh asudoh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM basically, can we add a comment referring to https://github.com/carbon-design-system/carbon/blob/v10.25.0/packages/components/src/globals/scss/_helper-mixins.scss#L44-L51 and say that we are deliberately diverge from that, and the reason why we do so? (Background; People tend to wonder why we are defining one-off placeholder color here) Thanks @IgnacioBecerra!

Copy link
Contributor

@asudoh asudoh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @IgnacioBecerra for the update!

@jeffchew jeffchew added the Ready to merge Label for the pull requests that are ready to merge label Jan 14, 2021
@oliviaflory
Copy link
Contributor

@IgnacioBecerra Is this something we can propose to the Carbon repo? IMO, we should be avoiding making overrides to core components that we have to maintain.

I did a little digging in the Carbon repo and found this issue where they updated the placeholder mixins to address accessibility issues with the place holder text. carbon-design-system/carbon#6914
Do we have this mixin applied in our locale selector?
Their fix of #6f6f6f ($text-05) passes by 4.57 on #f4f4f4 ($field-01).

@kodiakhq kodiakhq bot merged commit bcd5f43 into carbon-design-system:master Jan 14, 2021
@asudoh
Copy link
Contributor

asudoh commented Jan 14, 2021

@oliviaflory Interesting point, thank you for bringing this up - I believe the original code used $text-05 (@IgnacioBecerra please correct me if I'm wrong here) where QA team is complained against. Any thoughts @IgnacioBecerra? Thanks!

@IgnacioBecerra
Copy link
Contributor Author

@asudoh @oliviaflory Yeah I think that's correct, the placeholder was $text-05. I consulted with the QA team and was told that the React version had been updated, I copied the value over from there.

@asudoh
Copy link
Contributor

asudoh commented Jan 14, 2021

@IgnacioBecerra Would you please check the color contrast of the original code to see if it really misses our color contrast standard? I think latest Chrome DevTools has a feature that shows the color contrast.

@IgnacioBecerra
Copy link
Contributor Author

@asudoh I tried using the color contrast tool but it appears that it doesn't appear to be working.
Screen Shot 2021-01-14 at 9 27 47 AM

However, I found this website and got these results:
($text-05 and $field-01 respectively)
Screen Shot 2021-01-14 at 9 37 37 AM

Looks like it passes the WCAG AA test, but fails on AAA.

However, using $text-02, it passes both:
Screen Shot 2021-01-14 at 9 39 44 AM

cc: @oliviaflory

@oliviaflory
Copy link
Contributor

Thank you @IgnacioBecerra, I didn't realize we were having to pass WCAG AAA, I was under the impression we only needed AA. Might be good to confirm with @Praveen-sr if this is the new standard we should be aware of.

@asudoh
Copy link
Contributor

asudoh commented Jan 15, 2021

@IgnacioBecerra The associated issue (#4802) seems to say that the pseudo element's color in before-change code was #AFADAD whereas you saw it actually was #6F6F6F. Is it true...?

@IgnacioBecerra
Copy link
Contributor Author

IgnacioBecerra commented Jan 15, 2021

@asudoh Yeah that's correct, this is the original placeholder using #6F6F6F ($text-05):
Screen Shot 2021-01-14 at 4 24 09 PM

This is with#AFADAD (no token associated with this)
Screen Shot 2021-01-14 at 4 24 25 PM

Just as an extra, this is with the current color #525252 ($text-02):
Screen Shot 2021-01-14 at 4 27 36 PM

I thought they had mistakenly copied #AFADAD from another element when writing the issue, given that they still mentioned the placeholder in the title + the correct background color.

@asudoh
Copy link
Contributor

asudoh commented Jan 15, 2021

I see, does it mean that the issue was never reproducible? Is it worth checking with QA team?

IgnacioBecerra added a commit to IgnacioBecerra/ibm-dotcom-library that referenced this pull request Feb 22, 2021
…n-design-system#4896)

### Related Ticket(s)
carbon-design-system#4802

### Description

The previous placeholder color for the Web Components version was failing contrast ratio testing. Changed the placeholder text to match the `$text-02` token used in the React version, where the contrast ratio has been fixed.

### Changelog

**Changed**

- `<dds-search>` placeholder color changed to `$text-02` to match React version

<!-- React and Web Component deploy previews are enabled by default. -->
<!-- To enable additional available deploy previews, apply the following -->
<!-- labels for the corresponding package: -->
<!-- *** "package: services": Services -->
<!-- *** "package: utilities": Utilities -->
<!-- *** "package: styles": Carbon Expressive -->
<!-- *** "RTL": React / Web Components (RTL) -->
<!-- *** "feature flag": React / Web Components (experimental) -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ready to merge Label for the pull requests that are ready to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants