Icon button name
Keep a text label available to assistive technology when only an icon is visible.
Components / Utilities
Visually hide text while keeping it available to assistive technology.
Keep a text label available to assistive technology when only an icon is visible.
Add a short explanation that visual layout already conveys.
<button type="button">
<Icon aria-hidden="true" />
<VisuallyHidden>Open settings</VisuallyHidden>
</button>A text node can name a button without displaying a second visible label.
<script setup lang="ts">
import VisuallyHidden from './components/ui/visually-hidden/VisuallyHidden.vue'
</script>
<template>
<button type="button"><span aria-hidden="true">×</span><VisuallyHidden>Close panel</VisuallyHidden></button>
</template>A hidden caption keeps table context without consuming visual space.
<script setup lang="ts">
import VisuallyHidden from './components/ui/visually-hidden/VisuallyHidden.vue'
</script>
<template>
<table><caption><VisuallyHidden>Quarterly revenue by region</VisuallyHidden></caption>
<thead><tr><th scope="col">Region</th><th scope="col">Revenue</th></tr></thead>
<tbody><tr><th scope="row">North</th><td>€120,000</td></tr></tbody>
</table>
</template>The most useful props, models, slots, events, and methods for this component.
| Name | Type | Default or requirement |
|---|---|---|
as | span | div | span |
focusable | boolean | false |
Set focusable only when the hidden content itself must enter the tab order.