<< All versions

Skill v1.0.0

currentAutomated scan100/100
realjustawall/perfect-ai/ztp-native-keyboard-tabs-onboarding
──Details
PublishedNovember 17, 2026 at 02:41 PM
Content Hashsha256:a72241b23b97ff33...
Git SHAa2d554c6efcc
──Files
Files (1 file, 5.6 KB)
SKILL.md5.6 KBactive
SKILL.md · 92 lines · 5.6 KB

name: ztp-native-keyboard-tabs-onboarding description: Apply Roving keyboard tabs via native to a onboarding steps, including implementation code, responsive constraints, RTL, reduced motion and browser acceptance tests. Use for onboarding animation or responsive frontend engineering. metadata: version: "1.0.0"


Codex skill: Roving keyboard tabs for Onboarding steps

For each user request, inspect existing code first, apply the practical implementation below (do not just describe it), retain all existing product functionality, and test the actual result. The snippet is a starting integration recipe, not a complete standalone application. Avoid MCP and avoid fetching untrusted code automatically.

Pattern: Roving keyboard tabs for Onboarding steps

Pattern ID: ztp-native-keyboard-tabs-onboarding Technique: NATIVE / Roving keyboard tabs Audience: Persian + English, desktop/mobile, touch/keyboard. Reference: https://www.w3.org/WAI/ARIA/apg/patterns/tabs/

Why and when

Keyboard-accessible tablist with state and label sync. In the Onboarding steps context: numbered steps and continue control. Important constraint: workflow progress must be understandable without motion.

Implementation prerequisites

  • No dependency required. Use the existing project package manager and do not install packages without checking existing versions.
  • Base responsive contract: inline sizes 320–2560 CSS px, content width independent of device, safe areas, container queries where useful.
  • Create HTML semantic structure first; running animations are progressive enhancement, never a substitute for functionality.
  • For a Perfect_AI request, honor the strict monochrome design system; otherwise choose colors through the palette-decision engine and audit contrast.

Scoped markup starter (adapt, not copy into every component)

html
<section id="zt-keyboard-tabs-onboarding" lang="fa" dir="rtl" aria-label="Onboarding steps">
<h2 data-zt-heading>Onboarding steps: clear, real heading</h2>
<div data-zt-collection>
<p data-zt-item>Actual readable content; replace with verified product copy.</p>
</div>
<button type="button" data-zt-trigger>Open details</button>
<span data-zt-status role="status"></span>
<div data-zt-scene aria-hidden="true"></div>
<!-- SVG-specific effects: add an accessible <svg> with [data-zt-path] and [data-zt-marker]. -->
<!-- Draggable effect: add a nonessential visual node [data-zt-drag]. -->
<!-- Dialog effect: add native <dialog> with [data-zt-close] control. -->
</section>

Scaffold note: Replace placeholder copy with project data, preserve heading hierarchy, and do not create imaginary claims.

Technique implementation

javascript
const tabs=[...document.querySelectorAll('#zt-keyboard-tabs-onboarding [role=tab]')];
tabs.forEach((tab,i)=>tab.addEventListener('keydown',e=>{if(!['ArrowLeft','ArrowRight','Home','End'].includes(e.key))return;e.preventDefault();const next=e.key==='Home'?0:e.key==='End'?tabs.length-1:(i+(e.key==='ArrowRight'?1:-1)+tabs.length)%tabs.length;tabs[next]?.focus();tabs[next]?.click();}));
// Set aria-selected and aria-controls for the active tab; use RTL-aware keys if appropriate.

Runtime contract: If snippet uses JavaScript, place it in the existing app lifecycle and remove listeners/observers during teardown. If snippet uses CSS, include it in a bundled stylesheet with feature detection and sensible non-support fallback.

Interaction specification

  1. Initial: content is visible and usable without JS, including with WebGL unsupported.
  2. Enter/gesture: motion runs only when useful; keyboard/touch users get the same affordance and outcome.
  3. During interaction: preserve critical pointer events and focus. Avoid forced synchronous layout in a frame callback.
  4. Cancel/interruption: dispose observers, timers, animation handles and GPU resources, restore original styles.
  5. Reverse/navigate: scroll back restores progress or safely retains final state; no duplicate listeners after route changes.

Responsive + RTL acceptance matrix

Width or modeRequired behavior
320–374pxone-column content, no horizontal overflow, full labels and usable tap targets
375–767pxnatural wrapping, dynamic browser chrome, safe-area padding
768–1023px2-column only if container is wide enough; no reliance on hover
1024–1439pxbalanced layout and legible supporting copy, bounded motion amplitude
>=1440pxmax-width limits; 3D/compositing resolution remains budgeted
Persian RTLlogical CSS properties, correct mixed-direction numerals and focus flow
200–400% zoomcontent reflows without clipped functional elements
Reduced motion / WebGL blockedstatic readable content; controls remain functional

Definition of done

  • [ ] Correct semantic hierarchy and real content for onboarding steps.
  • [ ] Verified: step navigation and disabled state.
  • [ ] Contrast target >= 4.5:1 for normal text, >= 3:1 for relevant UI boundaries and large text.
  • [ ] Tested 320, 390, 768, 1024 and 1440px, RTL/LTR, keyboard, coarse pointer, reduced motion.
  • [ ] No hidden error in the console; no React component leaks; screenshots compared where visual fidelity matters.
  • [ ] Run bundle/build/lint + targeted browser test; document any unverified dependency-specific sample.

Source and rights

Originally authored integration recipe based on the API documentation above; it is not copied original source from a third-party website. The scaffold is illustrative. Copy only pieces appropriate to the actual component. For library code verify package/version and upstream license.

All versions