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

index: migrate from label to badge (Bootstrap 3 -> 4/5) #608

Merged
merged 2 commits into from
Aug 8, 2024

Conversation

jrchamp
Copy link
Collaborator

@jrchamp jrchamp commented Jul 29, 2024

label was in Bootstrap 3. Since Bootstrap 4 (theme boost; Moodle 3.2+), it's been badge and we don't need/want the custom CSS. The suggested change should work in Bootstrap 4.0 - 5.3+ (specifically Moodle 3.2 - 4.6+).

Fixes #601

@jrchamp jrchamp added the bug Fixes problems or reduces technical debt label Jul 29, 2024
@jrchamp jrchamp requested a review from a team July 29, 2024 14:59
@jrchamp jrchamp self-assigned this Jul 29, 2024
@smbader
Copy link
Contributor

smbader commented Aug 1, 2024

I like the change, supporting back to 3.2 is great.

As mentioned in our meeting, there's a little bit of contrast back and forth between versions that we need to work out.

Even with the backward/forward compatibility, bg-info text-dark was not sufficient contrast for WCAG 2.x AA. Forcing text-dark also had the drawback of not working well in "dark mode" themes. So if we can't use text-dark, then Bootstrap 5.0 and 5.1 will need to use the default text color. That leaves "primary", "secondary", "success", "danger" and "dark". primary and secondary are already used for buttons to Join or Cancel. success did not have sufficient contrast in all versions that we tested. danger is specifically designed to scare/alert people, so that seemed wrong. dark is the only option that has sufficient contrast, isn't designed to scare people, and does not conflict with the mental model of action buttons.
@jrchamp
Copy link
Collaborator Author

jrchamp commented Aug 1, 2024

Thanks y'all for testing these with me!

Even with the backward/forward compatibility, badge bg-info text-dark was not sufficient contrast for WCAG 2.x AA in some versions. Forcing text-dark also had the drawback of not working well in "dark mode" themes. So if we can't use text-dark, then Bootstrap 5.0 and 5.1 will need to use a background style that has sufficient contrast with the default text color. That leaves "primary", "secondary", "success", "danger" and "dark". primary and secondary are already used for buttons to Join or Cancel. success did not have sufficient contrast in some of the versions that we tested. danger is specifically designed to scare/alert people, so that felt incorrect. Thus, dark is the only option that has sufficient contrast, isn't designed to scare people, and does not conflict with the mental model of action buttons.

Copy link
Contributor

@smbader smbader left a comment

Choose a reason for hiding this comment

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

A good choice for both visibility and backwards compatibility

@jrchamp jrchamp merged commit 6598de0 into ncstate-delta:main Aug 8, 2024
7 checks passed
@jrchamp jrchamp deleted the fix/in-progress-meeting-label branch August 8, 2024 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes problems or reduces technical debt
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

index: In Progress meeting status has low contrast
2 participants