Thanks to visit codestin.com
Credit goes to Github.com

Skip to content

MakhBeth/androidA11y

Repository files navigation

Android Accessibility Inspector

Note: This is a vibe-coded single-user tool. Free to use.

A local accessibility testing tool for Android apps using ADB and UI Automator. Runs WCAG compliance checks and keyboard navigation analysis.

Requirements

  • macOS
  • Python 3
  • ADB (Android Debug Bridge)
  • Android device connected via USB with USB debugging enabled

Quick Start

  1. Connect your Android device and ensure ADB can see it:

    adb devices
  2. Start the inspector server:

    python3 server.py
  3. Open http://localhost:8080/ui_inspector_v2.html

  4. Click 🔄 Refresh in the toolbar to capture the current screen

Web UI Features

The inspector UI provides these controls in the toolbar:

Button Action
🔄 Refresh Capture UI hierarchy, screenshot, and run accessibility check
♿ Run A11y Check Run accessibility check on current data
👁️ Show Overlays Toggle element highlight overlays
📸 Screenshot Download the current screenshot

The sidebar has two tabs:

  • UI Tree - Browse and search the UI hierarchy
  • Accessibility - View WCAG compliance report with score and issues

WCAG Checks Performed

  • Touch target sizes (44x44px minimum)
  • Text alternatives for images
  • Accessible names for interactive elements
  • Focus indicators
  • Semantic structure
  • Content description quality
  • State information
  • Text sizing
  • Color contrast metadata
  • Input labels and validation
  • Heading structure
  • Keyboard focus

Project Structure

androidA11y/
├── server.py                 # HTTP server with API endpoints
├── parse_ui.py               # XML to JSON parser
├── wcag_inspector.py         # WCAG compliance checker
├── tab11y_scanner.py         # Tab order scanner
├── ui_inspector_v2.html      # Main inspector interface
├── inspector.js              # Inspector JavaScript
├── refresh_ui.sh             # CLI: refresh UI data
├── scan_all.sh               # CLI: run all checks
├── start_server.sh           # CLI: start server (simple http)
├── window_dump.xml           # Raw UI Automator dump
├── ui_data.json              # Parsed UI hierarchy
├── accessibility_report.json # WCAG report
└── screen.png                # Device screenshot

CLI Usage

If you prefer command line over the web UI:

./refresh_ui.sh               # Capture UI and run checks
./scan_all.sh                 # Run WCAG + keyboard checks
python3 wcag_inspector.py     # WCAG compliance only
python3 tab11y_scanner.py     # Keyboard navigation only

API Endpoints

When running server.py, these endpoints are available:

Endpoint Method Description
/api/refresh POST Capture UI, screenshot, parse, and run scan
/api/scan POST Run accessibility scan only

Documentation

  • ACCESSIBILITY_INSPECTOR_GUIDE.md - Full usage guide
  • UI_INSPECTOR_GUIDE.md - UI inspector guide
  • WCAG_CHECKS.md - Details on WCAG checks performed

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •