Complete the code to add an ARIA attribute that labels the button for screen readers.
<button type="button" class="btn btn-primary" [1]="Close">Close</button>
The aria-label attribute provides an accessible name for the button, helping screen readers understand its purpose.
Complete the code to link the button to the modal it controls using ARIA attributes.
<button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#exampleModal" [1]="exampleModal">Launch modal</button>
The aria-controls attribute tells assistive technologies which element the button controls, linking it to the modal with id 'exampleModal'.
Fix the error in the modal dialog by adding the correct ARIA role attribute.
<div class="modal" tabindex="-1" [1]="dialog"> <div class="modal-dialog"> <div class="modal-content"> <!-- Modal content here --> </div> </div> </div>
The role="dialog" attribute defines the modal as a dialog window, which helps assistive technologies announce it properly.
Fill both blanks to make the navbar toggle button accessible with ARIA attributes.
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" [1]="navbarSupportedContent" [2]="false" aria-label="Toggle navigation"> <span class="navbar-toggler-icon"></span> </button>
The aria-controls attribute links the button to the collapsible navbar content. The aria-expanded attribute indicates whether the content is currently expanded or collapsed.
Fill all three blanks to create an accessible accordion button with proper ARIA attributes.
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#collapseOne" [1]="collapseOne" [2]="false" [3]="section1">Section 1</button>
The aria-controls attribute links the button to the collapsible content. aria-expanded shows if the content is open or closed. aria-labelledby connects the button to a label element for screen readers.
