feat: RCT inline abbreviation tooltip on verdict legend strip (v2.2.1)

- Add abbrs field to Established verdict taxonomy item
- Add peptide_starter_render_desc() helper — builds safe HTML from
  esc_html/esc_attr components; replaces abbr terms with <abbr> tap-targets
- Update front-page.php description output to use render_desc()
- Add assets/js/abbr-tooltip.js — popover open/close, outside-click
  dismissal, keyboard accessibility (Enter/Space/Escape), ARIA attrs
- Enqueue abbr-tooltip.js on is_front_page() only
- Add .pr-abbr and .pr-abbr-popover CSS with dashed underline affordance,
  fade-in animation, dark-mode-safe surface variables
- Fix PEPTIDE_STARTER_VERSION drift: 2.0.0-alpha.3 → 2.2.1

Routing note: this is a theme change (not PR Core). Term 'RCT' is scoped
to the verdict legend strip only; monograph bodies are unaffected.
This commit is contained in:
peptiderepo
2026-04-29 06:23:15 +00:00
parent bdc3ace6cf
commit 4b7f79efb6
6 changed files with 266 additions and 4 deletions

View File

@@ -101,7 +101,7 @@ $featured_monograph_ids = array( 211, 36, 177 );
<span class="pr-verdict__glyph" aria-hidden="true"><?php echo esc_html( $v['glyph'] ); ?></span>
<span class="pr-verdict__label"><?php echo esc_html( $v['label'] ); ?></span>
</span>
<p class="hero-verdict-explainer__desc"><?php echo esc_html( $v['description'] ); ?></p>
<p class="hero-verdict-explainer__desc"><?php echo peptide_starter_render_desc( $v['description'], $v['abbrs'] ?? array() ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- output is built from esc_html/esc_attr components inside render_desc(). ?></p>
</div>
<?php endforeach; ?>
</div>