Skip to content

Glossary: JavaScript in the Browser

Focus

Also written: focus(), tabindex, tabindex="-1", :focus-visible

The element that receives keyboard input. Calling focus() moves it, and tabindex="-1" lets a heading take focus from code without joining the Tab order.

Where the book teaches it

Related terms

Accessibility