AccessibleHub is an innovative React Native mobile application designed to help developers learn and implement accessibility best practices. Built with Expo and guided by WCAG 2.2 standards, the app provides interactive demos, comparisons, and practical examples of how to create inclusive mobile experiences.
Below is the main directory layout inside the my-app
folder (the core Expo project):
my-app/
ββ .expo/
ββ app/
β ββ index.tsx # Home screen
β ββ components.tsx # Main screen listing accessible components
β ββ practices.tsx # Main screen listing best practices
β ββ tools.tsx # Mobile Accessibility Tools screen
β ββ frameworks-comparison.tsx # Framework comparison screen
β ββ accessibility-instruction.tsx # Instruction & Community screen
β ββ settings.tsx # Settings & accessibility toggles
β ββ _layout.tsx # Global Drawer/Navigation layout
β
ββ accessible-components/
β ββ _layout.tsx
β ββ accessible-button.tsx # Buttons & Touchables demo
β ββ accessible-dialog.tsx # Modal dialogs demo
β ββ accessible-form.tsx # Accessible forms demo
β ββ accessible-media.tsx # Images/media content demo
β ββ accessible-advanced.tsx # Combined advanced components (Tabs, Progress, Alerts, Sliders)
β
ββ practices-screens/
β ββ _layout.tsx
β ββ guidelines.tsx # WCAG 2.2 guidelines
β ββ gestures.tsx # Gesture tutorial
β ββ navigation.tsx # Logical focus order / navigation focus
β ββ screen-reader.tsx # Screen reader support
β ββ semantics.tsx # Semantic structure
β ββ accessibility-instruction.tsx # (If further instruction sub-screens needed)
β
ββ context/
β ββ ThemeContext.tsx # Custom theming & accessibility settings
β
ββ assets/
β ββ images/
β β ββ placeholder1.png
β β ββ placeholder2.png
β β ββ placeholder3.png
β ββ fonts/ (if custom fonts used)
β
ββ scripts/ # (Optional scripts, e.g., for builds or linting)
ββ package.json
ββ tsconfig.json
ββ babel.config.js
ββ README.md # This file
AccessibleHub aims to:
- Educate developers on mobile accessibility techniques
- Demonstrate WCAG principles in React Native context
- Compare frameworks (React Native, Flutter, Ionic) from an accessibility standpoint
- Provide ready-to-use code examples with best practices
-
Home Screen (
index.tsx
)- Introductory page with quick stats and navigation to core sections
- Announces the appβs purpose and highlights the main features
-
Accessibility Components (
components.tsx
)- Overview of multiple sub-demos in
accessible-components/
folder:- Buttons & Touchables (
accessible-button.tsx
) - Form Controls (
accessible-form.tsx
) - Media Content (
accessible-media.tsx
) - Modal Dialogs (
accessible-dialog.tsx
) - Advanced (
accessible-advanced.tsx
): Tabs, Progress, Alerts, Sliders
- Buttons & Touchables (
- Overview of multiple sub-demos in
-
Best Practices (
practices.tsx
)- Index of best practice demos in
practices-screens/
folder:- WCAG Guidelines (
guidelines.tsx
) - Gestures (
gestures.tsx
) - Screen Reader Support (
screen-reader.tsx
) - Semantic Structure (
semantics.tsx
) - Focus/Navigation (
navigation.tsx
)
- WCAG Guidelines (
- Index of best practice demos in
-
Mobile Accessibility Tools (
tools.tsx
)- Summaries of TalkBack, VoiceOver, Inspector, Contrast Analyzer, etc.
- Link out to external docs or tool usage
-
Framework Comparison (
frameworks-comparison.tsx
)- Evaluates popular frameworks (React Native, Flutter, Ionic)
- Compares accessibility support, performance, dev experience
-
Instruction & Community (
accessibility-instruction.tsx
)- Replaces older βachievementsβ approach
- Focuses on broader accessibility instruction, community links, success stories
-
Settings (
settings.tsx
)- Toggles for Dark Mode, High Contrast, Large Text, etc.
- Stores user preferences in local storage
- Provides immediate accessibility feedback
- React Native + Expo
- Expo Router for navigation
- ThemeContext for dynamic theming (light/dark, large text, high contrast)
- Accessibility integrated via
AccessibilityInfo
,accessibilityRole
,accessibilityLabel
, etc. - Context API for global state (settings, theming)
- TypeScript for robust type definitions
-
Clone the Repository
git clone https://github.com/your-username/AccessibleHub.git cd AccessibleHub/my-app
-
Install Dependencies
# npm npm install # or yarn yarn install
-
Configure Expo
npm install -g expo-cli npx expo login
-
Start Development
npx expo start # or yarn start
-
Android Build
npx expo build:android # or using EAS eas build --platform android # or using Expo locally (note: you need WSL or a Linux terminal to build!) eas build --platform android --profile preview --local
-
iOS Build
npx expo build:ios # or using EAS eas build --platform ios
-
Local Builds (Advanced)
- Requires Android SDK, Xcode (on macOS), or WSL on Windows
- Use
eas build --local
with properly configured environment
- Windows 10/11
- Basic command line knowledge
- Existing Expo/React Native project
# Enable WSL
wsl --install
# Update WSL
wsl --update
# Install essential tools
sudo apt update
sudo apt upgrade -y
sudo apt install -y curl git unzip
# Install Java Development Kit
sudo apt install -y openjdk-17-jdk-headless
# Install Node.js via NVM
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
source ~/.bashrc
nvm install --lts
npm install -g yarn
# Install Gradle
wget https://services.gradle.org/distributions/gradle-8.5-bin.zip -P /tmp
sudo mkdir -p /opt/gradle
sudo unzip -d /opt/gradle /tmp/gradle-8.5-bin.zip
Add the following to ~/.bashrc
:
# Java Home
export JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64
# Android SDK Configuration
export ANDROID_HOME=$HOME/android
export ANDROID_SDK_ROOT=${ANDROID_HOME}
export PATH=$PATH:/opt/gradle/gradle-8.5/bin:${ANDROID_HOME}/cmdline-tools/latest/bin:${ANDROID_HOME}/platform-tools:${ANDROID_HOME}/tools:${ANDROID_HOME}/tools/bin
# Source the updated profile
source ~/.bashrc
# Create Android SDK directory
mkdir -p $HOME/android
# Install Android SDK command-line tools
wget https://dl.google.com/android/commandlinetools/commandlinetools-linux-10406996_latest.zip -O /tmp/cmdline-tools.zip
unzip /tmp/cmdline-tools.zip -d $HOME/android/cmdline-tools
# Install EAS CLI
npm install -g eas-cli
# Navigate to your project in WSL
cd /mnt/c/YourProjectPath
# Initialize EAS for your project
eas init
# Configure build
eas build:configure
# Build Android App Bundle (.aab)
eas build --platform android --local
# Build APK for testing
eas build --platform android --profile preview --local
# Create a keystore (if not already created)
keytool -genkey -v -keystore my-release-key.keystore \
-alias my-key-alias -keyalg RSA -keysize 2048 -validity 10000
# Download Bundle Tool
wget https://github.com/google/bundletool/releases/download/1.15.6/bundletool-all-1.15.6.jar \
-O bundletool.jar
# Convert AAB to Universal APK
java -jar bundletool.jar build-apks \
--bundle=your-app.aab \
--output=my_app.apks \
--mode=universal \
--ks=my-release-key.keystore \
--ks-pass=pass:your_password \
--ks-key-alias=my-key-alias \
--key-pass=pass:your_password
# Extract Universal APK
unzip my_app.apks -d apk_output
- TalkBack (Android) & VoiceOver (iOS)
- Accessibility Scanner (Android)
- Manual checks: ensuring correct roles, labels, states
- Performance: React DevTools, profiling, etc.
- Fork & create a feature branch
- Implement changes with thorough accessibility considerations
- Open a Pull Request describing your feature/fix
- Ensure WCAG compliance and relevant tests
- W3C WCAG 2.2
- React Native Accessibility Docs
- Expo Documentation
- MDN Accessibility Guides
Distributed under the MIT License. See LICENSE
for more details.
Empowering Developers, Enabling Accessibility.
Your feedback and contributions are welcome!