Skip to content

spp_dci_compliance: security-warning systray item — contrast, keyboard navigation, stale badge #529

Description

@gonzalesedwin1123

Follow-ups from the PR #527 UX review of the DCI security-warning systray item (spp_dci_compliance/static/src/components/security_warning/). None is a regression; the item simply never rendered on Odoo 19 before #527, so this is its first UX pass. All out of scope for a bug-fix PR.

  1. Navbar icon contrast. security_warning.xml uses fa-exclamation-triangle text-danger on the dark navbar. Sampled against the navbar blue the contrast ratio is roughly 1.25:1, far below the 3:1 WCAG 1.4.11 minimum for meaningful graphics; the icon is distinguishable by hue only, which docs/principles/ui-design.md calls out. Odoo core does it the other way round: white systray icon, coloured counter badge. Drop text-danger from the icon and let the text-bg-danger pill carry severity.
  2. Keyboard navigation. DropdownItem is imported and registered but never used; the "View DCI Settings" call-to-action is a bare <button> inside the dropdown panel with no arrow-key handling and no close-on-select. Make it a DropdownItem.
  3. Stale badge. Warnings load once in onWillStart and nothing re-fetches, so after an administrator turns a setting off the badge keeps the old count until a full reload (the e2e spec has to reload to observe the change). Cheapest fix: this.actionService.doAction({...}, {onClose: () => this.loadWarnings()}).
  4. Polish: state.message is fetched and never rendered; heading reads singular "DCI Security Warning" while listing several; inline style="min-width: 350px; max-width: 450px;" belongs in a .scss; every <li> carries border-bottom including the last, doubling the panel divider; toggler mixes fa-exclamation-triangle while rows use fa-warning.
  5. Architecture (optional): the item costs one JSON-RPC round trip per backend page load for administrators. Shipping the summary in session_info would remove the request and keep the group gate in one place.

Refs: #450, #527 (review notes in the internal workspace, pr527-expert-review.md).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions