| Id | MissingMechanismforUserProvidedDescriptions |
| Summary | Users cannot attach descriptions to uploaded content, reducing accessibility of shared media |
| Severity | N/A |
| Category | Assistive Technologies / Content Descriptions |
| Affects | Resource files and Kotlin and Java files |
| Implementation |
Dynamic Analysis - Could be a custom rule lint to find image uploads
without contentDescription input, but it doesn't have a
clear pattern. On the other hand, dynamic analysis is ideal for
finding elements without content description in running apps (already
covered by Accessibility Test Framework)
|
Application lacks input fields or mechanisms for users to provide
contentDescription when uploading images, leaving
user-generated images without proper text alternatives.
Creates content barriers for assistive technology users who cannot access meaning or context of user-uploaded images, excluding them from full participation in social features and potentially missing critical visual information shared by other users.
<!-- Image upload form without alt text input -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<ImageView
android:id="@+id/preview_image"
android:layout_width="200dp"
android:layout_height="200dp"
android:scaleType="centerCrop" />
<Button
android:id="@+id/select_image_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Choose Image" />
<Button
android:id="@+id/upload_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Upload Photo" />
<!-- Missing: Alt text input field -->
</LinearLayout>
class ImageUploadActivity : AppCompatActivity() {
private fun setupImageUpload() {
val selectButton = findViewById<Button>(R.id.select_image_button)
val uploadButton = findViewById<Button>(R.id.upload_button)
val previewImage = findViewById<ImageView>(R.id.preview_image)
selectButton.setOnClickListener {
openImagePicker()
}
uploadButton.setOnClickListener {
// Missing: No way to collect alt text from user
uploadImageToServer()
}
}
private fun uploadImageToServer() {
// Upload without accessibility description
val imageData = getSelectedImageData()
val uploadRequest = UploadRequest().apply {
image = imageData
// Missing: altText or description field
}
// Images uploaded without content descriptions
apiService.uploadImage(uploadRequest)
}
private fun displayUploadedImage(imageUrl: String) {
val imageView = findViewById<ImageView>(R.id.uploaded_image)
// Loading user-uploaded image without description
Glide.with(this)
.load(imageUrl)
.into(imageView)
// Missing: Setting contentDescription from user-provided alt text
}
}