Complete the code to add an accessible label to the button using Bootstrap.
<button type="button" class="btn btn-primary" aria-[1]="Submit form">Submit</button>
The aria-label attribute provides the label text directly for screen readers, improving accessibility.
Complete the code to make the image accessible by adding alternative text.
<img src="logo.png" class="img-fluid" alt="[1]">
The alt attribute provides descriptive text for images, which screen readers read aloud. 'Company logo' clearly describes the image.
Fix the error in the code to ensure the form input is accessible with a proper label.
<label for="emailInput">Email address</label> <input type="email" class="form-control" id="[1]" placeholder="Enter email">
The for attribute in the label must match the id of the input. Here, 'emailInput' matches exactly.
Fill both blanks to create an accessible navigation bar with proper roles and labels.
<nav class="navbar navbar-expand-lg navbar-light bg-light" role="[1]" aria-[2]="Main navigation"> <!-- Navbar content --> </nav>
The role="navigation" defines the element as a navigation landmark. The aria-label attribute names it for assistive technologies.
Fill all three blanks to create an accessible modal dialog with proper ARIA attributes.
<div class="modal" tabindex="-1" role="[1]" aria-[2]="modalTitle" aria-[3]="true"> <div class="modal-dialog"> <div class="modal-content"> <h5 class="modal-title" id="modalTitle">Modal title</h5> <!-- Modal body --> </div> </div> </div>
The role="dialog" defines the modal as a dialog. aria-labelledby="modalTitle" links the dialog to its title. aria-hidden="true" hides the modal from screen readers when it is not visible.
