0
0
HTMLmarkup~5 mins

Keyboard navigation basics in HTML - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is keyboard navigation in web development?
Keyboard navigation allows users to move through a webpage using only the keyboard, typically with keys like Tab, Shift+Tab, Enter, and arrow keys.
Click to reveal answer
beginner
Which key is commonly used to move focus to the next interactive element on a webpage?
The Tab key moves the keyboard focus to the next interactive element, such as links, buttons, and form fields.
Click to reveal answer
intermediate
What attribute helps control the order of keyboard focus on elements?
The tabindex attribute controls the order in which elements receive keyboard focus. Positive values set custom order, 0 follows natural order, and -1 removes from tab order.
Click to reveal answer
beginner
Why is keyboard navigation important for accessibility?
Keyboard navigation is essential for users who cannot use a mouse, such as people with motor disabilities or those who rely on screen readers. It ensures everyone can access and use the website.
Click to reveal answer
intermediate
How can you make a non-interactive element focusable by keyboard?
Add tabindex="0" to the element. This includes it in the natural tab order so users can reach it with the keyboard.
Click to reveal answer
Which key moves focus backward to the previous interactive element?
ATab
BSpace
CEnter
DShift + Tab
What does tabindex="-1" do to an element?
AMakes it focusable in tab order
BRemoves it from keyboard tab order but allows focus programmatically
CSets it as the first element to focus
DDisables the element
Which HTML elements are naturally focusable by keyboard by default?
A<div> and <span>
B<header> and <footer>
C<button> and <a href>
D<p> and <section>
Why should you avoid using positive tabindex values to reorder focus?
AIt can confuse keyboard users and cause inconsistent navigation
BIt disables keyboard navigation
CIt improves accessibility
DIt makes elements invisible
Which key typically activates a focused button or link?
AEnter
BEscape
CTab
DArrow keys
Explain how keyboard navigation works on a webpage and why it is important.
Think about how you move through links and buttons without a mouse.
You got /4 concepts.
    Describe how the tabindex attribute affects keyboard navigation and give examples of its values.
    Consider how you can control which elements get keyboard focus and in what order.
    You got /4 concepts.