CodeBlock Accessibility Testing
This page demonstrates the CodeBlock component for Lighthouse accessibility auditing. Multiple code block configurations are shown to test various accessibility features.
import CodeBlock from '../../../CodeBlock/CodeBlock' import { CodeBlockVariant, DiffLineType } from '../../../CodeBlock/types' const CodeBlockLightHouse = () => { return (
This page demonstrates the CodeBlock component for Lighthouse accessibility auditing. Multiple code block configurations are shown to test various accessibility features.
Basic code block with line numbers, header, and copy button. All interactive elements have proper ARIA attributes and keyboard navigation support.
Code block without line numbers. Line number gutters are hidden from screen readers with aria-hidden="true".
Code block without header. The main region has aria-label describing the code block.
Code block without copy button. Code content is still focusable for scrolling and selection.
Diff view showing removed, added, and unchanged lines. Each side has proper role="group" with aria-label ("Removed code", "Added code").
Code blocks support syntax highlighting for various programming languages. All variants maintain accessibility standards.