Skip to content

feat: implement custom scan profiles and wcag filtering - #53

Open
kritikukreja6-create wants to merge 1 commit into
harshika53:mainfrom
kritikukreja6-create:feature/custom-scan-profiles
Open

feat: implement custom scan profiles and wcag filtering#53
kritikukreja6-create wants to merge 1 commit into
harshika53:mainfrom
kritikukreja6-create:feature/custom-scan-profiles

Conversation

@kritikukreja6-create

Copy link
Copy Markdown

Description

This PR introduces Custom Scan Profiles and WCAG Level Filtering, allowing users to target specific accessibility compliance levels (A, AA, AAA) rather than running a generic blanket scan.

By defining custom parameters, developers can now test against specific regional or legal requirements, making the scanning engine much more versatile.

This is my contribution for SSOC '26! 🚀

Fixes / Closes

Closes #<INSERT_YOUR_ISSUE_NUMBER_HERE>

Changes Made

This is a full-stack implementation spanning the React UI, Flask API, and Node.js scanner:

Frontend (React / Tailwind CSS)

  • Created a new ScanProfileForm component to allow users to define and save custom configurations (e.g., toggling wcag2a, wcag2aa, wcag2aaa).
  • Updated ScanUrlForm to include a dynamic dropdown menu that fetches and displays saved profiles from the database.
  • Modified the useScanner hook and api.ts to seamlessly attach the selected profileId to the scanning payload.

Backend (Flask / MongoDB)

  • Added POST /api/profiles and GET /api/profiles endpoints in app.py to handle the creation and retrieval of user-defined profiles.
  • Updated the core /api/scan endpoint to fetch a given profile's specific axeConfig from MongoDB and pass it down to the Node.js scanning service as a stringified argument.

Scanner Engine (Node.js / axe-core)

  • Modified scan_service.js to catch custom CLI arguments.
  • Injected the dynamic customAxeConfig into the Puppeteer page.evaluate() context so axe.run() only tests against the user-requested rules.

Screenshots

(Consider dragging and dropping the screenshot of your UI with the new dropdown menu and the create form here!)

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have tested the full-stack flow locally (Frontend, Flask, and Node scanner)
  • My commit messages follow the conventional commit format (e.g., feat: ...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant