• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

equalizedigital / accessibility-checker / 16595726345

29 Jul 2025 12:12PM UTC coverage: 31.425%. First build
16595726345

Pull #1124

github

web-flow
Merge 268959df8 into 1cdb35c39
Pull Request #1124: Release v1.29.0

183 of 273 new or added lines in 50 files covered. (67.03%)

2827 of 8996 relevant lines covered (31.43%)

1.56 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/includes/classes/Rules/AffectedDisabilities.php
1
<?php
2
/**
3
 * Enumeration of disabilities affected by accessibility issues.
4
 *
5
 * Defines constants for affected disabilities and provides translated labels.
6
 * This class is a static utility and should not be extended or instantiated.
7
 *
8
 * @package EqualizeDigital\AccessibilityChecker
9
 */
10

11
namespace EqualizeDigital\AccessibilityChecker\Rules;
12

13
/**
14
 * Enumeration of disabilities affected by accessibility issues.
15
 *
16
 * Defines constants for affected disabilities and provides translated labels.
17
 * This class is a static utility and should not be extended or instantiated.
18
 *
19
 * @package EqualizeDigital\AccessibilityChecker
20
 */
21
final class AffectedDisabilities {
22
        /**
23
         * Prevent instantiation.
24
         */
25
        private function __construct() {}
26

27
        public const BLIND             = 'blind';
28
        public const LOW_VISION        = 'low_vision';
29
        public const DEAFBLIND         = 'deafblind';
30
        public const MOBILITY          = 'mobility';
31
        public const COLORBLIND        = 'colorblind';
32
        public const COGNITIVE         = 'cognitive';
33
        public const SEIZURE           = 'seizure_disorders';
34
        public const VESTIBULAR        = 'vestibular_disorders';
35
        public const DEAF              = 'deaf';
36
        public const HARD_OF_HEARING   = 'hard_of_hearing';
37
        public const LANGUAGE_LEARNERS = 'language_learners';
38
        public const ADHD              = 'adhd';
39
        public const DYSLEXIA          = 'dyslexia';
40

41
        /**
42
         * Get translated label for a disability key.
43
         *
44
         * @param string $key Disability key constant.
45
         * @return string Translated label.
46
         */
47
        public static function get_label( string $key ): string {
48
                switch ( $key ) {
NEW
49
                        case self::BLIND:
×
NEW
50
                                return esc_html__( 'Blind', 'accessibility-checker' );
×
NEW
51
                        case self::LOW_VISION:
×
NEW
52
                                return esc_html__( 'Low-vision', 'accessibility-checker' );
×
NEW
53
                        case self::DEAFBLIND:
×
NEW
54
                                return esc_html__( 'Deafblind', 'accessibility-checker' );
×
NEW
55
                        case self::MOBILITY:
×
NEW
56
                                return esc_html__( 'Mobility', 'accessibility-checker' );
×
NEW
57
                        case self::COLORBLIND:
×
NEW
58
                                return esc_html__( 'Colorblind', 'accessibility-checker' );
×
NEW
59
                        case self::COGNITIVE:
×
NEW
60
                                return esc_html__( 'Cognitive', 'accessibility-checker' );
×
NEW
61
                        case self::SEIZURE:
×
NEW
62
                                return esc_html__( 'Seizure disorders', 'accessibility-checker' );
×
NEW
63
                        case self::VESTIBULAR:
×
NEW
64
                                return esc_html__( 'Vestibular disorders', 'accessibility-checker' );
×
NEW
65
                        case self::DEAF:
×
NEW
66
                                return esc_html__( 'Deaf', 'accessibility-checker' );
×
NEW
67
                        case self::HARD_OF_HEARING:
×
NEW
68
                                return esc_html__( 'Hard of hearing', 'accessibility-checker' );
×
NEW
69
                        case self::LANGUAGE_LEARNERS:
×
NEW
70
                                return esc_html__( 'Language learners', 'accessibility-checker' );
×
NEW
71
                        case self::ADHD:
×
NEW
72
                                return esc_html__( 'ADHD', 'accessibility-checker' );
×
NEW
73
                        case self::DYSLEXIA:
×
NEW
74
                                return esc_html__( 'Dyslexia', 'accessibility-checker' );
×
75
                        default:
NEW
76
                                return '';
×
77
                }
78
        }
79
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc