跳到正文
cccskills
免费在 GitHub 公开

global-a11y-i18n-expert

Expert guide for Web Accessibility (WCAG a11y) and Internationalization (i18n) / Panduan ahli untuk Aksesibilitas Web dan Internasionalisasi.

中文简介正在准备中。当前显示原文说明。

实测评分 未实测

查看安装方法

包含的文件(1)

  • SKILL.md7.7 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Global Accessibility (WCAG 2.2 AA) & i18n Expert (2026 Edition)

English | Bahasa Indonesia


<a name="english"></a>

English

Description

Production guide for building universally accessible, globally adaptable web applications adhering to WCAG 2.2 Level AA standards and modern Internationalization (i18n) architecture. Covers type-safe translation schemas (next-intl), CSS logical properties for bidirectional layout flow (LTR & RTL), accessible keyboard trap navigation, screen reader affordances, and timezone-resilient UTC serialization.

Trigger Conditions

  • Enterprise and public sector readiness requiring legal WCAG 2.2 AA compliance.
  • Adding multi-language routing (/en, /id, /ja, /ar) to Next.js 15 App Router.
  • Supporting Right-to-Left (RTL) reading flows for Arabic or Hebrew markets.
  • Fixing keyboard navigation focus traps or screen reader accessibility bugs.
  • Localizing currency formatting (Intl.NumberFormat) and localized date displays.

Accessible Modal Component with Focus Trap (HTML5 Native Dialog)

// src/components/ui/AccessibleModal.tsx
'use client';

import { useEffect, useRef } from 'react';

interface ModalProps {
  isOpen: boolean;
  onClose: () => void;
  title: string;
  children: React.ReactNode;
}

export function AccessibleModal({ isOpen, onClose, title, children }: ModalProps) {
  const dialogRef = useRef<HTMLDialogElement>(null);

  useEffect(() => {
    const dialog = dialogRef.current;
    if (!dialog) return;

    if (isOpen && !dialog.open) {
      dialog.showModal(); // Native browser focus-trap and backdrop handling
    } else if (!isOpen && dialog.open) {
      dialog.close();
    }
  }, [isOpen]);

  return (
    <dialog
      ref={dialogRef}
      onClose={onClose}
      aria-labelledby="modal-title"
      className="rounded-xl border border-slate-200 bg-white p-6 shadow-xl backdrop:bg-slate-950/50 max-w-lg w-full outline-none"
    >
      <div className="flex items-center justify-between border-b border-slate-100 pb-3">
        <h2 id="modal-title" className="text-lg font-bold text-slate-900">
          {title}
        </h2>
        <button
          onClick={onClose}
          aria-label="Close dialog"
          className="rounded-lg p-1.5 text-slate-400 hover:bg-slate-100 hover:text-slate-700 focus-visible:ring-2 focus-visible:ring-slate-950"
        >
          ✕
        </button>
      </div>
      <div className="mt-4">{children}</div>
    </dialog>
  );
}

Type-Safe Locale Routing with next-intl (Next.js 15)

// src/i18n/request.ts
import { getRequestConfig } from 'next-intl/server';
import { notFound } from 'next/navigation';

export const locales = ['en', 'id', 'ar'] as const;
export type Locale = (typeof locales)[number];

export default getRequestConfig(async ({ locale }) => {
  if (!locales.includes(locale as any)) notFound();

  return {
    messages: (await import(`../../messages/${locale}.json`)).default,
  };
});

CSS Logical Properties for RTL Support

Never use physical directional properties (left, right). Use logical properties so layouts flip automatically in RTL locales:

/* Bad: Physical properties break in RTL */
.card-bad {
  margin-left: 16px;
  text-align: left;
  border-left: 2px solid #0f172a;
}

/* Good: Logical properties adapt seamlessly */
.card-good {
  margin-inline-start: 1rem;
  text-align: start;
  border-inline-start: 2px solid #0f172a;
}

Orchestration & Integration

  • modern-web-guidance: HTML5/CSS standards, modern browser APIs, and accessibility guidelines.
  • design-system-architect: Accessible design tokens, semantic focus indicators, and headless primitives.
  • accessibility-testing-expert: Automates axe-core and Pa11y compliance tests in CI.
  • ui-ux-pro-max: Ensures color contrast ratios meet the 4.5:1 WCAG AA baseline and RTL layouts.
  • visual-ui-auditor: Multimodal vision auditing of contrast, typography, and focus ring visibility.
  • anti-slop: Anti-slop accessibility, eliminating fake pseudo-buttons (<div onClick>) and missing labels.
  • senior-frontend: Implements accessible headless primitives and semantic HTML.
  • nextjs-app-router-expert: Configures multi-locale middleware and streaming localized routes.

<a name="bahasa-indonesia"></a>

Bahasa Indonesia

Integrasi Orkestrasi

Terhubung dan mengorkestrasi bersama modern-web-guidance, design-system-architect, accessibility-testing-expert, ui-ux-pro-max, visual-ui-auditor, anti-slop, senior-frontend, dan nextjs-app-router-expert.

Deskripsi

Panduan produksi untuk membangun aplikasi web yang dapat diakses secara universal dan diadaptasi secara global sesuai standar WCAG 2.2 Level AA dan arsitektur Internasionalisasi (i18n) modern. Mencakup skema terjemahan type-safe (next-intl), properti logika CSS (CSS logical properties) untuk alur dua arah (LTR & RTL), navigasi keyboard tanpa jebakan fokus (focus trap), dukungan pembaca layar (screen reader), serta serialisasi waktu UTC yang kebal anomali zona waktu.

