Methane@methane-ui/*
CSS LayoutsComponentsSkillsTheme BuilderGitHub
← All Components

<mth-error-summary>

@methane-ui/ui~7.9 KB brotli (cold + Lit)~2.0 KB marginal

Accessible form validation error summary with focusable role="alert" container, LiveAnnouncer support, and pluralized headings.

When NOT to use: Use a lightweight @methane-ui/css layout class instead of a custom element when static CSS suffices.

Live Interactive Preview

Interactive StageLive Custom Element · <mth-error-summary> (@methane-ui/ui)
Ready · interact with <mth-error-summary>, or toggle Theme, Direction (LTR/RTL), or props above.

Multi-Framework Playground & Snippets

<script type="module" src="@methane-ui/ui/error-summary"></script>
<mth-error-summary>Example</mth-error-summary>

Properties & Attributes

PropertyAttributeTypeDefaultDescription
headingheadingstring""Optional custom heading overriding the default pluralized error count title.
autofocusautofocusbooleanfalseAutomatically moves focus to the summary alert when errors appear.
errors—ReadonlyArray<{ readonly id?: string; readonly fieldId?: string; readonly href?: string; readonly name?: string; readonly message: string; readonly label?: string }>[]Array of validation error descriptors rendered as links to target controls.

Events

EventDetail TypeDescription
mth-focus-field{ id: string; name: string; message: string; href: string }Fired when a user activates an error link to navigate to a field.

APG Keyboard Matrix

KeyDirectionWhenExpected Behavior
Enterbothfocus on error linkfocuses target control and emits mth-focus-field

Accessibility Checklist

CategoryRequirementVerified By
ariaAll aria-* IDREFs resolve within the same DOM root (ADR-003).scanSameRootAria
focusdelegatesFocus: true with zero host internals.role (ADR-014).lint-plugin & spec-compiler
contrastRenders legible borders, focus outlines, and selection indicators under forced-colors: active.Playwright forced-colors matrix
keyboardImplements all 1 APG keyboard transitions across LTR/RTL.mth-error-summary.spec.test.ts
statesExposes ElementInternals CustomStateSet flags: :state(empty).Conformance suite
i18nRoutes 4 UI/ARIA strings through @methane-ui/core i18n catalog.Locale context test