0
0
Bootsrapmarkup~20 mins

Why modals focus user attention in Bootsrap - Challenge Your Understanding

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Modal Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Why does a modal prevent interaction with the background?
In Bootstrap, when a modal is open, why can't the user click or interact with the page behind it?
ABecause the modal adds a backdrop that blocks clicks and focuses keyboard input inside the modal.
BBecause the modal removes all other page elements from the DOM temporarily.
CBecause the modal disables the browser's mouse and keyboard events globally.
DBecause the modal changes the page's background color to gray.
Attempts:
2 left
💡 Hint
Think about what visually covers the page and where the keyboard focus goes.
📝 Syntax
intermediate
2:00remaining
Which attribute ensures keyboard focus stays inside a Bootstrap modal?
Bootstrap modals use an attribute to trap keyboard focus inside the modal. Which attribute is responsible for this behavior?
Adata-toggle="modal" on the modal container
Baria-hidden="true" on the modal container
Ctabindex="-1" on the modal container
Drole="dialog" on the modal container
Attempts:
2 left
💡 Hint
This attribute allows the modal container to receive focus programmatically.
rendering
advanced
2:00remaining
What visual effect does Bootstrap use to highlight a modal?
When a Bootstrap modal opens, what visual effect helps focus user attention on the modal content?
AThe modal content is displayed with a rainbow gradient background.
BA semi-transparent dark backdrop covers the page behind the modal.
CThe page background scrolls faster to blur behind the modal.
DThe modal content blinks rapidly to attract attention.
Attempts:
2 left
💡 Hint
Think about what dims the rest of the page when the modal is open.
accessibility
advanced
2:00remaining
How does Bootstrap ensure screen readers focus on the modal?
Which ARIA attribute does Bootstrap use on modals to help screen readers identify the modal dialog?
Aaria-expanded="true" on the modal container
Baria-hidden="false" on the page body
Caria-live="polite" on the modal container
Daria-modal="true" on the modal container
Attempts:
2 left
💡 Hint
This attribute tells assistive technologies that the rest of the page is inert while the modal is open.
selector
expert
2:00remaining
Which CSS selector targets the Bootstrap modal backdrop?
You want to style the dark overlay behind a Bootstrap modal. Which CSS selector correctly targets the backdrop element?
A.modal-backdrop
B#modal-backdrop
C.modal > .backdrop
Ddiv[data-backdrop]
Attempts:
2 left
💡 Hint
Bootstrap uses a specific class name for the backdrop element.