Bird
Raised Fist0
Testing Fundamentalstesting~20 mins

Accessibility testing in Testing Fundamentals - Practice Problems & Coding Challenges

Choose your learning style10 modes available
Challenge - 5 Problems
🎖️
Accessibility Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Why use ARIA roles in web pages?
What is the main purpose of adding ARIA roles to HTML elements?
ATo make elements load faster in the browser
BTo improve the visual style of elements using CSS
CTo help assistive technologies understand the purpose of elements
DTo add animations and transitions to elements
Attempts:
2 left
💡 Hint
Think about users who rely on screen readers.
📝 Syntax
intermediate
2:00remaining
Identify the correct ARIA attribute syntax
Which option shows the correct way to add an ARIA label to a button in HTML?
A<button ariaLabel='Close menu'>X</button>
B<button aria_label='Close menu'>X</button>
C<button aria label='Close menu'>X</button>
D<button aria-label='Close menu'>X</button>
Attempts:
2 left
💡 Hint
ARIA attributes use hyphens and lowercase letters.
❓ rendering
advanced
2:00remaining
Screen reader behavior with missing alt text
What will a screen reader announce for this image?

<img src='logo.png'>
Testing Fundamentals
<img src='logo.png'>
AIt will read the file name 'logo.png' aloud
BIt will skip the image and say nothing
CIt will announce 'image' without description
DIt will cause an error and stop reading
Attempts:
2 left
💡 Hint
Screen readers fall back to the filename when alt is missing.
❓ selector
advanced
2:00remaining
CSS selector for keyboard focus style
Which CSS selector correctly targets elements when they receive keyboard focus for accessibility styling?
A:focus-visible
B:hover
C:active
D:visited
Attempts:
2 left
💡 Hint
This selector only shows focus styles when keyboard is used.
❓ layout
expert
3:00remaining
Ensuring logical tab order in complex layouts
You have a complex page with multiple sections and interactive elements. Which practice ensures the tab order is logical and accessible?
AUse tabindex='0' for natural order and avoid positive tabindex values
BUse tabindex='0' to include elements in natural DOM order and tabindex='positive' to reorder
CRemove all tabindex attributes to disable keyboard navigation
DUse tabindex='-1' on all interactive elements
Attempts:
2 left
💡 Hint
Positive tabindex values can confuse users.

Practice

(1/5)
1. What is the main goal of accessibility testing on a website?
easy
A. To improve the website's loading speed
B. To add more images and videos
C. To ensure the website is usable by people with disabilities
D. To increase the number of advertisements

Solution

  1. Step 1: Understand the purpose of accessibility testing

    Accessibility testing focuses on making websites usable for everyone, including people with disabilities.
  2. Step 2: Compare options to the goal

    Only To ensure the website is usable by people with disabilities matches this goal, while others focus on unrelated aspects like speed or content.
  3. Final Answer:

    To ensure the website is usable by people with disabilities -> Option C
  4. Quick Check:

    Accessibility testing = usability for all [OK]
Hint: Focus on users with disabilities for accessibility testing [OK]
Common Mistakes:
  • Confusing accessibility with performance optimization
  • Thinking accessibility means adding more content
  • Ignoring users with disabilities
2. Which HTML attribute is important for accessibility to describe images?
easy
A. alt
B. title
C. src
D. href

Solution

  1. Step 1: Identify attribute for image description

    The alt attribute provides text descriptions for images, helping screen readers.
  2. Step 2: Check other attributes

    title shows tooltips, src is image source, href is for links, none describe images for accessibility.
  3. Final Answer:

    alt -> Option A
  4. Quick Check:

    Image description attribute = alt [OK]
Hint: Use alt for image descriptions to help screen readers [OK]
Common Mistakes:
  • Using title instead of alt for image description
  • Confusing src with description
  • Missing alt attribute entirely
3. Consider this HTML snippet:
<button>Click me</button>

Which accessibility improvement is best?
medium
A. Remove the button element
B. Add aria-label="Submit button" to the button
C. Change button text to "" (empty string)
D. Add style="color: white;" only

Solution

  1. Step 1: Understand button accessibility

    Buttons need clear labels for screen readers; adding aria-label clarifies purpose.
  2. Step 2: Evaluate other options

    Empty text or removing button removes meaning; styling alone doesn't improve accessibility.
  3. Final Answer:

    Add aria-label="Submit button" to the button -> Option B
  4. Quick Check:

    Use aria-label for clear button description [OK]
Hint: Use aria-label to describe buttons clearly [OK]
Common Mistakes:
  • Leaving buttons unlabeled
  • Removing interactive elements
  • Relying only on visual styles
4. You test a form and find keyboard users cannot reach the submit button. What is the likely cause?
medium
A. The button has tabindex="-1"
B. The button has a visible label
C. The button uses type="submit"
D. The button has a high contrast color

Solution

  1. Step 1: Understand tabindex effect on keyboard navigation

    A tabindex="-1" removes the element from keyboard focus order, so users can't tab to it.
  2. Step 2: Check other options

    Visible label, submit type, and color contrast do not block keyboard focus.
  3. Final Answer:

    The button has tabindex="-1" -> Option A
  4. Quick Check:

    tabindex="-1" blocks keyboard focus [OK]
Hint: Check tabindex for keyboard focus issues [OK]
Common Mistakes:
  • Confusing label visibility with focusability
  • Ignoring tabindex attribute effects
  • Assuming color affects keyboard navigation
5. You want to test if a website's color choices meet accessibility standards for contrast. Which approach is best?
hard
A. Use random colors to test visually
B. Only rely on automated tools without manual checks
C. Ignore color contrast if text is large
D. Use an automated color contrast checker and manually verify with users

Solution

  1. Step 1: Understand color contrast testing methods

    Automated tools quickly check contrast ratios, but manual testing ensures real user experience.
  2. Step 2: Evaluate other options

    Relying only on tools misses context; ignoring contrast or random colors do not ensure accessibility.
  3. Final Answer:

    Use an automated color contrast checker and manually verify with users -> Option D
  4. Quick Check:

    Combine automated and manual checks for best results [OK]
Hint: Combine tools and manual checks for color contrast [OK]
Common Mistakes:
  • Trusting only automated tools
  • Ignoring contrast for large text
  • Testing colors without standards
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard