Add html preprocessing for the message.

Created on 30 June 2025, 12 days ago

Problem/Motivation

USWDS requires some additional classes on links, paragraphs and lists that appear in messages in the alert.
✨ Create USWDS Alert single directory component Active stubbed out a method "preprocessMessage()" in src/Controller/UswdsAlertsDataController.php to do this but did not do the actual work.

This ticket should get that completed

Acceptance Criteria

  1. When a paragraph is created as a message for the alert, add "usa-alert__text" class to any p elements.
  2. When a list is created as a message for the alert, add "usa-list" class to ul and ol elements.
  3. When links appear in a message for the alert, add "usa-link" class to any a elements.

Proposed resolution

Remaining tasks

Steps to reproduce

πŸ› Bug report
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States swirt Florida

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024