Hidden Content & Duplicate Images
Must Not
Section 508:
- N/A
WCAG 2.0:
- 1.1.1
Hidden, decorative and duplicate images, content and artifact elements must not be exposed to assistive technologies
Hidden or inactive content that is, for example, behind another window. should not be visible to users of assistive technology as users may think they can interact with this content.
For non-images this can be done by setting the appropriate properties or states on an object or element so it is properly indicated to assistive technology as off-screen, obscured, or hidden.
iOS
UIView, UIControl
, and UIImageView
objects along with any custom objects descended from these are not accessibility enabled by default. Other UI elements such as UIButton
and UILabel
are accessibility enabled and must be accessibility disabled if they are not meant to be accessible.
iOS Example
[somethingDecorative setIsAccessibilityElement:NO];
iOS Failure
[somethingDecorative setIsAccessibilityElement:YES];
Android
Developers should ensure that elements that do not convey meaning or information to a user are not focusable via theandroid:focusable
property.
Android Example
//blue rectangle used for decoration that does not receive focus - in this case android:focusable is false by default <ImageView android:layout_height="wrap_content" android:id="@+id/image_1" android:src="@drawable/blue"></ImageView>
Android Failure
//blue rectangle used for decoration that can receive focus <ImageView android:layout_height="wrap_content" android:id="@+id/image_1" android:src="@drawable/blue" android:focusable="true"></ImageView>
HTML
For images, provide alt
text that is null ({code)alt="") or use CSS background images. For input fields not meant for the user, use the attribute type="hidden"
. For other inactive buttons and elements set the disabled
attribute.
HTML Example
Button that is not currently used:
<button type="button" disabled="disabled"></button>
HTML Failure
Button that is not currently used:
<button type="button"></button>
Testing
Procedures | Results |
---|---|
|
Either of the following checks must be true:
|