Skip to content

Sensei menu notices badges missing background bubble when their item is active #8073

Description

@donnapep

Description

Sensei admin menu notification badges lose their background pill when their menu item is the currently-active one. The count number still renders, but with no colored bubble behind it, so it reads as a bare number floating in the menu.

This affects every Sensei badge that uses core's .awaiting-mod class, including:

  • Home notices count — Sensei_Home::add_admin_menu_item()
  • Grading ungraded count — Sensei_Grading::grading_admin_menu() (class-sensei-grading.php)
// Home
$notices_html = ' <span class="awaiting-mod">' . (int) $notices_count . '</span>';
// Grading
$indicator_html = ' <span class="awaiting-mod">' . esc_html( (string) $ungraded_count ) . '</span>';

Root cause

The badge uses WordPress core's .awaiting-mod class. On the current top-level/first menu item, core's admin color scheme (colors.css) overrides the bubble background to match the active menu color instead of the accent blue:

#adminmenu li.current a .awaiting-mod { color: #fff; background-color: rgb(12,12,12); }

The result is a white number on the near-black active-menu background — no visible pill. Non-current items (e.g. core "Plugins") keep the standard blue bubble.

Steps to reproduce

  1. Have a Sensei badge count > 0 — e.g. a Home notice, or ungraded submissions for the Grading badge.
  2. Navigate to that Sensei menu item (Home or Grading) so it becomes the active menu item.
  3. Observe the badge: the count shows but the blue background bubble is missing. It can also appear/disappear inconsistently when hovering the menu.

Current behavior

Badge renders as a bare number with no background pill when its Sensei menu item is active.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions