-
-
Notifications
You must be signed in to change notification settings - Fork 78.9k
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
Breadcrumbs text and default links fail contrast ratio #32053
Comments
I think I suggested that somewhere. Honestly I'd drop both background and borders, to simplify theming. |
To complement my previous comment, adding background, border or radii is really, really easy thanks to our utilities. So apart from spacings, I'd say this component should definetely be simpler — and as an argue, the vast majority of breadcrumlbs out on the web are much simpler than our current one. |
Let's drop the background, border, and padding then. The main use of a breadcrumb component then is purely to use add a separator between nested items. I can dig that. I'm also thinking we use a local CSS var for the separator: https://codepen.io/emdeoh/pen/KKMOoGx. Note that the first example I tried using a |
Regarding the CSS custom property, we might do as in another place, using an unassigned custom property and our Sass variables as a fallback: .breadcrumb-item + .breadcrumb-item::before {
content: var(--bs-separator, #{$breadcrumb-separator)};
} |
https://v5.getbootstrap.com/docs/5.0/components/breadcrumb/
The active text/separator for breadcrumbs uses
#6c757d
on#e9ecef
with a contrast ratio of 4:1. The default links in breadcrumbs use#0d6efd
on#e9ecef
with a contrast ratio of 3.8:1.bumping the text/separator from
$gray-600
to$gray-700
(#495057
) shoots up the contrat to 6.9:1. For the links, however, there's very little wiggle room ... not sure how/if that can be tackled -#0d6efd
has a ratio of 4.5:1 only against pure white, so even lightening the breadcrumbs background a bit won't helpThe text was updated successfully, but these errors were encountered: