Claude Skills Guide

Claude Code Mobile App Accessibility Testing Workflow

Mobile app accessibility is no longer optional—it’s a legal requirement and a business imperative. With over 1 billion people worldwide living with some form of disability, ensuring your mobile app is accessible isn’t just good practice; it’s essential for reaching your full audience. This guide walks you through building a comprehensive accessibility testing workflow using Claude Code, covering automated scanning, manual testing strategies, and continuous integration setup.

Understanding Mobile Accessibility Testing Fundamentals

Mobile accessibility testing differs significantly from web accessibility testing due to the unique characteristics of mobile interfaces. Touch targets, screen reader behavior, text scaling, and gesture-based navigation all require specialized attention. Before diving into the workflow, it’s crucial to understand the key areas where mobile apps commonly fail:

Claude Code can assist in identifying these issues through its analysis capabilities, but a structured workflow ensures consistent, thorough testing across your entire app.

Setting Up Your Accessibility Testing Environment

The first step in building your accessibility testing workflow is establishing the right toolset. Claude Code works best when combined with platform-specific testing tools.

For iOS projects, you’ll want to integrate Accessibility Inspector and XCTest accessibility tests. For Android, Accessibility Scanner and Espresso tests provide similar capabilities. Claude Code can help generate test cases and analyze results across both platforms.

Here’s a basic setup for adding accessibility tests to your mobile project:

// iOS - XCTest Accessibility Example
func testButtonAccessibilityLabel() {
    let app = XCUIApplication()
    app.launch()
    
    let button = app.buttons["submitButton"]
    XCTAssertTrue(button.exists, "Submit button should exist")
    XCTAssertEqual(button.label, "Submit Form", 
                   "Button should have meaningful accessibility label")
    XCTAssertGreaterThan(button.frame.width, 44, 
                        "Touch target must be at least 44 points")
}
// Android - Espresso Accessibility Test
@Test
fun testButtonHasContentDescription() {
    val button = onView(withId(R.id.submitButton))
    button.check(matches(withContentDescription("Submit Form")))
    button.check(matches(hasMinimumSize(48, 48)))
}

Creating an Automated Testing Pipeline with Claude Code

Once your environment is configured, you can build an automated pipeline that catches accessibility issues during development. Claude Code can help generate test cases, analyze code for potential issues, and document findings.

Step 1: Code Analysis Phase

Before running your app, use Claude Code to analyze your codebase for common accessibility anti-patterns. This proactive approach catches issues early:

// Claude Code can analyze component patterns like this:
const problematicPatterns = [
  { pattern: /placeholder=""/, issue: "Empty placeholder lacks context" },
  { pattern: /accessibilityLabel=null/, issue: "Missing accessibility label" },
  { pattern: /importantForAccessibility="no"/, issue: "Hidden from screen readers" }
];

Step 2: Runtime Testing

Integrate accessibility testing into your regular test suite. For React Native apps, you might use Jest with jest-native matcher:

// React Native Accessibility Test
describe('Accessibility Tests', () => {
  it('form inputs have accessible labels', () => {
    render(<TextInput 
      placeholder="Email address"
      accessibilityLabel="Email input"
    />);
    
    expect(screen.getByPlaceholderText('Email address'))
      .toHaveAccessibilityLabel('Email input');
  });
  
  it('buttons meet minimum touch target size', () => {
    const button = render(<TouchableOpacity style={{width: 40, height: 40}} />);
    const dimensions = button.getByTestId('button').props.style;
    
    expect(dimensions.width).toBeGreaterThanOrEqual(44);
    expect(dimensions.height).toBeGreaterThanOrEqual(44);
  });
});

Step 3: Screen Reader Testing

Automated tests can’t catch everything. VoiceOver (iOS) and TalkBack (Android) testing requires manual verification. Create a checklist for Claude Code to help guide your manual testing sessions:

Implementing Continuous Integration for Accessibility

To maintain accessibility over time, integrate testing into your CI/CD pipeline. Claude Code can help generate the configuration files and scripts needed for automated enforcement.

# GitHub Actions Accessibility Check
name: Accessibility Tests
on: [push, pull_request]

jobs:
  accessibility:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - name: Run iOS Accessibility Tests
        run: |
          xcodebuild test \
            -scheme MyApp \
            -destination 'platform=iOS Simulator' \
            -only-testing:AccessibilityTests
      - name: Run Android Accessibility Tests
        run: |
          ./gradlew testAccessibilityDebug
      - name: Upload Results
        uses: actions/upload-artifact@v3
        with:
          name: accessibility-report
          path: reports/accessibility/

Prioritizing and Fixing Accessibility Issues

Not all accessibility issues carry equal weight. Use this prioritization framework when addressing findings:

  1. Critical: Screen reader can’t access content or complete core flows
  2. High: Touch targets too small, missing labels on interactive elements
  3. Medium: Color contrast below threshold, poor focus indicators
  4. Low: Decorative elements not hidden from screen readers

When fixing issues, Claude Code can suggest solutions based on your codebase:

// Before: Missing accessibility
<Button onPress={submitForm}>Go</Button>

// After: Accessible implementation
<Button 
  onPress={submitForm}
  accessibilityLabel="Submit form"
  accessibilityHint="Sends your completed form for processing"
  testID="submitButton"
>
  Submit
</Button>

Measuring Accessibility Success

Track your accessibility progress over time with metrics:

Regular audits, combined with automated testing, create a sustainable workflow that improves accessibility over time without becoming a bottleneck in your development process.

Building Sustainable Accessibility Habits

The best accessibility workflow is one that becomes second nature to your team. By integrating testing into your development process, documenting common issues, and using Claude Code to assist with analysis and fixes, you can build accessible mobile apps that serve all users effectively.

Remember that accessibility is an ongoing commitment, not a one-time effort. As you add new features and update existing ones, continue to apply these testing practices to maintain the accessibility standards you’ve established.

Built by theluckystrike — More at zovo.one