Skip to content

content/placeholder-text: inspect <title> for stringified values #215

Closed

Description

@nc9

content/placeholder-text reads <body> only, so <title>undefined | Acme</title> is never inspected. A broken title is one of the most common shipped JavaScript artifacts, and it is the one users see in search results and browser tabs.

Needs a decision on ownership first: core/meta-title already judges the title, so the check may belong there rather than in a content rule that is otherwise page-body scoped.

Acceptance Criteria

  • A page whose <title> contains a standalone undefined, null, NaN or [object Object] is reported by exactly one rule.
  • A title that legitimately discusses those words, such as MDN's undefined - JavaScript | MDN, is not reported.
  • The owning rule's docs page states which rule covers the title.

Follow-up from #214.

Activity

  1. added
    enhancement
    rules
    P3
    size: S
    on Sep 23, 2026
  2. nc9 commented on Oct 11, 2026

    @nc9
    ContributorAuthor

    Reproduced on 0.0.108 with a local fixture: a page with <title>undefined | Acme Widgets and Supplies Store</title> and a clean body, audited with every rule, has no finding that mentions the title value. The control with <h1>undefined</h1> gives content/placeholder-text, check placeholder-content, warn, 1 placeholder occurrence(s) in visible text: JavaScript value in copy (undefined).

    origin/main is the same: packages/rules/src/content/placeholder-text.ts reads only the body, and packages/rules/src/core/meta-title.ts checks only presence and length.

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

    P3enhancementrulessize: S

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions