accessibility-hub 0.4.0 → 0.5.0

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/EXAMPLES.md CHANGED
@@ -1,8 +1,8 @@
1
- # Ejemplos de Uso - AI-ccesibility
1
+ # Usage Examples - AI-ccesibility
2
2
 
3
- Ejemplos concretos de inputs y outputs para cada herramienta MCP.
3
+ Concrete input and output examples for each MCP tool.
4
4
 
5
- ## Tabla de Contenidos
5
+ ## Table of Contents
6
6
 
7
7
  - [analyze-with-axe](#analyze-with-axe)
8
8
  - [analyze-with-pa11y](#analyze-with-pa11y)
@@ -13,7 +13,7 @@ Ejemplos concretos de inputs y outputs para cada herramienta MCP.
13
13
 
14
14
  ## analyze-with-axe
15
15
 
16
- ### Ejemplo 1: Análisis básico de URL
16
+ ### Example 1: Basic URL analysis
17
17
 
18
18
  **Input:**
19
19
  ```json
@@ -44,11 +44,11 @@ Ejemplos concretos de inputs y outputs para cada herramienta MCP.
44
44
  "snippet": "<img src=\"logo.png\">"
45
45
  },
46
46
  "message": "Images must have alternate text",
47
- "humanContext": "**Contenido no textual (WCAG 1.1.1 - Nivel A)**\n\nTodo contenido no textual debe tener una alternativa de texto...",
47
+ "humanContext": "**Non-text content (WCAG 1.1.1 - Level A)**\n\nAll non-text content must have a text alternative...",
48
48
  "suggestedActions": [
49
- "Añadir atributo alt descriptivo a imágenes",
50
- "Usar aria-label para iconos decorativos con función",
51
- "Marcar imágenes decorativas con alt=\"\" vacío"
49
+ "Add descriptive alt attribute to images",
50
+ "Use aria-label for decorative icons with function",
51
+ "Mark decorative images with empty alt=\"\""
52
52
  ],
53
53
  "affectedUsers": ["screen-reader", "low-vision"],
54
54
  "priority": "critical",
@@ -77,7 +77,7 @@ Ejemplos concretos de inputs y outputs para cada herramienta MCP.
77
77
 
78
78
  ---
79
79
 
80
- ### Ejemplo 2: Análisis de HTML raw
80
+ ### Example 2: Raw HTML analysis
81
81
 
82
82
  **Input:**
83
83
  ```json
@@ -111,10 +111,10 @@ Ejemplos concretos de inputs y outputs para cada herramienta MCP.
111
111
  "snippet": "<input type=\"text\" placeholder=\"Email\">"
112
112
  },
113
113
  "message": "Form elements must have labels",
114
- "humanContext": "**Información y relaciones (WCAG 1.3.1 - Nivel A)**...",
114
+ "humanContext": "**Info and Relationships (WCAG 1.3.1 - Level A)**...",
115
115
  "suggestedActions": [
116
- "Asociar labels con inputs correctamente",
117
- "Usar aria-label si label visible no es posible"
116
+ "Associate labels with inputs correctly",
117
+ "Use aria-label if visible label is not possible"
118
118
  ],
119
119
  "affectedUsers": ["screen-reader", "cognitive"],
120
120
  "priority": "high",
@@ -127,7 +127,7 @@ Ejemplos concretos de inputs y outputs para cada herramienta MCP.
127
127
 
128
128
  ---
129
129
 
130
- ### Ejemplo 3: Con opciones avanzadas
130
+ ### Example 3: With advanced options
131
131
 
132
132
  **Input:**
133
133
  ```json
@@ -152,7 +152,7 @@ Ejemplos concretos de inputs y outputs para cada herramienta MCP.
152
152
 
153
153
  ## analyze-with-pa11y
154
154
 
155
- ### Ejemplo 1: Análisis con standard específico
155
+ ### Example 1: Analysis with specific standard
156
156
 
157
157
  **Input:**
158
158
  ```json
@@ -189,7 +189,7 @@ Ejemplos concretos de inputs y outputs para cada herramienta MCP.
189
189
  "snippet": "<img src=\"banner.jpg\">"
190
190
  },
191
191
  "message": "Img element missing an alt attribute. Use the alt attribute to specify a short text alternative.",
