Skip to main content Home
About About the Design SystemRoadmap
Get started OverviewDesignersDevelopers
Foundations OverviewColorGridIconographyInteractionsSpacingTypography
Tokens Overview Global colorbox shadowTypographyborderopacityspacelengthIconBreakpointsMedia Queries
Elements All elements Accordion Alert Announcement Audio player Avatar Back to top Badge Blockquote Breadcrumb Button Card Chip Code block Call to action Dialog Disclosure Footer Health index Icon Jump links Navigation (primary) Navigation (secondary) Pagination PopoverPlanned Progress stepper Scheme toggle Site status Skeleton Skip link Spinner Statistic Subnavigation Surface Switch Table Tabs Tag Tile Timestamp Tooltip Video embed
Theming OverviewColor PalettesCustomizingDevelopers
Patterns All PatternsCardFilterFormLink with iconLogo wallSearch barSticky bannerSticky cardTabsTagTile
Personalization All Personalization PatternsAnnouncement
Accessibility FundamentalsAccessibility toolsAssistive technologiesCI/CDContentContributorsDesignDevelopmentManual testingResourcesScreen readers
Design/code status Release notes Get support

Scheme toggle

OverviewStyleGuidelinesCodeAccessibilityDemos
Screen reader guidelinesKeyboard navigationFocus orderTouch targetARIA Authoring Practices Guide (APG)Web Content Accessibility GuidelinesScreen reader guidelinesKeyboard navigationFocus orderTouch targetARIA Authoring Practices Guide (APG)Web Content Accessibility Guidelines

Screen reader guidelines

A scheme toggle communicates the following clearly to assistive technology:
Parameter Details
Semantic Structure
  • Uses <fieldset> and <legend> for proper grouping
  • Radio buttons provide standard form control semantics
  • Each option has both visible tooltips and visually-hidden labels in addition to the icon labels
Information conveyed
  • The purpose of the control (color scheme selection)
  • Available options (light, dark, and system default)
  • Current selection state
  • Changes when selection is made
Implementation details
  • legend-text attribute provides the fieldset legend (Color scheme: is the default)
  • Each radio button has a title attribute for tooltips
  • Visually-hidden spans provide accessible labels for each option
  • Screen readers announce both the group purpose and individual option labels

Keyboard navigation

Users should have the ability to move focus to each color scheme button using a keyboard.

Three scheme toggles with purple block labels below saying 'Tab' and 'Right arrow' twice as the selected state moves from left to right.
Key Result
Tab Moves focus inside or outside of the toggle group
Right arrow Selects the next color scheme
Left arrow Selects the previous color scheme

Focus order

The scheme toggle receives focus as a single group. Once focused, left and right arrow keys select between the three schemes in logical order.

Three scheme toggles left to right inidcating how focus changes when pressing the right arrow. Focus move from light to dark to system.

Touch target

All interactive elements meet minimum touch target requirements.

A scheme toggle with an orange circle overlaid on top of the dark button, slightly passing the button's borders.

ARIA Authoring Practices Guide (APG)

Learn to use the accessibility semantics defined by the Accessible Rich Internet Application (ARIA) specification to create accessible web experiences.

View APG resources

Web Content Accessibility Guidelines

Understanding documents provide detailed explanations for Web Content Accessibility Guidelines (WCAG) guidelines and success criteria.

© 2025 Red Hat Deploys by Netlify