Component Contract

Social / Share Links

A group of Icon Buttons — for linking to CAAT's social profiles, or sharing the current page.

Live Demo

Social profiles (brand-coloured)

Rendered

Hover fills with the platform's brand colour.

Share this page (neutral)

Rendered

1. Summary

Component nameSocial / Share Links
AEM resource typecaat/components/social-links
TierComposite (molecule) — composes Icon Button
PurposeA horizontal group of Icon Buttons for (a) linking to CAAT social profiles or (b) sharing the current page.
VariantsSocial profiles (brand) · Share actions (outline)
Status New
Replaces.caat-footer-social (navigation) + .caat-article__share-btn (article) — two prior copies

Composed of

This is a composite: it composes Icon Button and adds layout + per-platform brand colours. It does not restyle the control. (See docs/design-system-recommendations.md §F.)

ConstituentRoleStatus
Icon ButtonEach social/share affordance (--circle + --brand or --outline)✓ has page · composed

2. Design Tokens

TokenRole
(inherits all Icon Button tokens)Control styling
--caat-icon-btn-brandSet per platform via .caat-social--linkedin, .caat-social--youtube, etc.

Platform brand colours (LinkedIn #0a66c2, YouTube #ff0000, etc.) are external brand constants, not design tokens — defined in social-links.css.

3. Authoring Fields

FieldTypeRequiredNotes
ModeSelectYesSocial profiles · Share this page
Links (social mode)MultifieldYesPer item: platform + URL. Brand colour auto-set by platform.
Share targets (share mode)Multi-checkboxYesLinkedIn, X, Email, Copy link

4. Validation Rules

No author-managed content beyond an accessible label, so there are no authoring validation rules. Accessibility requirements are covered in Section 8 (Accessibility).

5. Content Guidance

  • Social profiles use brand colours and open in a new tab (external).
  • Share uses neutral outline buttons and shares the current page.
  • Order social platforms by audience priority (LinkedIn first for CAAT).
  • Keep to ≤ 5 items to avoid a cluttered row.

6. Semantic HTML

<!-- Social profiles -->
<div class="caat-social-links">
  <a href="…" class="caat-icon-btn caat-icon-btn--circle caat-icon-btn--brand caat-social--linkedin"
     aria-label="CAAT on LinkedIn (opens in a new tab)" target="_blank" rel="noopener">
    <i class="bi bi-linkedin" aria-hidden="true"></i>
  </a>
</div>

<!-- Share this page -->
<div class="caat-social-links" role="group" aria-label="Share this article">
  <a href="…" class="caat-icon-btn caat-icon-btn--circle caat-icon-btn--outline" aria-label="Share on LinkedIn">…</a>
  <button type="button" class="caat-icon-btn caat-icon-btn--circle caat-icon-btn--outline" aria-label="Copy link">…</button>
</div>

7. CSS Contract

SelectorPurpose
.caat-social-linksFlex row wrapper (gap, wrap)
.caat-social--linkedin / .caat-social--youtube / .caat-social--facebook / .caat-social--x / .caat-social--instagramSet --caat-icon-btn-brand on a child Icon Button
(control)Provided by .caat-icon-btn

8. Accessibility

RequirementImplementation
Group semanticsShare group uses role="group" + aria-label="Share this …".
Per-item labelEach Icon Button has an aria-label naming the platform/action; external links note "(opens in a new tab)".
Keyboard / focusInherited from Icon Button — focusable, :focus-visible ring.
ColourBrand hover fills (white-on-brand) verified ≥ 3:1 for the icon glyph.

9. SEO

Transient / structural UI with no indexable content of its own — no SEO markup required. Ensure any content this component wraps or reveals stays server-rendered and crawlable.

10. Analytics

Analytics are captured through the shared data-analytics-component attribute on the component root (emitted automatically) and reported to the central data layer. Event names and payloads follow the organisation's standard analytics schema — defined centrally with the analytics team, not invented per component — so no bespoke tracking is specified here.

11. AEM Implementation Notes

  • Resource type: caat/components/social-links; delegates each item to caat/components/icon-button.
  • Sling model exposes mode and a list of items (platform, url) or share targets.
  • Brand colour is derived from the platform value — authors don't pick colours.

12. Dialog Model (cq:dialog)

Not authored directly. The social links is a sub-element emitted and configured by its host component (or generated from page structure), so it has no standalone cq:dialog — any options are exposed through the host component's dialog.

13. QA Checklist

#CheckPass?
1Each link/button is an Icon Button with an aria-label
2Social mode applies correct brand colour + new-tab
3Share mode is neutral outline; Copy link is a <button>
4Keyboard focus ring visible on every item
5No bespoke share/social CSS remains in article or navigation

14. Definition of Done

  • Composes Icon Button — no reimplemented control styling.
  • article-layout and navigation refactored to consume it (duplication removed).
  • Both modes accessible; external links labelled + rel="noopener".
  • QA checklist signed off.