Results for “focus”
Small, practical examples. Search by task or narrow things down below.
Focus an input through a ref
Focus an input through a ref with a small React component and explicit browser behavior.
React✓ Tested
Focus an input through its template reference
Focus an input through its template reference with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Highlight a group containing keyboard focus
CSS: Focus-within matches a parent when any descendant has focus.
CSS✓ Tested
Make keyboard focus visible
CSS: Learn how to make keyboard focus visible in a complete browser example.
CSS✓ Tested
Move focus to a heading without adding a tab stop
HTML: A negative tabindex permits programmatic focus while keeping the heading out of ordinary sequential tab navigation.
HTML✓ Tested
Show keyboard focus
Use a visible CSS outline when an input receives keyboard focus.
CSS✓ Tested
Validate a field when focus leaves it
jQuery: focusout bubbles and can support delegated form validation.
jQuery✓ Tested
Validate a field when focus leaves it
Validate a field when focus leaves it with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Commit a staged change
Save a focused revision with a descriptive message.
commit✓ Tested
Dismiss a modal with the Escape key
HTML: Native modal dialogs provide keyboard dismissal and return focus to their invoker.
HTML✓ Tested
Provide a skip link
Let keyboard users jump directly to focusable main content.
HTML✓ Tested