Skip to content

Filter pill standardization — Part A & B #22

@lukefretwell

Description

@lukefretwell

Part A — Shared filter-pill.html include

  • Added components/_includes/filter-pill.html: a single-<li> partial that renders one filter pill from {% set %} variables (pillTitle, pillUrl, pillIcon, pillIconTitle, pillActive, pillId, pillExtraClass)
  • Synced to standards, scangov, docs, scangov-com
  • Refactored 7 call sites to use {% set %} + {% include "filter-pill.html" %}:
    • standards/_includes/filter.html
    • standards/_includes/filter-guidance.html
    • standards/content/docs/standard.njk (Indicators)
    • standards/content/docs/guidance.njk (Indicators)
    • components/_includes/post-badges.html (synced to docs/standards)
    • scangov/_includes/rankingtabs.html (second <ul>)
    • scangov/_includes/jumbotron.html (both <ul>s in mapPage block)
  • Added pillIconTitle (not in original plan) to preserve the title="{{ audit.displayName }}" tooltip on the topic icons in filter.html/filter-guidance.html — keeps output byte-identical aside from the icon swap below

Part B — Topic icon updates

  • data/standards/audits.json: usability.icon rectangle-listhand-pointer, security.icon lockshield-halved
  • Single source of truth via audits.js — propagates automatically to filter pills, Indicators sections, sidenav, and rankings/map pills
  • Out of scope (flagged, pre-existing inconsistency): scangov/_includes/profilelinks.html has its own hardcoded icons for security/usability, left untouched

Verification

  • standards dev server: /, /guidance/, /crawlable/ — markup unchanged, icon tooltips preserved
  • scangov full build: /rankings/accessibility/, /map/states/overall/ — confirmed fa-hand-pointer/fa-shield-halved render correctly via audits[topic].icon

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions