Skip to content

Commit

Permalink
index: use dark badge styles
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jrchamp authored Aug 1, 2024
1 parent cb1c944 commit 4a7c222
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@
$oldtable->data[] = $row;
} else {
if ($inprogress) {
$label = html_writer::tag('span', $strmeetingstarted, ['class' => 'badge bg-info text-dark']);
$label = html_writer::tag('span', $strmeetingstarted, ['class' => 'badge bg-dark badge-dark bg-text-dark']);
$row[2] = html_writer::tag('div', $label);
} else {
$row[2] = $displaytime;
Expand Down

0 comments on commit 4a7c222

Please sign in to comment.