agentsclimarketplace

Accessibility

Skill m-de-graaff/skills/skills/accessibility

Use when building or changing any user-facing UI — a component, form, modal, menu, icon button, custom control, colour or focus style — on web, iOS, or Android. Also use when auditing for WCAG compliance, when a design uses colour alone to carry meaning, when adding a click handler to something that isn't a button, and when asked about screen readers, keyboard navigation, contrast, or target size.From its SKILL.md

Install
npx -y skills add m-de-graaff/skills --skill accessibility

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

8.7 KB, as published. Nobody here has run it

Accessibility (WCAG 2.2 AA)

Interfaces that work for people using screen readers, switch controls, keyboards, magnification, or no pointer at all.

Core principle: use the native element. A <button>, a SwiftUI Button, an Android Button arrives with focus, keyboard activation, role, and state already correct. Every accessible custom control is a reimplementation of one of those, and most of them are worse.

The order to work in

  1. Role — what is this, functionally? Reach for the semantic native element first. Only build a custom control when no native one has the behaviour.
  2. Name — every interactive element and every meaningful image needs one. Icon-only controls need an explicit label; the icon itself must be hidden from assistive tech.
  3. State and value — pressed, expanded, selected, checked, invalid, busy. Announced, not just drawn.
  4. Operability — reachable by keyboard, big enough to hit, visible when focused.
  5. Feedback — errors and dynamic changes reach the user without a visual scan.

Name, role, value is the contract. If any of the three is missing or wrong, the control is broken for assistive tech regardless of how it looks.

WCAG 2.2 AA, the parts people actually miss

CriterionLevelRequirement
1.4.3 Contrast (Minimum)AA4.5:1 body text, 3:1 for text ≥24px (or ≥19px bold)
1.4.11 Non-text ContrastAA3:1 for UI component boundaries, icons, and focus indicators
1.4.10 ReflowAAUsable at 320 CSS px wide with no two-axis scrolling
2.4.7 Focus VisibleAAThe keyboard focus indicator is visible
2.4.11 Focus Not ObscuredAA, new in 2.2Sticky headers and toolbars must not fully hide the focused element
2.5.7 Dragging MovementsAA, new in 2.2Anything draggable needs a single-pointer alternative — a tap target, a menu, arrow keys
2.5.8 Target Size (Minimum)AA, new in 2.224×24 CSS px, or adequate spacing between smaller targets
3.2.6 Consistent HelpA, new in 2.2Help mechanisms appear in the same relative order on every page
3.3.3 Error SuggestionAASay how to fix it, not just that it's wrong
3.3.7 Redundant EntryA, new in 2.2Don't ask for the same information twice in one process
3.3.8 Accessible AuthenticationAA, new in 2.2No cognitive function test (puzzle, memorised password recall, transcription) without an alternative. Allow paste and password managers

Focus Appearance (2.4.13) is AAA, not AA. It specifies the indicator's minimum area and contrast. Worth doing; don't claim AA conformance rests on it, and don't skip 2.4.7 because you did 2.4.13.

4.1.1 Parsing was removed in WCAG 2.2. Duplicate IDs and unclosed tags still break assistive tech in practice — they're just no longer a conformance failure.

Target size across platforms

The numbers differ and getting them wrong fails an audit:

PlatformMinimumSource
Web24×24 CSS px (spacing exception applies)WCAG 2.2 SC 2.5.8
iOS44×44 ptApple HIG
Android48×48 dpMaterial / Android a11y guide

Native platform guidance is stricter than WCAG here. Meet the platform's number.

Cross-platform mapping

NeedWebiOS (SwiftUI)Android (Compose)
Name<label>, or aria-label when no visible text.accessibilityLabel()contentDescription
Descriptionaria-describedby.accessibilityHint()stateDescription
Rolenative element, else role="button".accessibilityAddTraits(.isButton)semantics { role = Role.Button }
Live updatesaria-live="polite".accessibilityLiveRegion(.polite)semantics { liveRegion = LiveRegionMode.Polite }
Hide decorationaria-hidden="true".accessibilityHidden(true)contentDescription = null
Group as onerole="group" + label.accessibilityElement(children: .combine)semantics(mergeDescendants = true)

Example — an icon-only control, done three ways

The single most common defect, and the same fix everywhere: the control gets a name, the icon is hidden so it isn't announced twice.

<button type="submit" aria-label="Search">
  <svg aria-hidden="true" focusable="false">…</svg>
</button>
Button(action: delete) { Image(systemName: "trash") }
    .accessibilityLabel("Delete item")
    .accessibilityHint("Permanently removes this item")
IconButton(onClick = onDelete) {
    Icon(Icons.Default.Delete, contentDescription = "Delete item")
}

Note what is not here: no role="button" on the web (the element supplies it), no .isButton trait on iOS (Button supplies it). Adding them is noise; adding them to a <div> instead of using a <button> is the actual bug.

Anti-patterns

PatternWhy it failsInstead
<div onclick>No focus, no Enter/Space, no role, no disabled state<button>. If you truly can't: role="button", tabindex="0", and handlers for both Enter and Space
Colour as the only signalInvisible to colour-blind users and in high-contrast modesColour plus text, an icon, or a border change
Modal that doesn't trap focusKeyboard users tab into the page behind itContain focus while open, restore it to the trigger on close, and always allow Escape (SC 2.1.2)
alt="Image of a chart"Screen readers already announce the roleDescribe the content: alt="Sales rose 40% in Q3"
outline: none with no replacementRemoves the only focus signal keyboard users haveStyle :focus-visible deliberately, at 3:1 contrast
aria-label on a non-interactive <div>Frequently not announced at allPut the label on something with a role
Placeholder as the only labelDisappears on input; often fails contrastA real <label>, visually hidden if the design demands

Checklist

  • Every interactive element is reachable and operable by keyboard alone
  • Focus is always visible, and never fully hidden behind sticky UI
  • Icon-only controls have a name; decorative graphics are hidden
  • Targets meet the platform minimum (24 CSS px / 44 pt / 48 dp)
  • No meaning carried by colour alone
  • Text contrast 4.5:1, UI and focus indicators 3:1
  • Modals trap focus, restore it on close, and close on Escape
  • Errors say how to fix, and are announced not just coloured
  • Login allows paste and password managers
  • Layout works at 320 CSS px and 200% text scaling
  • Dynamic updates announce via a live region

Rationalizations

ExcuseReality
"We'll do an accessibility pass later"Retrofitting means rebuilding the controls. The native element costs nothing today
"Our users don't use screen readers"Keyboard, zoom, and voice control users are the majority of the benefit, and you can't see them in analytics
"The designer specified this contrast"Then the design fails and the design has to change. Say so with the ratio
"It's an internal tool"Your colleagues have the same range of ability as your customers
"The library component isn't accessible"Then it isn't done. Wrap it, patch it, or replace it

Verifying

Automated tooling (axe, Lighthouse, Accessibility Scanner, Xcode Accessibility Inspector) catches roughly a third of issues — contrast, missing names, bad ARIA. It cannot tell you whether a name is meaningful or an order is sensible.

The manual pass that finds the rest: unplug the mouse and complete the task; then run the platform screen reader (VoiceOver, TalkBack, NVDA) and do it again with the screen off.

Non-goals

Doesn't do visual design or brand colour selection — it says which combinations fail. Doesn't cover AAA. Doesn't audit content quality, only its accessibility.

References

Source

Adapted from ECC by Affaan Mohamed (MIT).

Keep looking

Skills are one crate of 607,533. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.