๐จ Work in Progress ๐จ
The provided scripts are designed to monitor color contrast issues, specifically for dark mode. The process involves creating test cases based on the top Wikipedia articles and running accessibility tests using pa11y axe-core. The results are logged to the console and a CSV file, capturing color contrast violations.
Color Contrast Tester
โ
โโโ index.js
โ
โโโ report/
โ โโโ index.html
โ โโโ simplifiedList.csv
โ
โโโ modules/
โ โโโ csvWriter.js
โ โโโ htmlGenerator.js
โ โโโ topArticles.js
โ โโโ accessibility.test.js
โ
โโโ README.md
-
Ensure you have the required environment variables set: MW_SERVER, MEDIAWIKI_USER, and MEDIAWIKI_PASSWORD.
-
Run the tests using the following command:
node index.js --project en.wikipedia
Run against mobile:
node index.js --project fr.wikipedia --mobile --query "minervanightmode=1"
Run against mobile against 10 random articles with sleep duration of 0s.
node index.js --project fr.wikipedia --mobile --query "minervanightmode=1" --source random -z 0 --limit 10
Run against desktop night theme against 100 random articles.
node index.js --project fr.wikipedia --query "useskin=vector-2022&vectornightmode=1" --source random --limit 100
This tool is currently in development and should be used cautiously. Stay tuned for updates and improvements!