Text screen readers read and the screen doesn't show, such as "per month" for a price shown as "$29 / month", or a word that finishes a sentence an icon starts. For a control's name, prefer the control's own Label.
Words for screen readers
Put words only screen readers need in a VisuallyHidden, such as "per month" for a price shown as "$29 / month", and hide the visible slash with aria-hidden. For a skip link, set Focusable, and it shows while it has focus.
Mode support
| Feature | Static | Interactive |
|---|---|---|
| Everything | Yes | Yes |
Static: static server-side rendering, with no circuit and no WebAssembly. Interactive: Server, WebAssembly or Auto.
Accessibility
Parameters
| Prop | Type | Default |
|---|---|---|
AsThe element: span by default, so it fits inside text; div or h2 for a block or a hidden heading. | string | "span" |
FocusableShows it while it or anything in it has focus, such as a skip link. | bool | false |
ChildContentThe text, or the elements, to hide. | RenderFragment? |
Plus 4 common props.
Full APISee also
- TextBlock: sets paragraphs, captions and labels in the library's text styles.
- Heading: renders headings 1 to 6, with fluid sizes and section links.
- Blocks that use it: Pricing.