A tool for detecting Linear Navigation Failures (LNF) in webpages using screenshot input and LLM analysis.
This project evaluates whether keyboard navigation follows a meaningful, logical order, as required by WCAG 2.4.3 (Focus Order).
-
User provides:
- Numbered screenshot(s) of a webpage (focus order labeled) (ex:
disneyworld.png) - A prompt file (
ex: prompt.txt)
- Numbered screenshot(s) of a webpage (focus order labeled) (ex:
-
Backend:
- Sends screenshot + prompt to an LLM
- Reconstructs navigation flow
- Detects Linear Navigation Failures
-
Frontend:
- Built with React
- Displays navigation transitions and flagged issues
- Create a .env file in the root directory
touch .env - Add your API key:
OPENAI_API_KEY=your_api_key_hereReplaceyour_api_key_herewith your actual key
Install these dependencies first:
pip install openai
pip install flask
pip install flask_cors
Then run python app.py
cd frontend
npm install
npm run devcurl -X POST http://localhost:5000/api/analyze \
-F "image_file=@disneyworld.png" \
-F "prompt_file=@prompt.txt" \
-F "subject_name=Disney World" \
-o output.json