192
- "humanContext": "**Contenido no textual (WCAG 1.1.1 - Nivel A)**...",
192
+ "humanContext": "**Non-text content (WCAG 1.1.1 - Level A)**...",
193
193
  "affectedUsers": ["screen-reader", "low-vision"],
194
194
  "priority": "critical",
195
195
  "remediationEffort": "low",
@@ -217,7 +217,7 @@ Ejemplos concretos de inputs y outputs para cada herramienta MCP.
217
217
 
218
218
  ## analyze-contrast
219
219
 
220
- ### Ejemplo 1: Análisis básico de contraste
220
+ ### Example 1: Basic contrast analysis
221
221
 
222
222
  **Input:**
223
223
  ```json
@@ -288,7 +288,7 @@ Ejemplos concretos de inputs y outputs para cada herramienta MCP.
288
288
 
289
289
  ---
290
290
 
291
- ### Ejemplo 2: Análisis con nivel AAA
291
+ ### Example 2: Analysis with AAA level
292
292
 
293
293
  **Input:**
294
294
  ```json
@@ -341,7 +341,7 @@ Ejemplos concretos de inputs y outputs para cada herramienta MCP.
341
341
 
342
342
  ---
343
343
 
344
- ### Ejemplo 3: Análisis con APCA (WCAG 3.0 Draft)
344
+ ### Example 3: Analysis with APCA (WCAG 3.0 Draft)
345
345
 
346
346
  **Input:**
347
347
  ```json
@@ -412,14 +412,14 @@ Ejemplos concretos de inputs y outputs para cada herramienta MCP.
412
412
  }
413
413
  ```
414
414
 
415
- **Nota sobre APCA:**
416
- - `currentRatio` y `requiredRatio` usan valores Lc (Lightness contrast) en lugar de ratios
417
- - Umbrales: texto body (75Lc), texto grande (60Lc), no-texto (45Lc)
418
- - APCA es más preciso perceptualmente pero aún experimental
415
+ **Note about APCA:**
416
+ - `currentRatio` and `requiredRatio` use Lc (Lightness contrast) values instead of ratios
417
+ - Thresholds: body text (75Lc), large text (60Lc), non-text (45Lc)
418
+ - APCA is more perceptually accurate but still experimental
419
419
 
420
420
  ---
421
421
 
422
- ### Ejemplo 4: Análisis de sección específica
422
+ ### Example 4: Specific section analysis
423
423
 
424
424
  **Input:**
425
425
  ```json
@@ -434,7 +434,7 @@ Ejemplos concretos de inputs y outputs para cada herramienta MCP.
434
434
 
435
435
  ---
436
436
 
437
- ### Ejemplo 5: HTML con análisis de contraste
437
+ ### Example 5: HTML with contrast analysis
438
438
 
439
439
  **Input:**
440
440
  ```json
@@ -504,7 +504,7 @@ Ejemplos concretos de inputs y outputs para cada herramienta MCP.
504
504
 
505
505
  ## analyze-mixed
506
506
 
507
- ### Ejemplo 1: Análisis combinado básico
507
+ ### Example 1: Basic combined analysis
508
508
 
509
509
  **Input:**
510
510
  ```json
@@ -533,7 +533,7 @@ Ejemplos concretos de inputs y outputs para cada herramienta MCP.
533
533
  "tool": "axe-core",
534
534
  "severity": "critical",
535
535
  "message": "Images must have alternate text",
536
- "humanContext": "**Contenido no textual (WCAG 1.1.1 - Nivel A)**...",
536
+ "humanContext": "**Non-text content (WCAG 1.1.1 - Level A)**...",
537
537
  "affectedUsers": ["screen-reader", "low-vision"],
538
538
  "priority": "critical",
539
539
  "remediationEffort": "low"
@@ -602,7 +602,7 @@ Ejemplos concretos de inputs y outputs para cada herramienta MCP.
602
602
 
603
603
  ---
604
604
 
605
- ### Ejemplo 2: Sin deduplicación
605
+ ### Example 2: Without deduplication
606
606
 
607
607
  **Input:**
608
608
  ```json
@@ -635,11 +635,11 @@ Ejemplos concretos de inputs y outputs para cada herramienta MCP.
635
635
  }
636
636
  ```
637
637
 
638
- **Nota:** Ambos detectaron la misma imagen sin `alt`, pero con diferentes selectores.
638
+ **Note:** Both detected the same image without `alt`, but with different selectors.
639
639
 
640
640
  ---
641
641
 
642
- ### Ejemplo 3: Con viewport móvil
642
+ ### Example 3: With mobile viewport
643
643
 
644
644
  **Input:**
645
645
  ```json
