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

Accordion body text turns white when embedded on background color #489

Open
akslay opened this issue Jun 1, 2022 · 1 comment
Open

Accordion body text turns white when embedded on background color #489

akslay opened this issue Jun 1, 2022 · 1 comment
Labels
2.0.x only bug Something isn't working good first issue Good for newcomers

Comments

@akslay
Copy link
Contributor

akslay commented Jun 1, 2022

Problem/Motivation

Accordions should be readable when nested inside a a <div> that has a background color applied.

This issue originates from: az-digital/az_quickstart#1443

Describe the bug

Accordions are receiving white text when nested inside an element with a background color. Due to built-in accessibility checks, that text is turning white when the parent background color is dark. However, since accordions have a hard-coded white background, this conflicts with the built-in color contrast assurance.

To Reproduce

Add an accordion inside an element that has a background color class applied to it.

@akslay
Copy link
Contributor Author

akslay commented Jul 3, 2024

It looks like this is already fixed in the 5.x version of Bootstrap.

if we want to fix the 2.x branch, we can add this:

.accordion .card {
    background-color: initial;
}

However, the above will break fix present on the 5.x branch. So not sure if it's best to address this ticket, or to just wait for the fix presented in Bootstrap 5.x. I might lean towards just waiting for 5.x so that we don't have to untangle it later. Especially since the issue is already patched on the QS side of things.

Unless we're able to add this fix to the 2.x branch without including it on main, since 5.x is on main.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.0.x only bug Something isn't working good first issue Good for newcomers
Projects
No open projects
Development

No branches or pull requests

3 participants