• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2014 Google Inc.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5  * use this file except in compliance with the License. You may obtain a copy of
6  * the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13  * License for the specific language governing permissions and limitations under
14  * the License.
15  */
16 
17 package com.google.android.apps.common.testing.accessibility.framework;
18 
19 /**
20  * Abstract base class for all accessibility checks. Abstract subclasses include:
21  * <ul>
22  *   <li>{@link AccessibilityHierarchyCheck} - the base class for all checks that run against
23  *   {@code AccessibilityHierarchy}</li>
24  *   <li>{@link AccessibilityEventCheck} - the base class for all checks that that run against
25  *   {@code AccessibilityEvent}</li>
26  *   <li>Deprecated {@link AccessibilityViewHierarchyCheck} - the base class for all checks that run
27  *   against {@code View}s</li>
28  * </ul>
29  *
30  * <p>Classes extending this one must implement {@code runCheck...} that return {@code List}s of
31  * a subclass of {@code AccessibilityCheckResult}.
32  */
33 public abstract class AccessibilityCheck {
34 
35   /** Categories of accessibility checks. */
36   public enum Category {
37 
38     /** Checks for controls whose content labels are missing or confusing. */
39     CONTENT_LABELING,
40 
41     /** Checks for touch targets that could cause difficulty for users with motor impairments. */
42     TOUCH_TARGET_SIZE,
43 
44     /** Checks for elements that may be difficult to see due to low contrast. */
45     LOW_CONTRAST,
46 
47     /**
48      * Checks for conditions that impact accessibility due to the way a UI presents itself to
49      * accessibility services.
50      */
51     IMPLEMENTATION;
52   }
53 }
54