Skip to content
UX Platform
Change the site theme

Screen Reader Only

Utility for visually hiding content to provide an accessible experience for users of assistive technology.

Code ready:
Code done
Design assets:(n/a)
Documentation done
Peer review:
Peer review done
Import from
@twilio-paste/core/screen-reader-only — or — @twilio-paste/screen-reader-only


About Screen Reader Only#

The Screen Reader Only component should be used to visually hide content that is necessary to provide appropriate context to users who experience a page using assistive technology.

When wrapped with the Screen Reader Only component, content is visually hidden but still available to assistive technology. This can be useful when information or relationships between UI controls are only communicated visually. By being able to visually hide some content you are able to provide clarifying information to non-sighted users without adding redundancy to the visual design.


Providing visually hidden headings to sectioned content#

All sectioning elements, such as Cards, should contain a heading to provide a clear document outline and form of navigation to assistive technology users. However, there may be times a heading is not required (or even redundant) in a particular UI for sighted users. By using the Screen Reader Only component you can provide a visually hidden heading to give additional context and heirarchy. In the example below, we've added "Flex" as a heading that is accessible to assistive technology, but hidden visually.


Deploy an omnichannel contact center within minutes and customize every element of the experience, including the agent desktop, channels, interaction routing, and reporting using common web frameworks like React.js and REST APIs.

View all projects

Providing clear actions while still reducing visual repetition#

Each column in a table is required to have a column header. Sometimes those column headers can be visually hidden from sighted users if desired. To do so use the Screen Reader Only component to hide the cell content for that column header.

Another common use case is for providing correct context to repetitive actions. In the example below, the "Buy" button is clearly visually associated with the phone number via row highlighting. However, to a screen reader user, this association may not be as clear. To provide additional clarification we can add what you would be buying (Buy ) as visually hidden text to the button. This way, we can keep the same level of context for all users.

NumberTypeMonthly FeeActions
+1 (903) 603-9469
Mabank, TX
+1 (470) 309-0026
Adairsville, GA
+1 (484) 662-4088
Hamburg, PA

When to use Screen Reader Only#

Use the Screen Reader Only component when you are required to provide additional or contextual information to a screen reader user which a sighted user maybe able to infer and when you cannot do so via semantic HTML.


Use to provide additional text content to users of assistive technology


Don't use to hide interactive content

Usage Guide#



yarn add @twilio-paste/screen-reader-only - or - yarn add @twilio-paste/core


import {ScreenReaderOnly} from '@twilio-paste/screen-reader-only';
const Component = () => (
<Button variant="secondary" size="small">
Buy <ScreenReaderOnly>+1 (484) 662-4088</ScreenReaderOnly>

All the regular HTML attributes (role, aria-*, type, and so on) including the following custom props:

as?keyof JSX.IntrinsicElementsA custom HTML tagspan

Black lives matter.