Problem/Motivation

The per-node audit page (/node/{nid}/content-first-audit) rendered by NodeAuditController shows only a flat count per check (e.g., "3" for empty blocks or "2" for missing alt attributes). This gives editors no actionable detail: they cannot tell which images are missing their alt attribute, nor which block-level tags are empty. The report is accurate but not useful enough to act on without manually inspecting the page.

Proposed resolution

  • Empty block breakdown. Extend EmptyBlockTagCheck (and its storage/display layer) to return a per-tag breakdown rather than a single integer. For example, instead of "5", the report should show "3 <p>, 2 <div> are empty". The AuditFields format callable and the table row in NodeAuditController should be updated to render this structured detail.
  • Affected images detail. For the missing_alt_count and empty_alt_count checks, capture the src (and, where present, the surrounding context such as a file name) of each offending <img>; element.
    Display these as an expandable list or a sub-row in the node audit table so editors can identify and fix the specific images.
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

eduardo morales alberti’s picture

StatusFileSize
new184.73 KB
new38.24 KB
new39.94 KB
new56.43 KB

Issue node details Page:
Issue details
Empty blocks:
Empty blocks
Missing alt:
Missing alt
Empty alt, invalid headings:
Empty alt and invalid headings

eduardo morales alberti’s picture

Status: Active » Needs review

Ready to review

lpeidro made their first commit to this issue’s fork.

lpeidro’s picture

Status: Needs review » Reviewed & tested by the community

The functionality works as expected. We applied two changes to the cache configuration:

  • Purge the overview table when a node is deleted.
  • Remove the content_first_audit:overview cache tag from NodeAuditController. It was invalidating every Node Audit cache entry whenever any node was updated.

It is ready to merge.

eduardo morales alberti’s picture

Status: Reviewed & tested by the community » Fixed

Fixed and merged!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.