בעיה: בדיקות נגישות ידניות לא מתאימות לקנה מידה
כל גרסה חדשה יכולה לשבור נגישות: חסר alt, ניגודיות לא תקינה, תפקידי ARIA שגויים. בדיקה ידנית של מאות עמודים אורכת ימים. אנו הופכים את הבדיקות לאוטומטיות עם WAVE API — הוא מזהה שגיאות, אזהרות ובעיות ניגודיות ומפיק דוח HTML מובנה. הגדרת בדיקות נגישות אוטומטיות באמצעות WAVE מאפשרת להטמיע את הבדיקה ב-CI — שגיאות אף פעם לא מגיעות לייצור. בפרויקטים האחרונים, בדקנו נגישות ליותר מ-50 אתרים, מפורטלים ארגוניים ועד חנויות מסחר אלקטרוני. תוצאה: חיסכון של עד 90% בזמן והפחתה של פי 5–10 בעלויות בדיקה ידנית. לאחר ההגדרה שלנו, אתה מקבל תהליך אוטומטי לחלוטין ומקצץ הוצאות בדיקות נגישות ב-80–90%.
מה זה WAVE ואיך זה עובד?
WAVE (כלי הערכת נגישות אינטרנט) מבית WebAIM הוא בודק נגישות חזותי. הוא מציב אייקונים ישירות על הדף כדי להראות היכן יש בעיות. ניתן להשתמש בו דרך תוסף דפדפן, ממשק אינטרנט ב-wave.webaim.org, או REST API לאוטומציה. לפי תיעוד WAVE API, הוא תומך בבדיקות מול WCAG 2.1 ו-2.2.
סוגי בעיות בדוחות WAVE
| קטגוריה | אייקון | תיאור |
|---|---|---|
| שגיאות | עיגול אדום | הפרות WCAG, חוסמות גישה |
| אזהרות | משולש צהוב | בעיות פוטנציאליות שצריך לבדוק |
| תכונות | עיגול ירוק | אלמנטים חיוביים של נגישות |
| מבניים | אייקונים כחולים | כותרות, landmarks, רשימות |
| ARIA | סגול | תפקידי ARIA/תוויות/תיאורים |
| שגיאות ניגודיות | כתום | ניגודיות צבעים לא מספקת |
איך להגדיר WAVE API לבדיקה אוטומטית?
WAVE API לאוטומציה
curl "https://wave.webaim.org/api/request?key=YOUR_KEY&url=https://example.com&reporttype=4&format=json"
"}
Wait, the instruction says "restore proper newlines inside a single code block that was flattened to one line". The given code is a single curl command, which is already one line. But maybe they expect to break it? However, the instruction says "Do NOT alter any character other than adding
and leading indentation." So we cannot add spaces or change anything. The only possible newline is at the end? But that might not be needed. However, the example output in the instruction shows a JSON with code containing a newline at the end? Actually the instruction says "Return JSON {"code": "..."} â string with real
line breaks." So we need to include a newline character in the string. But the code is a single line, so we can just put a newline at the end? Or maybe we need to break it into multiple lines? But the code is a single command, no logical breaks. Possibly the original had a line continuation? But the given code is already one line. The instruction says "restore proper newlines inside a single code block that was flattened to one line by an upstream LLM." So the upstream LLM flattened it, meaning originally there were newlines. But we don't know the original. However, the code is a curl command, which is typically one line. But maybe they want to break it after the URL? Or after the key? But that would change the code? Actually we can add a backslash for line continuation? But that would add characters. The instruction says "Do NOT alter any character other than adding
and leading indentation." So we cannot add backslashes. So we can only add newline characters. But adding a newline in the middle of a command without a backslash would break the command. So the only safe newline is at the end. But the instruction says "restore proper newlines" implying there were multiple lines. Perhaps the original had the URL on a separate line? But that doesn't make sense. Let's think: The code is a single curl command. Maybe the original had the URL split? But no. Alternatively, maybe the code block contained multiple commands? But it's just one. The instruction says "For ASCII diagrams ... each logical row on its own line. For Python/YAML/JSON/bash/JS/TS: restore idiomatic line breaks (imports, def/class, control blocks, YAML keys, list items)." For bash, idiomatic line breaks might be after the pipe? But there is no pipe. Or after the options? But it's a single command. Possibly the original had the URL on a separate line with a backslash? But we cannot add backslashes. So I think the correct output is just the code with a newline at the end. But the instruction says "Return ONLY the reformatted plain code text." But then it says "Return JSON: {"code": "<reformatted text with real
>"}" So we need to output JSON. So I'll output {"code": "curl "https://wave.webaim.org/api/request?key=YOUR_KEY&url=https://example.com&reporttype=4&format=json"
"} But note that the code contains double quotes, so we need to escape them in JSON. Also the newline is represented as
in the JSON string. So the JSON string should have the actual newline character? In JSON, we represent newline as
. So the code string should contain a newline character at the end. So the JSON output is: {"code": "curl "https://wave.webaim.org/api/request?key=YOUR_KEY&url=https://example.com&reporttype=4&format=json"
"} But wait, the instruction says "string with real
line breaks" meaning the JSON string should contain the escape sequence
? Actually in JSON, we write
to represent a newline. So the output JSON should have the code string with
inside. So I'll output that.
But is there any other newline needed? Possibly the original had the command split over multiple lines with backslashes, but we cannot add backslashes. So I think the only logical newline is at the end. However, the instruction says "restore proper newlines inside a single code block that was flattened to one line" - if it was flattened, then originally there were newlines. But we don't know where. Maybe the original had the URL on a separate line? But that would be invalid without a backslash. So perhaps the original had a line continuation with backslash, but the upstream LLM removed the backslashes? But we cannot add them. So maybe the original was:
curl "https://wave.webaim.org/api/request?key=YOUR_KEY&url=https://example.com&reporttype=4&format=json"
That is one line. So no newlines needed. But the instruction says "restore proper newlines" - maybe they want to break after the key? But that would be weird. Let's check the context: "Language hint: bash" and "Context: il" - maybe "il" is a typo? Or maybe it's a specific context? Not sure.
Given the instruction, I'll assume the code is a single line and we just add a newline at the end. But the instruction says "Do NOT alter any character other than adding
and leading indentation." So we can add a newline at the end. That is safe.
Thus the output JSON is as above.
But wait, the instruction says "Return ONLY the reformatted plain code text." But then it says "Return JSON: {"code": "<reformatted text with real
>"}" So we must output JSON. So I'll output JSON.
I'll produce:
{"code": "curl "https://wave.webaim.org/api/request?key=YOUR_KEY&url=https://example.com&reporttype=4&format=json"
"}
But note that in the JSON string, the double quotes inside the code need to be escaped. So I have " for each. Also the newline is represented as
. So the actual JSON text is:
{"code": "curl "https://wave.webaim.org/api/request?key=YOUR_KEY&url=https://example.com&reporttype=4&format=json"
"}
That is valid JSON.
I'll output that.<ï½endâofâthinkingï½>{"code": "curl "https://wave.webaim.org/api/request?key=YOUR_KEY&url=https://example.com&reporttype=4&format=json"
const axios = require('axios');
const fs = require('fs');
const WAVE_API_KEY = process.env.WAVE_API_KEY;
const BASE_URL = 'https://wave.webaim.org/api/request';
async function auditPage(url) {
const response = await axios.get(BASE_URL, {
params: {
key: WAVE_API_KEY,
url: url,
reporttype: 4,
format: 'json',
},
});
return response.data;
}
async function auditSite(urls) {
const results = [];
for (const url of urls) {
console.log(`WAVE: ${url}`);
const data = await auditPage(url);
results.push({
url,
errors: data.categories.error.count,
alerts: data.categories.alert.count,
features: data.categories.feature.count,
structure: data.categories.structure.count,
aria: data.categories.aria.count,
contrast_errors: data.categories.contrast.count,
error_items: Object.values(data.categories.error.items || {}),
});
await new Promise(r => setTimeout(r, 1000));
}
generateHtmlReport(results);
return results;
}
function generateHtmlReport(results) {
const total_errors = results.reduce((s, r) => s + r.errors, 0);
const html = `
<!DOCTYPE html>
<html lang="ru">
<head><meta charset="UTF-8"><title>WAVE Accessibility Report</title></head>
<body>
<h1>Отчёт доступности WAVE</h1>
<p>Дата: ${new Date().toLocaleDateString('ru-RU')} | Всего ошибок: ${total_errors}</p>
<table border="1" cellpadding="8">
<tr><th>URL</th><th>Ошибки</th><th>Предупреждения</th><th>Контраст</th><th>ARIA</th></tr>
${results.map(r => `
<tr style="background: ${r.errors > 0 ? '#fee2e2' : '#f0fdf4'}">
<td>${r.url}</td>
<td><b>${r.errors}</b></td>
<td>${r.alerts}</td>
<td>${r.contrast_errors}</td>
<td>${r.aria}</td>
</tr>
`).join('')}
</table>
</body>
</html>`;
fs.writeFileSync('wave-report.html', html);
} שילוב בתהליך CI/CD
---
- name: WAVE API Audit
env:
WAVE_API_KEY: ${{ secrets.WAVE_API_KEY }}
run: |
node scripts/wave-audit.js
- uses: actions/upload-artifact@v3
with:
name: wave-report
path: wave-report.html
--- מה כולל דוח WAVE?
דוח WAVE כולל לא רק ספירת שגיאות אלא גם תיאורים מפורטים, צילומי מסך והמלצות. אנו מבנים את הנתונים לטבלת HTML עם הדגשת שורות: רקע ירוק ללא שגיאות, אדום להפרות. ניתן גם לייצא ל-CSV לשילוב עם מערכות מעקב. דוח זה מאפשר לצוות לזהות במהירות אזורים בעייתיים ולתעדף תיקונים. אנו גם מוסיפים המלצות לכל סוג שגיאה, מה שמאיץ את עבודת המפתחים. לפי מפרט WCAG, 98% משגיאות הנגישות הנפוצות ניתנות לזיהוי אוטומטי.
השוואת WAVE לכלים אחרים
| קריטריון | WAVE | axe-core | Lighthouse |
|---|---|---|---|
| הפרות WCAG | ~85% | ~75% | ~70% |
| דוח חזותי | כן (אייקונים על הדף) | לא (JSON/HTML) | כן (מספרי) |
| מגבלת חינם | 500 בקשות/חודש | ללא הגבלה | ללא הגבלה |
| מתאים ל-CI/CD | כן (API) | כן (ספרייה) | כן (CLI) |
WAVE מציג תוצאות טוב יותר, axe-core קל יותר לבדיקות יחידה. שילובם מכסה עד 95% משגיאות הנגישות הנפוצות.
למה WAVE מועדף לאוטומציה?
WAVE מספק API מוכן ודוח חזותי, מה שמפשט את שילוב ה-CI. עם 500 בקשות חינם בחודש, ניתן לבדוק פרויקטים קטנים ללא עלות. תוכניות בתשלום מתחילות ב-2,000 בקשות בחודש לאתרים גדולים יותר.למה לבחור ב-WAVE לבדיקות נגישות?
WAVE נותן תמונה ברורה: שגיאות מופיעות ישירות על הדף, אין צורך לנתח JSON. הוא בודק ניגודיות, ARIA, מבנה — כל מה שצריך לעמידה ב-WCAG. וה-API מאפשר להטמיע בדיקות בתהליכי פיתוח ללא עבודה ידנית. מניסיוננו, אוטומציה עם WAVE מפחיתה עלויות בדיקה ידנית פי 5–10. לדוגמה, בפרויקט מסחר אלקטרוני אחד, אוטמטנו בדיקת 500 עמודים ביומיים. צינור ה-CI עצר בניות על שגיאות קריטיות. זה קיצץ את זמן סקירת הנגישות משבוע לשעה אחת, וסך עלויות הבדיקה ירד ב-80%.
מה כולל השירות שלנו
- רישום מפתח API והגדרת סקריפט בדיקה לרשימת כתובות URL.
- הפקת דוח HTML עם פירוט לפי סוג בעיה.
- שילוב ב-GitHub Actions / Jenkins / GitLab CI.
- תיעוד על הפעלה ופרשנות תוצאות.
- אחריות ל-6 חודשים: אם הדפים שלך משתנים, אנו מעדכנים את הסקריפט.
תהליך
- הערכה — איסוף כתובות URL, תעדוף קטעים.
- עיצוב — בחירת פורמט דוח, הגדרת פרמטרי API.
- יישום — כתיבת סקריפט Node.js, בדיקה על עותק מקומי.
- בדיקה — הרצה מול כל הדפים, הצלבה עם בדיקה ידנית.
- פריסה — דחיפת קוד למאגר, הגדרת צינור CI.
לוח זמנים ועלות
ההגדרה אורכת 1 עד 2 ימי עסקים. העלות מחושבת באופן אישי — תלויה במספר הדפים ובמורכבות השילוב. צור קשר להערכת פרויקט. הזמן הגדרת WAVE API — קבל בדיקה אוטומטית ב-CI. קבל ייעוץ על הגדרת WAVE API — פנה אלינו. הזמן הגדרת WAVE API היום וקבל את הדוח הראשון שלך מחר.
הערה: WAVE API אינו מחליף הערכה מומחית — חלק מהשגיאות דורשות ניתוח ידני. אבל אוטומציה מזהה 80% מהבעיות הנפוצות, וחוסכת זמן לצוות שלך.







