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
Keyboard navigationFocus orderTouch targetsScreen reader guidelinesARIA Authoring Practices Guide (APG)Web Content Accessibility GuidelinesKeyboard navigationFocus orderTouch targetsScreen reader guidelinesARIA Authoring Practices Guide (APG)Web Content Accessibility Guidelines

Keyboard navigation

Users can navigate to and interact with the scheme toggle using standard keyboard controls:

Key Result
Tab Moves focus into or out of the toggle group
Arrow keys Selects between scheme options

Focus order

The scheme toggle receives focus as a single group. Once focused, arrow keys select between the three options (light, dark, system) in logical order. The focus indicator clearly shows which option is currently selected.

Touch targets

All interactive elements meet minimum touch target requirements:

  • Each radio button option provides adequate touch area
  • Icons labels are sized appropriately for touch interaction

Screen reader guidelines

The scheme toggle communicates clearly to assistive technology:

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, system)
  • Current selection state
  • Changes when selection is made

Implementation details

  • legend-text attribute provides the fieldset legend (default: "Color scheme")
  • 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

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.

Other libraries

To learn more about our other libraries, visit the getting started page.

© 2025 Red Hat Deploys by Netlify