A named, focusable overview of validation errors, with links to the fields that need correction. Show matching inline feedback as well as the overview.
<qds-error-summary id="errors" label="Check this operating update"></qds-error-summary>
<label for="report-name">Report name</label><input id="report-name" required>
<script type="module">
import '/assets/components/error-summary/qds-error-summary.js';
errors.items = [{id: 'report-name', message: 'Enter a report name.'}];
errors.focus();
</script>
items: cloned {id, message}[], one error per target ID. IDs/messages are nonempty strings; duplicates are ignored. Messages are rendered as text, and an empty summary is hidden.label: heading and alert name, default Check these fields.focus(options?): focus the overview after an invalid submit/continue. It is a no-op when empty; updating items does not automatically steal focus.qds-error-focus: bubbling/composed cancelable {id, message, index} before default navigation. Default behavior focuses a same-shadow-root/document target without changing the URL; missing, disabled, hidden or inert targets are safe no-ops. Native/QDS targets must implement the standard focus contract.summary, heading, list, link. Existing error-link focus is preserved across item updates; removal falls back to the nonempty overview. Disconnection removes the click listener.The overview is a named alert with a heading, list of native links and programmatic focus target. Links support Tab/Enter; 44px hit targets, visible focus and primary text on themed surfaces retain light/dark readability. When the overview owns focus, call each field’s checkValidity() to update inline constraints without moving native focus, then populate the errors and focus the summary after rendering. Use reportValidity() when the individual field should receive focus. Let users choose a summary link to correct a field.
Guidance: GOV.UK error summary, W3C form notifications.
Operations > New update (/#/operations/updates/new) uses generated items/events/focus methods to summarize invalid reporting fields. A link focuses the relevant numeric/text/checkbox-group field through its generated public API; existing select/date/checkbox reportValidity methods handle their invalid focus targets. The workflow remains local, with no persistent writes. The adjacent test.html demonstrates required and multi-error states, successful correction, default native focus, controlled hidden-panel focus and empty-state behavior.