Changed
Context
Core issue View on Drupal.org #867830#867830: "Unpublished" style of rendered entities is not accessible (and looks bad) Status: Active proposes the following:
- a visible "Unpublished" marker on nodes and comments, with context for screen readers;
- a status that does not rely on background color and still reads in forced-colors mode;
markersvariables fromtemplate_preprocess_node()andtemplate_preprocess_comment();mark.html.twiggets a textstatusplus atype, and theMARK_NEW,MARK_UPDATEDandMARK_READconstants are removed.
The work is on the issue fork branch 867830-unpublished-style-of, last pushed in July 2025. The latest comments (November 2026) lean towards a plain text label rather than a colored "warning".
Before this task, mantra_starter replaced core's pink background with a gray fill from --color-unpublished (libraries/drupal/unpublished.css), and did nothing else:
- no text label and nothing for screen readers;
- no forced-colors rule;
- unpublished comments got a class that nothing styled;
mark.html.twigusedconstant('MARK_NEW'), which throws once core removes the constants.
Done
TODO
Questions
- Should published-but-moderated states (draft, in review) get the same label? This follows comment 16851087 on the core issue.