Class: Uniword::Accessibility::Rules::ColorUsageRule
- Inherits:
-
AccessibilityRule
- Object
- AccessibilityRule
- Uniword::Accessibility::Rules::ColorUsageRule
- Defined in:
- lib/uniword/accessibility/rules/color_usage_rule.rb
Overview
Color Usage Rule - WCAG 1.4.1 Use of Color
Responsibility: Check that color is not the only means of conveying information Single Responsibility: Color usage validation only
WCAG 1.4.1 Level A: Color must not be the only visual means
Instance Attribute Summary
Attributes inherited from AccessibilityRule
#config, #level, #rule_id, #wcag_criterion
Instance Method Summary collapse
-
#check(_document) ⇒ Array<AccessibilityViolation>
Check document color usage.
Methods inherited from AccessibilityRule
Constructor Details
This class inherits a constructor from Uniword::Accessibility::AccessibilityRule
Instance Method Details
#check(_document) ⇒ Array<AccessibilityViolation>
Check document color usage
17 18 19 20 21 22 23 24 25 26 |
# File 'lib/uniword/accessibility/rules/color_usage_rule.rb', line 17 def check(_document) [] # Color usage checking requires analyzing text runs and styles # This is a placeholder implementation # Actual implementation would check for: # - Text colored differently without other indicators # - Links that rely only on color # - Form elements using only color for errors end |