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: In Progress meeting status has low contrast #601

Closed
jrchamp opened this issue Jul 18, 2024 · 2 comments · Fixed by #608
Closed

index: In Progress meeting status has low contrast #601

jrchamp opened this issue Jul 18, 2024 · 2 comments · Fixed by #608
Labels
bug Fixes problems or reduces technical debt

Comments

@jrchamp
Copy link
Collaborator

jrchamp commented Jul 18, 2024

When a meeting is in progress, the .zoom-info CSS class is applied:

$label = html_writer::tag('span', $strmeetingstarted, ['class' => 'label label-info zoom-info']);

The CSS file applies some padding, a rounded border and makes the text white:

.zoom-info {
padding: 0.2em 0.6em 0.3em;
color: #fff;
border-radius: 0.25em;
}

In most themes, this will result in white text on a white (or slightly gray) background, which is completely invisible and far from the minimum levels of contrast necessary for accessible content.

This was discovered by @sgrandh3 while testing #250

@jrchamp jrchamp added the bug Fixes problems or reduces technical debt label Jul 18, 2024
@github-project-automation github-project-automation bot moved this to Needs triage in mod_zoom Workflow Jul 18, 2024
@jrchamp jrchamp moved this from Needs triage to To Do in mod_zoom Workflow Jul 18, 2024
@sgrandh3
Copy link
Collaborator

Add a screenshot for reference. When highlighted the screen, the text "In progress" can be seen
image

@jrchamp
Copy link
Collaborator Author

jrchamp commented Jul 25, 2024

Okay, the "label" and "label-info" CSS classes were from Bootstrap 3. The "zoom-info" CSS class modified it to be a little different. But now, it's just breaking things. Moodle 3.7 - 4.5 have Bootstrap 4. Moodle 4.5+ will have Bootstrap 5.

The documentation for bootstrap versions says:

  • Bootstrap 4.x: badge badge-info
  • Bootstrap 5.0, 5.1: badge bg-info text-dark
  • Bootstrap 5.2+: badge text-bg-info

While "badge-info" and "text-bg-info" are both helpers that combine two classes into one, "bg-info" and "text-dark" exist in all of the supported versions. Thus, for Bootstrap 4.0 - Bootstrap 5.3: badge bg-info text-dark. Let's switch to this and remove the custom CSS class from our file.

We don't support earlier versions, but if we decided to try, it seems that "label badge bg-info text-dark" might even work for Bootstrap 3.x.

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: Done
Development

Successfully merging a pull request may close this issue.

2 participants