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

<mth-captcha-slot>

@methane-ui/ui~9.0 KB brotli (cold + Lit)~2.6 KB marginal

Provider-agnostic Light-DOM CAPTCHA container bridging third-party verification widgets with FACE token validity and same-root ARIA.

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-captcha-slot> (@methane-ui/ui)
Simulate Verification Token
Ready · interact with <mth-captcha-slot>, or toggle Theme, Direction (LTR/RTL), or props above.

Multi-Framework Playground & Snippets

<script type="module" src="@methane-ui/ui/captcha-slot"></script>
<mth-captcha-slot provider="custom"></mth-captcha-slot>

Properties & Attributes

PropertyAttributeTypeDefaultDescription
valuevaluestring""Current verification token submitted in FormData.
namenamestring""Form submission field name.
labellabelstring""Accessible group label.
hinthintstring""Helper text displayed below container.
errorerrorstring""Explicit error message.
providerproviderstring"custom"CAPTCHA provider identifier (e.g. "turnstile", "hcaptcha", "recaptcha", "custom").
sitekeysitekeystring""Optional public site key forwarded via data attribute.
disableddisabledbooleanfalseDisables interaction.
requiredrequiredbooleanfalseMarks verification token required for form validity.
readonlyreadonlybooleanfalsePrevents token clearing or edits.

Events

EventDetail TypeDescription
mth-verify{ token: string; provider: string }Fired when a non-empty verification token is set.
mth-expire{ provider: string }Fired when verification expires or resets.
mth-error{ provider: string; message: string }Fired when provider reports an error.
mth-change{ value: string }Fired when the verification token changes.

APG Keyboard Matrix

KeyDirectionWhenExpected Behavior
Enterbothreset button focusedclears current verification token and emits mth-expire

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-captcha-slot.spec.test.ts
statesExposes ElementInternals CustomStateSet flags: :state(dirty), :state(touched), :state(user-invalid), :state(disabled), :state(required), :state(readonly).Conformance suite
i18nRoutes 6 UI/ARIA strings through @methane-ui/core i18n catalog.Locale context test