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

Code block

OverviewStyleGuidelinesCodeAccessibilityDemos
Keyboard interactionsFocus orderTouch targetsARIA Authoring Practices Guide (APG)Web Content Accessibility GuidelinesKeyboard interactionsFocus orderTouch targetsARIA Authoring Practices Guide (APG)Web Content Accessibility Guidelines

Keyboard interactions

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

Two code blocks showing what happens when hitting tab. See tab order in the table below.
Code block keyboard navigation behavior
Key Result
Tab Moves focus to code numbers and text (if numbers are visible)
Tab Moves focus to the copy to clipboard button and displays a tooltip
Enter Copies code text to clipboard (when copy to clipboard button has focus)
Tab Moves focus to the toggle overflow button or toggle word wrapping button and displays a tooltip
Enter Toggles overflow or word wrapping (when either button has focus)
Tab Moves focus to the Show more button
Enter Expands or collapses code text (when focus is on expand/collapse button)

Focus order

A logical focus order helps keyboard users operate our websites. Elements need to receive focus in an order that preserves meaning, therefore the focus order should make sense and not jump around randomly.

Two code blocks. The first tab stop focuses the code in the code block. The next two tab stops focuses the floating action buttons. The last tab stop focuses the show more expand/collapse button.

Touch targets

All buttons exceed the WCAG Level AA success criteria for target size, which calls for touch targets to be at least 24px by 24px.

A code block with transparent circles overtop of the floating action buttons and the show more button.

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

Automated testing

Some of our elements may receive errors or warnings that are false positives from automated testing tools. If you are experiencing some of these issues, please read our update on false positives in automated tools.

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

© 2026 Red Hat Deploys by Netlify