-
Notifications
You must be signed in to change notification settings - Fork 13
Visual Perception
Most accessibility guidelines treat design as a rigid set of prohibitions. A11Y.md treats visual perception as a system of intelligent compensations, allowing for modern, dense UIs without sacrificing inclusion.
The standard rule is clear: Text must never be smaller than 12px under the default Standard (AA) profile. This is a House Rule† — WCAG defines no minimum font size at any level; 12px is this standard's ergonomic policy.
However, modern financial dashboards and massive data tables often require extreme density. Banning anything under 12px outright often results in developers ignoring the rule entirely.
A11Y.md introduces a proportional compensation rule:
You may use a 10px font size ONLY IF you increase the contrast ratio to 7:1 (the AAA-level ratio of SC 1.4.6) and document the relaxation in
EXCEPTIONS.md.
This trade-off is defined by this standard's policy, not by WCAG (which has no size-for-contrast compensation mechanism). It teaches the AI and the developer a critical lesson: if you reduce one vector of legibility (size), you must compensate by maximizing another vector (contrast).
When dealing with color, AI agents often struggle to understand when they are violating accessibility rules. To solve this, A11Y.md injects a single, universal heuristic into the AI's context:
"If I remove the color, what information do I lose?"
If an input border turns red to indicate an error, the AI applies the heuristic:
- Without color, does the user know there is an error? -> No.
- Conclusion: A violation of Semantic Redundancy.
The Fix: The AI is forced to add an icon (
If a pie chart uses Red for "Loss" and Green for "Profit", the AI applies the heuristic:
- Without color, can the user distinguish the slices? -> No, they look like identical shades of gray to some colorblind users.
- Conclusion: A violation of Visual Patterns.
The Fix: The AI will generate textures (stripes vs dots) or explicit text labels pointing to the slices, ensuring the chart is understandable in pure grayscale.
Project A11Y.md | The Persistent Context System for Accessibility Created by Felipe A. Carriço | MIT License
♿ Accessibility is not a feature; it's a precondition for use.