Skip to content

Remove duplicate document descriptions in rulemaking template #7041

@patphongs

Description

@patphongs

Summary

What we're after:
When displaying documents in the rulemaking template, prevent showing the doc_description field when it is redundant with the doc_type_label (document label). This eliminates redundant information where users see the same or similar text displayed twice.

Examples of redundancy to hide:

  • Exact match: "Vote to Approve" (label) vs "Vote to Approve" (description)
  • Plural variation: "Interim Final Rules" (label) vs "Interim Final Rule" (description)
  • Substring match: "Draft Interim Final Rules and/or Explanation and Justification" (label) vs "Draft Interim Final Rule" (description)

Action items

  • Description is hidden when it matches the label using any of these criteria:
  • Exact match: Case-insensitive, whitespace-trimmed comparison
  • Plural variation: "Rules" vs "Rule" treated as matching
  • Substring match: Description appears within label after normalizing plurals (e.g., "Draft Interim Final Rule" is contained in "Draft Interim Final Rules and/or Explanation and Justification")
  • The description line is placed in its own HTML element and is hidden when there's a match
  • Applies to all document types across the rulemaking template:
    • Level 1, 2, and 3 documents
    • Comment documents (single commenter)
    • Comment documents (joint comments)
  • No duplicate or redundant text appears on rulemaking pages like /legal/rulemakings/2020-03/ or /legal/rulemakings/2018-06/

Completion criteria

  • No duplicate or redundant document descriptions are displayed for rulemaking documents

Metadata

Metadata

Type

No type

Projects

Status

📥 Assigned

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions