-
Notifications
You must be signed in to change notification settings - Fork 6
feat: add WAVE API integration for comprehensive accessibility analysis (t215.4) #941
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Summary of ChangesHello @marcusquinn, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the accessibility auditing capabilities by incorporating the WAVE API. This integration allows for more comprehensive analysis of web pages, including those rendered with CSS and JavaScript, and provides new dedicated commands for various WAVE functionalities. The changes improve the overall robustness and utility of the accessibility helper script, making it a more powerful tool for identifying and addressing accessibility issues. Highlights
Changelog
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request adds a significant new feature by integrating the WAVE API for accessibility analysis. The implementation is well-structured, with new commands for different WAVE functionalities and integration into the existing audit command. The documentation updates are comprehensive and clear. I've identified a few areas for improvement regarding adherence to the style guide, script efficiency, and user feedback. Overall, this is a great addition, and my comments are focused on making the script more robust and performant.
| http_code=$(curl -s -w "%{http_code}" -o "$report_file" \ | ||
| --max-time "$LONG_TIMEOUT" \ | ||
| "$api_url" 2>/dev/null) || { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Redirecting curl's stderr to /dev/null violates the repository style guide (rule #50) and can hide important error messages (e.g., certificate issues, DNS problems), making debugging difficult. Please remove 2>/dev/null to allow curl errors to be visible. The || block will still correctly handle network-level failures that cause curl to exit with a non-zero status. This issue is also present in wave_docs and wave_credits.
| http_code=$(curl -s -w "%{http_code}" -o "$report_file" \ | |
| --max-time "$LONG_TIMEOUT" \ | |
| "$api_url" 2>/dev/null) || { | |
| http_code=$(curl -s -w "%{http_code}" -o "$report_file" \ | |
| --max-time "$LONG_TIMEOUT" \ | |
| "$api_url") || { |
References
- Rule docs: update branch creation to recommend worktrees for parallel sessions #50 states that
2>/dev/nullis acceptable only when redirecting to log files, not for blanket suppression. The current usage hides potentially importantcurlerrors from the user, making debugging harder. (link)
| title=$(echo "$result" | jq -r '.title // "N/A"') | ||
| type=$(echo "$result" | jq -r '.type // "N/A"') | ||
| summary=$(echo "$result" | jq -r '.summary // "N/A"') | ||
| purpose=$(echo "$result" | jq -r '.purpose // "N/A"') | ||
| actions=$(echo "$result" | jq -r '.actions // "N/A"') | ||
| details=$(echo "$result" | jq -r '.details // "N/A"') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function makes multiple calls to jq on the same JSON data, which is inefficient as it forks a new process for each variable. You can extract all required values with a single jq call for better performance and to make the code more robust if values contain special characters. This pattern is repeated in wave_credits as well.
| title=$(echo "$result" | jq -r '.title // "N/A"') | |
| type=$(echo "$result" | jq -r '.type // "N/A"') | |
| summary=$(echo "$result" | jq -r '.summary // "N/A"') | |
| purpose=$(echo "$result" | jq -r '.purpose // "N/A"') | |
| actions=$(echo "$result" | jq -r '.actions // "N/A"') | |
| details=$(echo "$result" | jq -r '.details // "N/A"') | |
| mapfile -t values < <(echo "$result" | jq -r '.title // "N/A", .type // "N/A", .summary // "N/A", .purpose // "N/A", .actions // "N/A", .details // "N/A"') | |
| title="${values[0]}" | |
| type="${values[1]}" | |
| summary="${values[2]}" | |
| purpose="${values[3]}" | |
| actions="${values[4]}" | |
| details="${values[5]}" |
| echo "" | ||
|
|
||
| # WAVE API (if key is available) | ||
| if load_wave_api_key 2>/dev/null; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suppressing the stderr of load_wave_api_key prevents the user from seeing the detailed and helpful error messages that the function provides when an API key cannot be found. This makes it harder for users to diagnose setup issues. The else block provides a generic message, but the specific instructions from load_wave_api_key are more valuable. Please remove 2>/dev/null.
| if load_wave_api_key 2>/dev/null; then | |
| if load_wave_api_key; then |
…is (t215.4) Integrate WAVE API v3.1 into accessibility-helper.sh with full CLI support: - wave: run WAVE analysis with configurable report types (1-4) - wave-mobile: mobile viewport (375px) analysis - wave-docs: look up WAVE item documentation (no API key needed) - wave-credits: check remaining API credits - Automatic inclusion in full audit when API key is available - Secure credential loading via gopass/env/credentials.sh Decision: chose report type 2 as default (item details) — balances cost (2 credits) with useful detail. Type 1 (stats only) is too sparse for actionable remediation; types 3/4 available for deep dives.
- Pass URL via sys.argv instead of string interpolation in python3 URL encoder — prevents shell injection when URLs contain single quotes - Update subagent-index.toon to mention WAVE API in accessibility-helper description
9f39736 to
4081cb6
Compare
🔍 Code Quality Report�[0;35m[MONITOR]�[0m Code Review Monitoring Report �[0;34m[INFO]�[0m Latest Quality Status: �[0;34m[INFO]�[0m Recent monitoring activity: 📈 Current Quality Metrics
Generated on: Tue Feb 10 15:53:46 UTC 2026 Generated by AI DevOps Framework Code Review Monitoring |
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|



Summary
accessibility-helper.shfor comprehensive CSS/JS-rendered accessibility analysiswave,wave-mobile,wave-docs,wave-credits— covering all 4 WAVE report types with desktop and mobile viewport supportauditcommand alongside Lighthouse and pa11y (gracefully skips if no API key)sys.argvto avoid shell injection)accessibility-audit.mdandaccessibility.mdwith usage examples, report type reference, and API key setup instructionssubagent-index.toonto reflect WAVE API capabilityQuality
local var="$1", explicit returns, shared-constants integrationTesting
bash -nsyntax validation passesshellcheckpasses cleanTask
Closes t215.4