Limited-Time Offer: Enjoy 50% Savings! Coupon code: 50OFF Use it at checkout
Skip to content

Free WGU Web Development Applications (KVO1) Web-Development-Applications Exam Questions

Last updated: · 10 practice questions with answers and explanations

Page: 1 / 14 Total 136 questions

Want more questions? Get Premium Access.

Question 1

New Single answer

Topic: Assemble web pages using HTML5

Skill tested: Select semantic HTML landmarks and elements to represent a multi-page layout.

A regional arts organization is rebuilding its site. Each page has a shared site header, primary navigation, main content, and footer. One page contains a standalone event announcement that is also syndicated elsewhere; within it are several sections, each with its own heading. The design also includes a sidebar of related links. The team wants screen-reader users to navigate landmarks and wants the markup to express the announcement as an independently meaningful unit. Which structure best meets these requirements?

Correct Answer: D. Use header, nav, main, and footer landmarks; place the announcement in an article, its headed divisions in section elements, and related links in an aside.
Explanation:

The shared header, primary navigation, main content, and footer map naturally to the header, nav, main, and footer landmarks. An independently reusable or syndicateable announcement is well suited to article; its internal thematic divisions can use section elements with headings. An aside is appropriate for related supplementary links. B reverses the roles of article and section and uses a generic div for related content. C discards useful native semantics and creates unnecessary ARIA work. D assigns elements to the wrong purposes and weakens landmark navigation.

Question 2

New Single answer

Topic: Assemble web pages using HTML5

Skill tested: Choose valid HTML form association and table structure for accessible page content.

A public-service portal displays inspection results in a table and places the search form controls in a compact toolbar above the table. The table must remain understandable when users navigate by row and column headers, and the form label should be programmatically associated with its input even though the label and input are not adjacent in the source. The page must pass HTML validation. Which implementation best satisfies these requirements?

Correct Answer: B. Give the table a caption and use scoped column and row header cells; connect the label to the input with matching for and id values.
Explanation:

A caption identifies the table, while th cells with appropriate scope communicate header relationships to assistive technology. A label's for value associates it with the form control whose id matches, regardless of their placement in the document. B uses bold data cells rather than semantic headers and does not establish the specified association. C creates duplicate IDs and fails to associate the elements correctly. D misrepresents row-and-column data and removes the requested visible label; aria-label is not a substitute for the required visible association.

Question 3

New Multiple answers

Topic: Develop web documents using CSS3

Skill tested: Implement responsive grid sizing and keyboard-visible focus styling with CSS.

A product team is redesigning a catalog page. Product cards should form as many columns as fit, never narrower than 16rem, and expand evenly without a breakpoint for every device size. The site must also retain a clearly visible keyboard focus indicator; the existing global rule removes outlines, and the team cannot rely on color alone to distinguish focused controls. Which two CSS changes best meet the requirements? Select TWO.

Correct Answer: C. Restore a visible focus style, such as `:focus-visible { outline: 3px solid currentColor; outline-offset: 2px; }`.; D. Define the card container with `display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));`.
Explanation:

`auto-fit` with `minmax(16rem, 1fr)` creates as many columns as available space permits while respecting the minimum card width and distributing remaining space. A visible `:focus-visible` outline restores a keyboard focus indicator without depending solely on color; the offset also separates it from the control edge. B forces a nonwrapping row, while E fixes the column count and does not adapt the layout appropriately. D removes the outline and relies only on a color change, contrary to the accessibility constraint.

Question 4

New Single answer

Topic: Develop web documents using CSS3

Skill tested: Use positioning and stacking contexts to troubleshoot an obstructed responsive navigation panel.

On a responsive site, a menu button opens a navigation panel that should cover the page content while remaining below the fixed site header. At one viewport width, the panel appears behind a promotional card even though its z-index is larger. Inspection shows that the card has `position: relative; z-index: 2`, while the panel is inside a transformed wrapper with `z-index: 1`; the header has `z-index: 10`. The team wants the smallest reliable CSS change and must preserve the transform used for an entrance animation. What should the developer do?

Correct Answer: A. Move the panel outside the lower-stacking wrapper into a layer that can stack above page content, then place it below the header.
Explanation:

A descendant cannot use a larger z-index to escape its ancestor's stacking context. The transformed wrapper establishes a stacking context, and that entire context is below the card's context. Moving the panel to a suitable higher-level stacking context allows it to layer above page content while keeping its z-index below the header. Increasing the panel's z-index within the wrapper does not change the wrapper's stacking order. A negative z-index is not a reliable way to place it above the card, and fixed positioning does not itself escape a stacking context created by an ancestor.

Question 5

New Single answer

Topic: Use JavaScript to enhance web development and design

Skill tested: Trace event propagation and prevent duplicate delegated event handling.

A shopping interface renders cart rows dynamically. The application attaches one click listener to the cart container and uses event delegation to handle clicks on buttons with the class `remove`. After a refactor, clicking a remove button deletes two rows. A debugger shows that the handler is called twice: once for the button's click and once for a custom event dispatched by the row-rendering code that bubbles through the same container. The team wants to retain delegation and handle only actual user clicks. What is the best next change?

Correct Answer: D. In the handler, require `event.type === "click"` and confirm the matched remove button is within the cart before acting.
Explanation:

The listener receives both bubbling events, so the handler should discriminate on the event type and verify that the delegated target is the intended remove button within the cart. That preserves one delegated listener for dynamically inserted rows while avoiding processing the custom event. Capture phase would not distinguish event types. `{ once: true }` disables the listener after one invocation rather than fixing the duplicate cause. Stopping propagation at the container does not prevent the handler from being invoked there and can interfere with other application listeners.

