FIND YOUR NEXT FEW LINES

Results for “focus”

Small, practical examples. Search by task or narrow things down below.

11 snippets foundClear filters
ReactRefs & DOM interaction

Focus an input through a ref

Focus an input through a ref with a small React component and explicit browser behavior.

React✓ Tested
AngularEvents & DOM interaction

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
CSSInteraction selectors

Highlight a group containing keyboard focus

CSS: Focus-within matches a parent when any descendant has focus.

CSS✓ Tested
CSSGetting Started

Make keyboard focus visible

CSS: Learn how to make keyboard focus visible in a complete browser example.

CSS✓ Tested
HTMLAccessible structure

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
CSSInteraction & themes

Show keyboard focus

Use a visible CSS outline when an input receives keyboard focus.

CSS✓ Tested
jQueryEvent control

Validate a field when focus leaves it

jQuery: focusout bubbles and can support delegated form validation.

jQuery✓ Tested
AngularEvents & DOM interaction

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
GitCommits & history

Commit a staged change

Save a focused revision with a descriptive message.

commit✓ Tested
HTMLNative disclosure & dialogs

Dismiss a modal with the Escape key

HTML: Native modal dialogs provide keyboard dismissal and return focus to their invoker.

HTML✓ Tested
HTMLLinks & accessibility

Provide a skip link

Let keyboard users jump directly to focusable main content.

HTML✓ Tested