Kondisi Pemicu

  • Kesiapan pengadaan software untuk enterprise atau sektor publik dengan kewajiban hukum kepatuhan WCAG 2.2 AA.
  • Menambahkan dukungan multi-bahasa (/en, /id, /ar) pada Next.js 15 App Router.
  • Mendukung bahasa yang dibaca dari Kanan ke Kiri (RTL) seperti Bahasa Arab.
  • Mengatasi masalah navigasi keyboard atau hilangnya garis fokus (focus outline).
  • Memformat mata uang lokal (Rupiah, Dollar) menggunakan API Intl.NumberFormat native.

Format Mata Uang dan Tanggal Terlokalisasi

// src/lib/formatters.ts
export function formatCurrency(amountCents: number, locale = 'id-ID', currency = 'IDR') {
  return new Intl.NumberFormat(locale, {
    style: 'currency',
    currency,
    minimumFractionDigits: 0,
  }).format(amountCents / (currency === 'IDR' ? 1 : 100));
}

export function formatLocalizedDate(date: Date | string, locale = 'id-ID') {
  return new Intl.DateTimeFormat(locale, {
    dateStyle: 'long',
    timeStyle: 'short',
    timeZone: 'Asia/Jakarta',
  }).format(new Date(date));
}

3 Hukum Wajib Aksesibilitas Web

  1. Utamakan HTML Semantik: Gunakan tag asli seperti <button>, <nav>, <dialog> daripada tag <div> yang diberi handler onClick. Browser sudah menyediakan dukungan keyboard dan screen reader gratis pada elemen asli.
  2. Kontras Warna Minimal 4.5:1: Teks harus memiliki kontras minimal 4.5:1 terhadap warna latar belakangnya (standar WCAG 2.2 AA).
  3. Gunakan Properti Logika CSS: Hindari margin-left atau padding-right. Gunakan margin-inline-start dan padding-inline-end agar tata letak otomatis menyesuaikan saat dibuka dalam mode bahasa Arab (RTL).

Integrasi Orkestrasi

  • modern-web-guidance: Standar HTML5/CSS, API browser modern, dan pedoman aksesibilitas.
  • design-system-architect: Token desain aksesibel, indikator fokus semantik, dan komponen headless.
  • accessibility-testing-expert: Menjalankan pengujian otomatis axe-core di pipeline CI/CD.
  • ui-ux-pro-max: Menjamin keterbacaan tipografi dan kontras warna yang nyaman di mata sesuai WCAG AA.
  • visual-ui-auditor: Audit visual multimodal untuk kontras warna, tipografi, dan visibilitas garis fokus.
  • anti-slop: Aksesibilitas anti-slop, mengeliminasi pseudo-button palsu (<div onClick>) dan label hilang.
  • senior-frontend: Membangun komponen UI aksesibel menggunakan HTML semantik.
  • nextjs-app-router-expert: Mengelola perutean dinamis berbasis bahasa pada URL.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Expert guide for Agent-to-Agent (A2A) Protocol interoperability, /.well-known/agent.json Agent Cards, cross-vendor swarm task negotiation, and bridging A2A with Model Context Protocol (MCP) / Panduan ahli protokol interoperabilitas antar-agen (A2A), Agent Cards, dan integrasi A2A + MCP.

中文简介正在准备中。当前显示原文说明。

roedyrustam/vibes-plug1132026年10月23日 更新

Expert guide for automated and manual Web Accessibility (a11y) testing — axe-core, Pa11y, Playwright a11y, screen reader testing, and WCAG 2.2 Level AA/AAA compliance / Panduan ahli pengujian aksesibilitas web.

中文简介正在准备中。当前显示原文说明。

roedyrustam/vibes-plug1132026年10月23日 更新

Expert guide for intelligent model cascading and routing — complexity-scored task routing from Fast (Composer 2.5, Grok 4.7/4.6) to Medium (Gemini 4 Argon, GPT-5.6 Sol, Claude Opus 5.5) and High (Claude Sonnet 5.5, Claude Fable 5.1, Muse Wonder) / Panduan ahli untuk kaskade dan routing model cerdas.

中文简介正在准备中。当前显示原文说明。

roedyrustam/vibes-plug1132026年10月23日 更新

Expert guide for intelligent model cascading and routing — complexity-scored task routing from Flash/Haiku to Sonnet/Opus/Astra, dynamic escalation with quality gates, 40-60% token cost reduction while maintaining output quality / Panduan ahli untuk kaskade dan routing model cerdas — routing tugas berbasis skor kompleksitas dari Flash/Haiku ke Sonnet/Opus/Astra, eskalasi dinamis dengan gerbang kualitas, pengurangan biaya token 40-60% dengan kualitas output terjaga.

中文简介正在准备中。当前显示原文说明。

roedyrustam/vibes-plug1132026年10月23日 更新

Master guide for Affective Computing, emotional AI, and real-time sentiment analysis through native multimodal tokens (voice intonation and facial micro-expressions) / Panduan utama komputasi afektif, AI emosional, dan analisis sentimen real-time melalui token multimodal native.

中文简介正在准备中。当前显示原文说明。

roedyrustam/vibes-plug1132026年10月23日 更新

Expert guide for Affective Computing, emotional AI, and real-time sentiment analysis through native multimodal tokens (voice intonation and facial micro-expressions) / Panduan ahli komputasi afektif, AI emosional, dan analisis sentimen real-time melalui token multimodal native.

中文简介正在准备中。当前显示原文说明。

roedyrustam/vibes-plug1132026年10月23日 更新

查看 roedyrustam 的全部技能

报告此技能的问题