Question 6

New Multiple answers

Topic: Use JavaScript to enhance web development and design

Skill tested: Validate dynamic form input and report errors accessibly through DOM updates.

A booking form accepts a departure date and return date. HTML attributes already enforce that both fields contain dates, but the business rule requires the return date to be later than the departure date. Users must be able to correct errors without losing their entries, and assistive technology should be informed when the form is invalid. Which two implementation choices are most appropriate? Select TWO.

Correct Answer: B. Add a visible error message associated with the return field using `aria-describedby`, and update its text when the rule fails.; C. On submit, compare the parsed date values; when the rule fails, prevent submission, set a custom validity message on the return field, and report validity.
Explanation:

The cross-field ordering rule requires JavaScript beyond the individual date controls' native constraints. Setting a custom validity message and invoking validity reporting prevents invalid submission while retaining the entered values. An associated visible message gives users an explanation, and `aria-describedby` connects that explanation to the return field. Clearing input is disruptive, while red styling alone is insufficient. Marking every control invalid misidentifies which field needs correction and does not communicate the actual problem.

Question 7

New Single answer

Topic: Use HTML5 APIs for enhanced functionality

Skill tested: Handle geolocation permission, failure states, and feature availability with a usable fallback.

A field-service company offers an optional button that fills in a technician's current coordinates. The page must work when a browser lacks geolocation, when permission is denied, and when a device cannot obtain a position. Technicians can always enter coordinates manually, and the feature must not make page loading depend on location access. Which implementation is most appropriate?

Correct Answer: B. Check for `navigator.geolocation` when the user requests location, call `getCurrentPosition` only then, and preserve manual entry with error feedback for failures.
Explanation:

Geolocation is permission-controlled and can fail because access is denied, unavailable, or times out. It should be invoked in response to the user's request, with feature detection and error handling, while manual coordinate entry remains available. This also avoids blocking or delaying initial page use. Calling during load is intrusive and hiding the fallback makes failures unusable. Synchronous geolocation is not the supported API pattern, and repeated retries cannot override a permission decision. A missing API should not prevent the rest of the form from working.

Question 8

New Multiple answers

Topic: Use HTML5 APIs for enhanced functionality

Skill tested: Implement drag-and-drop data transfer and preserve a functional non-drag alternative.

An editorial dashboard lets staff move story cards between workflow columns. The implementation uses the browser's drag-and-drop API and must work with keyboard-only navigation as well as a mouse. Cards are created dynamically, and moving a card should update the document only after it is dropped on a valid column. Which two implementation choices best satisfy these requirements? Select TWO.

Correct Answer: A. Handle `dragover` on valid columns and call `preventDefault()` there so they can accept a drop.; E. Make each draggable card focusable, set a stable story identifier in `dataTransfer` during `dragstart`, and read it during `drop`.
Explanation:

A stable identifier carried through `dataTransfer` lets the drop handler locate the intended story without relying on fragile DOM assumptions. A valid drop target must cancel the default `dragover` behavior to allow a drop. Deferring the move until a valid drop avoids premature DOM changes. The browser does not accept drops on every element automatically, so D is insufficient. Pointer-only interaction and visual-only feedback exclude keyboard users; the interface also needs a keyboard-accessible way to move cards and communicate the result.

Question 9

New Single answer

Topic: Validate user input using HTML5 and JavaScript techniques

Skill tested: Combine native input constraints with JavaScript validation for a conditional business rule.

A newsletter signup form collects an email address and an optional organization name. When the user selects "Request an invoice," the organization name becomes required and must contain at least three non-whitespace characters. The form should retain browser-native email validation, provide a clear error for the conditional rule, and block submission until valid. Which approach is best?

Correct Answer: C. On each relevant change and before submission, update the field's `required` state and use `setCustomValidity` for the trimmed-length rule; clear the custom error when the condition is satisfied.
Explanation:

The conditional requirement can be represented by updating the field's `required` property when invoice requests are selected. JavaScript can check the trimmed value for the minimum meaningful length and set or clear a custom validity message accordingly. The browser continues to enforce the email control's native type constraint, and a submit-time check prevents an invalid path from bypassing validation. A permanently required field rejects valid non-invoice submissions. C discards native constraints and implements an inadequate email check. D changes email semantics and does not correctly handle conditional whitespace validation.

Question 10

New Single answer

Topic: Develop web pages for traditional and mobile devices

Skill tested: Diagnose mobile viewport scaling and select responsive layout constraints.

A training provider's page looks like a desktop site shrunk to fit on phones. The CSS already uses a media query to switch a two-column lesson layout to one column below 700 pixels, but mobile browsers do not apply the expected breakpoint and users must pinch-zoom to read text. The page has no viewport metadata. The team must keep the desktop layout unchanged and allow the existing media query to operate against the device's CSS viewport. What should the developer do first?

Correct Answer: C. Add `` to the document head.
Explanation:

The viewport meta element tells mobile browsers to use the device width as the layout viewport, allowing CSS media queries to respond to the expected CSS-pixel width rather than a wide virtual viewport. That addresses the stated root cause without changing the desktop layout and preserves user zoom. A transform only scales a fixed layout and does not make it responsive. Fixed text sizing and device detection are brittle. Disabling or restricting zoom harms accessibility and does not correct the missing viewport configuration.