Accessibility Junior cheat sheet: interview answers
Every question of this level with its correct answer and explanation, on one page for a quick review before the interview.
1. What does web accessibility (a11y) mean?
Correct answer: People can use a site whatever their abilities or devices
Accessibility means people with visual, hearing, motor or cognitive disabilities can perceive, understand and operate the site. "a11y" is a shorthand: a, 11 letters, y.
2. Who benefits from accessible interfaces?
Correct answer: Everyone, including people with temporary limits
A broken arm, bright sunlight or a noisy train create the same barriers as permanent disabilities. Captions, contrast and keyboard support help all of those people.
3. What is WCAG?
Correct answer: The W3C guidelines for making web content accessible
The Web Content Accessibility Guidelines define testable success criteria. Version 2.2 is the current W3C Recommendation, and laws and contracts often refer to it or to 2.1.
4. What are the four WCAG principles?
Correct answer: Perceivable, Operable, Understandable, Robust
Known as POUR. Users must be able to perceive content, operate the interface, understand it, and rely on it working with assistive technologies.
5. Which WCAG conformance level do most laws and companies target?
Correct answer: Level AA
A is the minimum, AAA is very strict and not achievable for all content. AA is the usual target in regulations and contracts.
6. What does a screen reader do?
Correct answer: Reads the interface aloud or to a braille display
It works from the accessibility tree the browser builds from your HTML, and users navigate by headings, landmarks, links and form fields, not just top to bottom.
7. Which screen readers are commonly used for testing?
Correct answer: NVDA, JAWS, VoiceOver and TalkBack
NVDA and JAWS run on Windows, VoiceOver on Apple devices and TalkBack on Android. The others listed are checkers or browsers.
8. Why use
<button>rather than<div onclick>?Correct answer: It brings focus, keyboard activation and a role for free
A native button is focusable, works with Enter and Space and is announced as a button. A
divneedstabindex,roleand key handlers to imitate that, and it's easy to get wrong.9. What is wrong with this control?
<div class="btn" onclick="save()">Save</div>Correct answer: Keyboard and screen reader users can't use it properly
A
divisn't focusable, doesn't react to Enter or Space and has no role. Mouse users won't notice, so this bug often survives until someone tests with a keyboard.10. What is the
altattribute of an image for?Correct answer: A text alternative when the image can't be seen
Screen readers announce it, and browsers show it when the image fails to load. A tooltip comes from
title, which is a different attribute.11. What
altshould a purely decorative image have?Correct answer: An empty one:
alt=""An empty
alttells assistive technology to skip the image. Leaving the attribute out is worse: some screen readers then read the file name.12. An image has no
altattribute. What may a screen reader announce?Correct answer: The file name, like
IMG_2041.jpgSome tools try to generate a description, but you can't rely on that. A missing
altis one of the most common errors found on home pages.13. Which
altis best for a chart of sales rising 20% in Q3?Correct answer: Sales rose 20% in Q3
Describe the information the image conveys, not its file or type. Screen readers already announce that it's an image, so "image of" just adds noise.
14. Why does heading order (
h1,h2,h3) matter?Correct answer: Screen reader users jump between headings to navigate
Headings are the page outline. Many screen reader users scan them first, so a logical structure works like a table of contents.
15. You want smaller text. Is it OK to use
h4right afterh1for that?Correct answer: No, pick the level by structure and size it with CSS
Heading level expresses structure, and CSS controls appearance. Skipping levels makes users wonder if they've missed a section.
16. What are landmarks such as
<main>and<nav>?Correct answer: Page regions that users can jump to directly
Screen readers list landmarks so users can go straight to the navigation or main content. Using
<header>,<nav>,<main>and<footer>gives you these for free.17. What does a "skip to content" link do?
Correct answer: Lets keyboard users jump past repeated navigation
Without it, a keyboard user tabs through the whole header on every page. It's usually the first focusable element and appears when focused.
18. How do keyboard users move between interactive elements?
Correct answer: With Tab and Shift+Tab
Tab moves forward and Shift+Tab back. Inside widgets such as tabs or menus, arrow keys usually move between items.
19. Which elements are focusable by default?
Correct answer: Links with
href, buttons and form fieldsInteractive HTML elements are in the Tab order automatically. A link without
hrefis not, which is one reason<a onclick>is a bad button.20. Why is
*:focus { outline: none; }a problem?Correct answer: Keyboard users can no longer see where they are
Focus still moves, but it's invisible, like using a mouse with no cursor. If you remove the default outline, always replace it with a visible style.
21. What does
:focus-visiblehelp with?Correct answer: Showing the focus ring when it's useful, like keyboard use
Browsers apply it based on how focus arrived. Buttons clicked with a mouse don't get a ring, while keyboard users always see one.
22. What does
tabindex="0"do?Correct answer: Adds an element to the Tab order in DOM position
It's for custom widgets that must receive focus. Prefer native elements, which don't need it.
23. What does
tabindex="-1"do?Correct answer: Allows focus from script but skips it when tabbing
It's useful for moving focus programmatically, for example to a dialog or an error summary, without adding a Tab stop.
24. Why avoid positive
tabindexvalues liketabindex="5"?Correct answer: They break the natural order and are hard to maintain
Elements with positive values come before everything else, so focus jumps around the page. Fix the DOM order instead.
25. How do you correctly connect a label to an input?
<label for="email">Email</label> <input id="email" type="email" />Correct answer: Like this:
formatches theidof the inputThe label gives the field its accessible name and enlarges the click target. Wrapping the input inside
<label>also works.26. Why isn't a
placeholdera replacement for a label?Correct answer: It disappears on typing and often has low contrast
Once the user types, the hint is gone, which hurts memory and review. It also isn't reliably announced as a name. Use a visible label and keep the placeholder for examples.
27. What are
<fieldset>and<legend>for?Correct answer: Grouping related fields under a shared label
For a group of radio buttons, the legend gives the question ("Delivery method") and each label gives an option. Screen readers announce both.
28. A form shows an invalid field only with a red border. What's the issue?
Correct answer: Colour alone isn't enough; add a text message too
Colour-blind and screen reader users miss it. Say what's wrong in text next to the field, and link that message to the input.
29. How should you mark a required field?
Correct answer: Use
requiredand show it in the visible label toorequiredis announced by screen readers and triggers native validation. A visible marker with an explanation helps everyone else.30. How does
autocomplete="email"help accessibility?Correct answer: The browser can fill it in, which means less typing
Typing is hard for many people with motor or cognitive disabilities. WCAG asks that fields about the user expose their purpose this way.
31. When should you use a link and when a button?
Correct answer: A link navigates; a button performs an action
Users expect links to go somewhere and to work with Enter and with "open in new tab". Buttons change something on the page and work with Enter and Space.
32. Why is "Click here" poor link text?
Correct answer: Out of context it doesn't say where the link goes
Screen reader users often browse a list of links, so ten "click here" entries are useless. Write what the link leads to, like "Pricing plans".
33. Which contrast ratio does WCAG AA require for normal text?
Correct answer: At least 4.5:1
Low contrast text is the most common error found on home pages. Level AAA asks for 7:1.
34. What minimum contrast applies to large text under WCAG AA?
Correct answer: 3:1
Large means at least 18pt (about 24px), or 14pt bold (about 18.5px). Bigger strokes stay readable at lower contrast.
35. Why shouldn't colour be the only way to convey information?
Correct answer: Not everyone can see or tell apart those colours
About 1 in 12 men has some colour vision deficiency. Add an icon, text or pattern: "Error: ..." and not only red text, underlined links and not only blue ones.
36. Why is
user-scalable=noin the viewport meta tag harmful?Correct answer: It stops low-vision users from zooming the page
Pinch zoom is essential for many people. WCAG requires text to resize to 200% without losing content or function.
37. Why are
remunits often better thanpxfor font sizes?Correct answer: They follow the browser's font size setting
Users with low vision may raise the default font size. Text in
remrespects that, while a size inpxignores it. Browser zoom works for both.38. Why set
langon the<html>element?Correct answer: Screen readers choose the right pronunciation
Without it, Ukrainian text may be read with English rules. Use
langon a smaller element when a phrase is in another language.39. Why does every page need a unique, descriptive
<title>?Correct answer: It's the first thing a screen reader announces
The title identifies the page, especially after navigation. It also labels tabs and history entries, which helps everyone.
40. What is the first rule of ARIA?
Correct answer: Use a native HTML element if one does the job
Native elements come with behaviour built in. ARIA only changes what's announced, and pages with more ARIA tend to have more errors.
41. What does ARIA actually change?
Correct answer: What assistive tech is told, not how the element behaves
ARIA adds roles, names and states to the accessibility tree. It adds no focus, keyboard handling or styling; that's still your job.
42. An icon-only close button has no text. How do you give it a name?
<button> <svg aria-hidden="true">...</svg> </button>Correct answer: Add
aria-label="Close"to the buttonWithout a name, a screen reader only says "button". Visually hidden text inside the button works too, and it's translated by browser tools more reliably.
43. What does
aria-hidden="true"do?Correct answer: Hides an element from assistive tech but not visually
It suits decorative icons. Never put it on focusable content: keyboard users would land on something a screen reader can't describe.
44. Does a screen reader read an element with
display: none?Correct answer: No, it's removed from the accessibility tree
display: noneandvisibility: hiddenhide content from everyone. To hide something only visually, use a visually-hidden class.45. What is a visually hidden (
sr-only) class for?Correct answer: Keeping text for screen readers but off the screen
It clips the element to 1px without removing it from the accessibility tree. It's handy for labels that are obvious visually, like a search icon.
46. What does
role="button"on adivgive you?Correct answer: Only the announcement; focus and keys are still on you
The role is a promise. Screen readers announce a button, so users expect it to work with Tab, Enter and Space, and you have to build all of that yourself.
47. What does
aria-expandedtell a screen reader user?Correct answer: Whether the control's content is open or closed
It goes on the button that toggles a menu or accordion. Update it to
trueorfalseas the state changes.48. What is
aria-current="page"used for?Correct answer: Marking the current page's link in navigation
Sighted users see the active item highlighted. This gives screen reader users the same information.
49. A toast says "Saved" but screen readers stay silent. What can fix it?
Correct answer: Put it in a live region, like
role="status"Screen readers don't watch the page for visual changes. A live region that exists before the text changes makes them announce the update.
50. What is
prefers-reduced-motionfor?Correct answer: Respecting a system setting to limit animation
Motion such as parallax can cause dizziness or nausea for people with vestibular disorders. Use this media query to reduce or remove such effects.
51. Why does WCAG limit content that flashes?
Correct answer: Flashing can trigger seizures in some people
Content shouldn't flash more than three times per second, unless it's below the flash thresholds. This is about safety, not comfort.
52. What are captions on a video for?
Correct answer: Showing speech and important sounds as text
Deaf and hard-of-hearing users rely on them, and so does anyone watching in a noisy or quiet place. Spoken descriptions of visuals are audio description.
53. Why is autoplaying audio a problem?
Correct answer: It talks over the screen reader the user relies on
A screen reader user suddenly can't hear their tool, and may struggle to find the stop button. Let people start audio themselves.
54. What minimum target size does WCAG 2.2 AA set for pointer controls?
Correct answer: 24 by 24 CSS pixels, with some exceptions
Small targets are hard to hit with a tremor or on a phone. Exceptions include inline links and targets with enough spacing around them.
55. Which keys should activate a native-like button?
Correct answer: Both Enter and Space
Links activate with Enter only, buttons with both. A
<button>does this for you, but a custom one must handle both keys.56. Which key do users expect to close a modal dialog?
Correct answer: Escape
Esc closes a modal in the standard pattern. The native
<dialog>opened withshowModal()supports this out of the box.57. Where should focus go when a modal dialog opens?
Correct answer: Into the dialog, and stay there until it closes
If focus stays behind the modal, keyboard users tab through hidden content.
showModal()moves focus and makes the rest of the page inert.58. Where should focus go after a modal closes?
Correct answer: Back to the element that opened it
Otherwise the user is sent back to the top and loses their place. The native
<dialog>restores focus automatically.59. How do you mark up header cells in a data table?
Correct answer: With
<th>andscope="col"orscope="row"Screen readers then announce the header along with each cell, like "Price: $20". A bold
tdlooks the same but gives no such link.60. Why not use
<table>to lay out a page?Correct answer: Screen readers announce it as data rows and columns
A layout table confuses users with meaningless "row 3, column 2" information and reading order issues. Use CSS Grid or Flexbox for layout.
61. Why mark up a list of items with
<ul>and<li>?Correct answer: Screen readers announce the list and its item count
"List, 5 items" tells users what to expect and lets them skip it. Paragraphs styled with dashes look like a list but don't work as one.
62. What does
<details>with<summary>give you?Correct answer: A disclosure widget with keyboard support built in
It opens and closes with Enter or Space, and its state is exposed to assistive tech, with no JavaScript. It's great for FAQ sections.
63. A site scores 100 for accessibility in Lighthouse. What does that prove?
Correct answer: Only that the automated checks found no problems
Tools can't judge if
alttext makes sense or if focus order is logical. A perfect score is a good start, not proof that the site is accessible.64. Which is the simplest manual accessibility test?
Correct answer: Put the mouse away and use the site with a keyboard
Can you reach everything? Can you see the focus? Does the order make sense? Are there any traps? This takes minutes and finds real problems.
65. Why does
getByRole("button", { name: "Save" })make tests better for a11y?Correct answer: It fails if the element lacks that role or name
The query looks at the accessibility tree, like assistive tech does. A
divwith a click handler won't be found, so the test exposes the bug.66. What is axe used for?
Correct answer: Automatically finding accessibility issues in a page
axe-core powers browser extensions and integrations with Jest and Playwright, so issues can be caught in CI. Lighthouse uses it too.
67. What does
eslint-plugin-jsx-a11ydo?Correct answer: Flags common accessibility mistakes in JSX as you write
It catches things like an image with no
altor a click handler on adiv, before the code is even run.68. What does the European Accessibility Act require?
Correct answer: Many consumer products and services must be accessible
It has applied since 28 June 2025 and covers e-commerce, banking, e-books and transport services, among others. Very small service companies are exempt.
69. Why check contrast in the dark theme as well?
Correct answer: Each theme has its own colours that can fail
A grey that passes on white can fail on near-black. Every colour pair has to be checked in each theme you offer.
70. Why is content that appears only on
:hovera problem?Correct answer: Keyboard and touch users can't trigger hover
Add
:focus-withinor a real button. If the content appears on hover or focus, users must also be able to dismiss it and move the pointer onto it.71. How do you style a custom checkbox accessibly?
Correct answer: Keep a real
inputand style around itThe native input keeps its focus, keyboard support and state. Visually hide it, or use
appearance: none, and style the box. Check the focus style too.72. Why should a form have a real
<form>and a submit button?Correct answer: Enter submits it, and semantics work out of the box
Pressing Enter in a field submits the form, which keyboard users rely on. A
divwith anonClickon a pseudo-button loses that.73. Why shouldn't focus or typing alone change the context, like auto-submitting?
Correct answer: Users get lost when things change unexpectedly
A
selectthat navigates away on change is a classic problem: a keyboard user can't browse its options. Let users confirm with a button.74. What is a keyboard trap?
Correct answer: Focus enters a component and the keyboard can't leave it
Embedded video players and code editors are typical offenders. A modal keeps focus inside on purpose, but it must always offer a keyboard way out, like Esc.
75. Why can CSS
orderorflex-direction: row-reversecause problems?Correct answer: Visual order no longer matches DOM and focus order
Focus and screen readers follow the DOM, so focus seems to jump around the screen. Change the source order when the sequence affects meaning.