Skip to content

1.x-1.2.0

Latest

Choose a tag to compare

@albanycomputers albanycomputers released this 17 Aug 13:28
3c4d7c4

BREAKING (display only) — markup contract

This release changes the markup of system messages. It does not change any
API, hook, configuration key or stored data, and the module renders correctly
without any action on your part. But if you have custom CSS or JavaScript
targeting .messages in order to style or script this module's output, it will
stop matching and your customisation will silently stop applying.
Nothing
errors; the styling simply disappears. Check for it before updating.

  • The messages class has been removed from message markup. Messages now
    carry only their severity class and message-popover-item. Core's
    messages.theme.css and theme stylesheets target div.messages.status:before
    at a higher specificity than this module could use, painting a second icon
    onto the severity strip and overriding its colour. Anything selecting
    .messages to style or script this module's output will need updating.

Added

  • Layout toggle button on every message, switching the set between the stacked
    list and a compact cascade, for batches too tall to fit on screen (#11).
  • Hold button pausing auto-dismiss for all messages, plus automatic pausing
    while a message is hovered or focused.
  • Screen position setting: Left, Centre or Right, with a pixel offset. For
    Centre the offset is a signed shift, so messages can sit off-centre. Messages
    are always clamped to stay fully on screen regardless of the offset, the
    message width, or the window being resized.
  • Movement is now animated when the stack re-flows, respecting
    prefers-reduced-motion.

Fixed

  • Warning and error icons did not render. Both referenced Font Awesome
    names (exclamation-triangle.svg, exclamation-circle.svg) that do not
    exist in Backdrop core, which ships Phosphor icons. Now warning.svg and
    warning-circle.svg. The error icon had been blank since the icons were
    introduced.
  • A second, larger icon appeared over the severity strip, from core's own
    message styling. Resolved by dropping the messages class (above).
  • Severity strip colours were being overridden by the theme. Warning and
    error strips rendered in the theme's colours rather than the module's.
  • Messages could stack off the bottom of the screen and be unreachable
    (#11). Popovers render in the browser top layer and cannot be scrolled to.
    Messages are now capped to the viewport height and scroll internally, and the
    cascade layout is available for long runs of messages. Note that errors and
    long messages never auto-dismiss, so a form failing validation on several
    fields was a common way to hit this.
  • Gaps were left in the stack when a message was dismissed (#11). Closing a
    message above did not bring the ones below it back up. Remaining messages now
    close up.
  • Dragged messages are no longer pulled back into the stack when an unrelated
    message is dismissed.

Accessibility

  • Header strip raised from 14px to 24px so all header buttons meet the WCAG 2.2
    AA minimum target size of 24×24 (2.5.8). The close button previously did not.
  • Visible keyboard focus styling on all header buttons; the close button
    previously had none.
  • Auto-dismiss pauses on keyboard focus as well as hover, so a message
    containing a link cannot fade while it is being tabbed through.
  • The hold button reports state via aria-pressed.
  • Links within messages remain underlined, preserved from the core styling
    dropped with the messages class.