A React tooltip component from Radix UI Primitives, part of an open-source UI component library for building high-quality, accessible design systems and web apps
Overall
score
96%
Build a keyboard-accessible help system component that displays contextual help information for form inputs. The system should be fully navigable using only keyboard controls (Tab, Shift+Tab, and Escape keys) and should meet accessibility standards for screen reader users.
Create a HelpfulInput component that wraps a form input field with contextual help. The help information should:
The component must be accessible to screen reader users:
@generates
import React from 'react';
export interface HelpfulInputProps {
/** The label for the input field */
label: string;
/** The help text to display when the input is focused */
helpText: string;
/** The input placeholder text */
placeholder?: string;
/** The input name attribute */
name: string;
}
/**
* A form input component with keyboard-accessible contextual help.
* Shows help information when the input receives focus via keyboard navigation.
*/
export function HelpfulInput(props: HelpfulInputProps): React.ReactElement;Provides accessible tooltip components with keyboard navigation support.
Install with Tessl CLI
npx tessl i tessl/npm-radix-ui--react-tooltipevals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10