
Cometchat A11y
Audit and fix CometChat UI Kit chat, call, and theme wiring so integrations meet WCAG 2.1 AA across React, RN, Angular, Android, iOS, and Flutter.
Install
npx skills add https://github.com/cometchat/cometchat-skills --skill cometchat-a11yWhat is this skill?
- Cross-family coverage for CometChat UI Kit React, React Native, Angular, Android V5/V6, iOS, and Flutter
- Targets WCAG 2.1 AA with five recurring integration failure modes called out explicitly
- Screen reader live regions and announcements for inbound messages
- Focus management on call screens plus prefers-reduced-motion handling
Adoption & trust: 1 installs on skills.sh; 35 GitHub stars.
Recommended Skills
Web Design Guidelinesvercel-labs/agent-skills
Lark Whiteboardlarksuite/cli
Ui Ux Pro Maxnextlevelbuilder/ui-ux-pro-max-skill
Sleek Design Mobile Appssleekdotdesign/agent-skills
Impeccablepbakaus/impeccable
Design Taste Frontendleonxlnx/taste-skill
Journey fit
Primary fit
First impact is while composing chat UI in Build, but the same checks matter again before Ship review and when Grow support hears accessibility complaints. Frontend shelf covers keyboard paths, live regions, and contrast in custom themes layered on CometChat components.
SKILL.md
READMESKILL.md - Cometchat A11y
## Purpose Accessibility for CometChat integrations. Out-of-the-box, the UI Kit components are mostly accessible — the kit's own buttons, inputs, and lists ship with semantic markup. Production gaps appear in the wiring **around** the kit: custom call surfaces, navigation, focus management on screen transitions, and contrast in custom themes. Target: **WCAG 2.1 AA**. The skill writes code that meets this baseline. --- ## The five gaps that trip integrations (any family) 1. **Color contrast in custom themes.** A brand color picked for "looks nice in the brand book" may be 3.2:1 against the text — fails AA's 4.5:1 minimum. 2. **Focus management on chat screen entry.** Tab/screen reader user lands on the chat screen but focus stays on the previous trigger button. They have to manually navigate into the message list every time. 3. **No live region announcement for new messages.** Screen reader users don't know a new message arrived unless they navigate the message list and hear the new item. 4. **Keyboard-only users can't navigate the conversation list.** Click handlers bound to `<div>` instead of `<button>` skip keyboard events. 5. **Reduced-motion users see decorative animations.** Typing-indicator dots, message bubble entrance animations, transition effects — should respect `prefers-reduced-motion`. This skill addresses each one across families. --- ## 1. Color contrast — the theme audit CometChat themes are CSS variables (web/RN) or color tokens (native/Flutter). Override a single color and you might fail AA. ### Web / Angular — CSS variable contrast check ```ts // scripts/check-contrast.ts (run in CI or as a one-shot) function contrastRatio(hex1: string, hex2: string): number { const luminance = (hex: string) => { const rgb = hex.match(/\w\w/g)!.map(c => parseInt(c, 16) / 255).map(c => c <= 0.03928 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4 ); return 0.2126 * rgb[0] + 0.7152 * rgb[1] + 0.0722 * rgb[2]; }; const l1 = luminance(hex1); const l2 = luminance(hex2); return (Math.max(l1, l2) + 0.05) / (Math.min(l1, l2) + 0.05); } // Pull the values from your CSS variables const fg = getComputedStyle(document.documentElement).getPropertyValue("--cometchat-text-color").trim(); const bg = getComputedStyle(document.documentElement).getPropertyValue("--cometchat-background-color").trim(); const ratio = contrastRatio(fg, bg); if (ratio < 4.5) { console.warn(`Text/background contrast ${ratio.toFixed(2)}:1 fails WCAG AA (need ≥4.5:1)`); } ``` In CI, add this to your test suite. The skill writes a starter version into `tests/a11y/contrast.test.ts`. ### React Native / native / Flutter — manual audit at theme-design time Use a contrast-checker tool (browser extensions, https://webaim.org/resources/contrastchecker/) on the theme tokens before shipping. There's no runtime DOM to audit on native. The kit's default theme tokens pass AA. Custom palettes need the audit. **Common fail:** brand purple #6750A4 against white background = 6.6:1 (passes). Same purple against `#F0F0F0` light gray = 5.7:1 (passes). Same purple against `#999999`