0
0
Testing Fundamentalstesting~10 mins

Accessibility testing in Testing Fundamentals - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to add an ARIA label to the button for screen readers.

Testing Fundamentals
<button [1]>Click me</button>
Drag options to blanks, or click blank then click option'
Aalt="Submit form"
Baria-label="Submit form"
Ctitle="Submit form"
Drole="button"
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'alt' attribute on a button, which is only for images.
Using 'title' which is not always read by screen readers.
2fill in blank
medium

Complete the code to make the image accessible by adding alternative text.

Testing Fundamentals
<img src="logo.png" [1]>
Drag options to blanks, or click blank then click option'
Aalt="Company logo"
Btitle="Company logo"
Crole="img"
Daria-hidden="true"
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'aria-hidden' hides the image from screen readers.
Using 'title' does not replace alt text for accessibility.
3fill in blank
hard

Fix the error in the form input to ensure it is properly labeled for accessibility.

Testing Fundamentals
<label for="email">Email:</label>
<input type="email" [1]>
Drag options to blanks, or click blank then click option'
Aaria-label="Email address"
Bname="email"
Cid="email"
Dplaceholder="Enter email"
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'aria-label' instead of matching id and for attributes.
Using 'placeholder' which is not a label substitute.
4fill in blank
hard

Fill both blanks to create a keyboard-accessible link that opens in a new tab with proper accessibility.

Testing Fundamentals
<a href="https://example.com" [1] [2]>Visit site</a>
Drag options to blanks, or click blank then click option'
Atarget="_blank"
Brel="noopener noreferrer"
Caria-hidden="true"
Dtabindex="-1"
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'aria-hidden' hides the link from screen readers.
Using 'tabindex="-1"' removes keyboard focus.
5fill in blank
hard

Fill all three blanks to create an accessible form input with a label and error message.

Testing Fundamentals
<label for="username">[1]</label>
<input type="text" id="username" aria-describedby="error-msg" [2]>
<span id="error-msg" [3]>Username is required</span>
Drag options to blanks, or click blank then click option'
AUsername
Baria-invalid="true"
Crole="alert"
Dplaceholder="Enter username"
Attempts:
3 left
💡 Hint
Common Mistakes
Not linking the label and input with matching 'for' and 'id'.
Missing 'aria-invalid' on the input when there is an error.
Not using 'role="alert"' on the error message.