Skip to content

Latest commit

 

History

History
28 lines (19 loc) · 774 Bytes

File metadata and controls

28 lines (19 loc) · 774 Bytes

Disclosure

A native-first disclosure pattern using <details> and <summary>.

Example

<details>
    <summary>Shipping information</summary>
    <div>
        <p>Ships in 2–3 business days.</p>
    </div>
</details>

Behavior

  • <summary> acts as the built-in control for toggling the disclosure.
  • The browser manages the open state and accessibility semantics.

Accessibility Notes

  • Write summary text that clearly describes the hidden content, not generic labels such as "More" without context.

Further Reading