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

Contrast issue with the background-color of <code> elements #10954

Open
3 tasks done
glmvc opened this issue Apr 18, 2024 · 2 comments
Open
3 tasks done

Contrast issue with the background-color of <code> elements #10954

glmvc opened this issue Apr 18, 2024 · 2 comments
Labels
♿ a11y An MDN Web Docs accessible by everyone involves: UX Requires the attention of the UX team. needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. ux make the user experience awesome

Comments

@glmvc
Copy link
Contributor

glmvc commented Apr 18, 2024

Summary

In both light and dark mode, the background color of the <code> elements can hardly be distinguished from the background color behind it in certain places.

For example, take a look at the zebra-striped "Technical summary" tables, where each odd row has a background-color that is nearly identical to the one of the <code> elements within it.

URL

The issue is global (styling).
Example: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/colgroup#technical_summary

Reproduction steps

The issue is visual (styling).
Please visit the sample URL or check out the screenshots below.

Expected behavior

A distinguishable background-color to visually recognize the <code> elements.

Actual behavior

The <code> elements are visually indistinguishable because of the nearly identical background-color.

Device

Desktop

Browser

Chrome

Browser version

Stable

Operating system

Mac OS

Screenshot

light mode

#f2f1f1 on #f9f9fb (Contrast Ratio = 1.07:1)

mdn-technical-summary-light

dark mode

#343434 on #313131 (Contrast Ratio = 1.04:1)

mdn-technical-summary-dark

Anything else?

CSS that sets the background-color for <code>
CSS that sets the background-color for table cells in odd table rows

Validations

@github-actions github-actions bot added the needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. label Apr 18, 2024
@skyclouds2001
Copy link
Contributor

this is a self-link (a kind of link in a page that reference to the page itself)

@glmvc
Copy link
Contributor Author

glmvc commented Apr 20, 2024

@skyclouds2001 You're right about <colgroup>, but note the <col> link, for example. And it's possible that other links appear in such tables. The "Technical summary" table is just one example.

@mirunacurtean mirunacurtean added ♿ a11y An MDN Web Docs accessible by everyone ux make the user experience awesome involves: UX Requires the attention of the UX team. needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. and removed needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. labels May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
♿ a11y An MDN Web Docs accessible by everyone involves: UX Requires the attention of the UX team. needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. ux make the user experience awesome
Projects
None yet
Development

No branches or pull requests

3 participants