Skip to content
Focsd homeFocsd homeFocsd
Forms

Visually hidden

Text for screen readers only.

  • Tag: focsd-visually-hidden
  • Pattern: SR-only
  • Category: Utility

Example

Total (including tax) €120

HTML
<p>Total <focsd-visually-hidden>(including tax)</focsd-visually-hidden> €120</p>

Usage

Import the module once, then use the tag like any HTML element. Every framework below renders the same element; see Frameworks for setup.

<script type="module">
import '@focsd-dev/components/focsd-visually-hidden.js';
</script>
<focsd-visually-hidden>(including tax)</focsd-visually-hidden>

API

Slots

SlotDescription
(default)Default content.

Accessibility

  • Hidden visually, still read. Becomes visible when focus is inside it.