Navigation Patterns — Scroll, Modals and 404s — Concept Check
Questions on Navigation Patterns — Scroll, Modals and 404s. The details that separate a single-page app from a website that feels right: where the page scrolls to, what the back button does to a modal, and what an unknown URL renders.
Questions in this quiz
8 questions on Navigation Patterns — Scroll, Modals and 404s — Concept Check. Work through them here, then start the quiz to answer them and see your score.
1.A user navigates from a long list page to another page, but finds themselves scrolled halfway down the new page. What is likely missing in the implementation?
- A404 error handling
- BModal routing setup
- CScroll restoration logic
- DAnchor tag handling
2.In a single-page app, a user presses the back button expecting a modal to close, but it doesn't. What should be done to fix this?
- AUse session storage for modal state
- BImplement route-based modals
- CDisable the back button
- DUse local state for modal visibility
3.A developer implements a catch-all route to handle unknown URLs. What component should be used to render a 404 page?
- A<ScrollRestoration />
- B<Redirect />
- C<NotFound />
- D<Navigate />
4.When a user navigates to a new page, the screen reader remains focused on the previous content. What is missing?
- AFocus management after navigation
- BModal state handling
- CScroll restoration logic
- D404 page setup
5.A single-page app refreshes and shows a 404 error for a known route. What is the likely cause?
- AIncorrect route configuration
- BModal state not preserved
- CServer not returning index.html for unknown paths
- DMissing scroll restoration
6.A user shares a URL with a modal open, but the recipient cannot see the modal. What is the issue?
- AModal state not encoded in URL
- BFocus not restored
- CIncorrect scroll position
- DMissing 404 handling
7.A developer notices that the back button does not restore the scroll position on a single-page app. What might be the reason?
- AIncorrect modal handling
- B404 page misconfiguration
- CFocus management issue
- DMissing scroll restoration logic
8.What should be done to ensure old URLs redirect correctly instead of showing a 404 error?
- ADisable the back button
- BStore old URLs in session storage
- CUse a catch-all route
- DImplement a redirect for old URLs