@@ -660,9 +660,9 @@ Ejemplos concretos de inputs y outputs para cada herramienta MCP.
660
660
 
661
661
  ---
662
662
 
663
- ## Comparación de Outputs por Herramienta
663
+ ## Output Comparison by Tool
664
664
 
665
- ### Mismo Issue detectado por diferentes tools
665
+ ### Same issue detected by different tools
666
666
 
667
667
  **Axe-core:**
668
668
  ```json
@@ -692,50 +692,50 @@ Ejemplos concretos de inputs y outputs para cada herramienta MCP.
692
692
 
693
693
  ---
694
694
 
695
- ## Resumen de Diferencias
695
+ ## Differences Summary
696
696
 
697
- | Característica | axe-core | Pa11y | Contrast |
698
- |----------------|----------|-------|----------|
697
+ | Feature | axe-core | Pa11y | Contrast |
698
+ |---------|----------|-------|----------|
699
699
  | **Target** | URL/HTML | URL/HTML | URL/HTML |
700
- | **Selector** | CSS compacto | CSS completo | CSS compacto |
701
- | **Severidades** | 4 niveles | 3 tipos | 4 niveles |
700
+ | **Selector** | Compact CSS | Full CSS | Compact CSS |
701
+ | **Severities** | 4 levels | 3 types | 4 levels |
702
702
  | **Snippet** | ✅ | ✅ | ✅ |
703
- | **Confidence** | ✅ | ✅ | Siempre 1 |
703
+ | **Confidence** | ✅ | ✅ | Always 1 |
704
704
  | **Browser** | Puppeteer | Puppeteer | Puppeteer |
705
- | **Velocidad** | ~2-3s | ~2s | ~1-2s |
706
- | **Falsos positivos** | Pocos | Moderados | Muy pocos |
707
- | **Sugerencias de fix** | - | - | ✅ Colores |
705
+ | **Speed** | ~2-3s | ~2s | ~1-2s |
706
+ | **False positives** | Few | Moderate | Very few |
707
+ | **Fix suggestions** | - | - | ✅ Colors |
708
708
  | **APCA (WCAG 3.0)** | - | - | ✅ Experimental |
709
709
 
710
710
  ---
711
711
 
712
- ## Tips para Interpretar Resultados
712
+ ## Tips for Interpreting Results
713
713
 
714
- ### 1. Priorizar por Matriz
714
+ ### 1. Prioritize by Matrix
715
715
 
716
716
  ```
717
- Critical + Low effort = Fix HOY
718
- Critical + Medium/High effort = Planificar sprint
717
+ Critical + Low effort = Fix TODAY
718
+ Critical + Medium/High effort = Plan for sprint
719
719
  High + Low effort = Quick wins
720
720
  Medium/Low + High effort = Backlog
721
721
  ```
722
722
 
723
- ### 2. Validar Duplicados
723
+ ### 2. Validate Duplicates
724
724
 
725
- Si `deduplicatedCount` > `issueCount`, revisa `individualResults` para ver qué herramienta es más confiable para ese tipo de issue.
725
+ If `deduplicatedCount` > `issueCount`, check `individualResults` to see which tool is more reliable for that type of issue.
726
726
 
727
- ### 3. Revisar `affectedUsers`
727
+ ### 3. Review `affectedUsers`
728
728
 
729
- Prioriza issues que afecten a usuarios de screen readers y keyboard-only (más comunes).
729
+ Prioritize issues that affect screen reader and keyboard-only users (most common).
730
730
 
731
- ### 4. Aprovechar `humanContext`
731
+ ### 4. Leverage `humanContext`
732
732
 
733
- Lee los ejemplos del mundo real para entender el impacto real en usuarios.
733
+ Read the real-world examples to understand the actual impact on users.
734
734
 
735
735
  ---
736
736
 
737
737
  ## Next Steps
738
738
 
739
- - Ver [USAGE.md](./USAGE.md) para workflows completos
740
- - Ver [README.md](./README.md) para configuración
741
- - Ver `src/shared/data/README.md` para añadir más criterios WCAG
739
+ - See [USAGE.md](./USAGE.md) for complete workflows
740
+ - See [README.md](./README.md) for configuration
741
+ - See `src/shared/data/README.md` to add more WCAG criteria