@diegovelasquezweb/a11y-engine 0.11.48 → 0.11.49

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@diegovelasquezweb/a11y-engine",
3
- "version": "0.11.48",
3
+ "version": "0.11.49",
4
4
  "description": "WCAG 2.2 accessibility audit engine — scanner, analyzer, and report builders",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -321,10 +321,15 @@ export async function discoverRoutes(page, baseUrl, maxRoutes, crawlDepth = 2) {
321
321
  try {
322
322
  const targetUrl = new URL(routePath, origin).toString();
323
323
  if (page.url() !== targetUrl) {
324
- await page.goto(targetUrl, {
324
+ const response = await page.goto(targetUrl, {
325
325
  waitUntil: "domcontentloaded",
326
326
  timeout: 10000,
327
327
  });
328
+ if (response && response.status() >= 400) {
329
+ routes.delete(routePath);
330
+ log.warn(`Discovery skip ${routePath}: HTTP ${response.status()}`);
331
+ continue;
332
+ }
328
333
  }
329
334
 
330
335
  const hrefs = await page.$$eval("a[href]", (elements) =>