← All Components
<mth-captcha-slot>
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
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>import '@methane-ui/ui/captcha-slot';
import '@methane-ui/react';
export function Example() {
return <mth-captcha-slot provider="custom"></mth-captcha-slot>;
}<script setup lang="ts">
import '@methane-ui/ui/captcha-slot';
</script>
<template>
<mth-captcha-slot provider="custom"></mth-captcha-slot>
</template>import { Component, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import '@methane-ui/ui/captcha-slot';
import { MthCaptchaSlotDirective } from '@methane-ui/angular';
@Component({
standalone: true,
schemas: [CUSTOM_ELEMENTS_SCHEMA],
imports: [MthCaptchaSlotDirective],
template: `<mth-captcha-slot provider="custom"></mth-captcha-slot>`,
})
export class ExampleComponent {}<script lang="ts">
import '@methane-ui/ui/captcha-slot';
import MthCaptchaSlot from '@methane-ui/svelte/MthCaptchaSlot.svelte';
</script>
<MthCaptchaSlot provider="custom"></MthCaptchaSlot>Properties & Attributes
| Property | Attribute | Type | Default | Description |
|---|---|---|---|---|
value | value | string | "" | Current verification token submitted in FormData. |
name | name | string | "" | Form submission field name. |
label | label | string | "" | Accessible group label. |
hint | hint | string | "" | Helper text displayed below container. |
error | error | string | "" | Explicit error message. |
provider | provider | string | "custom" | CAPTCHA provider identifier (e.g. "turnstile", "hcaptcha", "recaptcha", "custom"). |
sitekey | sitekey | string | "" | Optional public site key forwarded via data attribute. |
disabled | disabled | boolean | false | Disables interaction. |
required | required | boolean | false | Marks verification token required for form validity. |
readonly | readonly | boolean | false | Prevents token clearing or edits. |
Events
| Event | Detail Type | Description |
|---|---|---|
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
| Key | Direction | When | Expected Behavior |
|---|---|---|---|
| Enter | both | reset button focused | clears current verification token and emits mth-expire |
Accessibility Checklist
| Category | Requirement | Verified By |
|---|---|---|
| aria | All aria-* IDREFs resolve within the same DOM root (ADR-003). | scanSameRootAria |
| focus | delegatesFocus: true with zero host internals.role (ADR-014). | lint-plugin & spec-compiler |
| contrast | Renders legible borders, focus outlines, and selection indicators under forced-colors: active. | Playwright forced-colors matrix |
| keyboard | Implements all 1 APG keyboard transitions across LTR/RTL. | mth-captcha-slot.spec.test.ts |
| states | Exposes ElementInternals CustomStateSet flags: :state(dirty), :state(touched), :state(user-invalid), :state(disabled), :state(required), :state(readonly). | Conformance suite |
| i18n | Routes 6 UI/ARIA strings through @methane-ui/core i18n catalog. | Locale context test |