-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathconfig.schema.json
More file actions
45 lines (45 loc) · 2.45 KB
/
Copy pathconfig.schema.json
File metadata and controls
45 lines (45 loc) · 2.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/github/accessibility-scanner-alt-text-plugin/main/schema/config.schema.json",
"title": "alt-text-scan plugin configuration",
"description": "Configuration for the alt-text-scan plugin used by the GitHub Accessibility Scanner. See https://github.com/github/accessibility-scanner-alt-text-plugin#configuration for details.",
"type": "object",
"additionalProperties": false,
"properties": {
"$schema": {
"type": "string",
"description": "Optional reference to this schema for editor-time validation. Ignored at scanner runtime."
},
"rules": {
"type": "object",
"description": "Per-rule enable/disable overrides. Rules not listed keep their default behavior (enabled with the exception of alt-text-quality).",
"additionalProperties": false,
"properties": {
"missing-alt-text": {
"type": "boolean",
"description": "Flags <img> elements where the alt attribute is absent or whitespace-only. alt=\"\" is treated as intentional decorative use and is not flagged."
},
"vague-alt-text": {
"type": "boolean",
"description": "Flags alt text that is a generic single word (image, photo, icon, logo, screenshot, etc.) or short filler phrase (an image of, a photo of)."
},
"filename-alt-text": {
"type": "boolean",
"description": "Flags alt text that ends in a common image file extension (.png, .jpg, .jpeg, .gif, .svg, .webp, .bmp, .ico)."
},
"placeholder-alt-text": {
"type": "boolean",
"description": "Flags alt text matching a known boilerplate string (todo, tbd, fixme, placeholder, alt text, insert alt text, image alt)."
},
"repeated-alt-text": {
"type": "boolean",
"description": "Flags two or more adjacent images in the rendered page that share the same normalized alt text."
},
"alt-text-quality": {
"type": "boolean",
"description": "Opt-in, model-backed. Sends each image and its alt text to a vision model (GitHub Models) to flag quality issues such as redundant prefixes, vague or context-missing descriptions, and link text that announces the destination's medium (e.g. 'PDF of…', 'Link to…') instead of naming it. Disabled by default; requires GITHUB_MODELS_TOKEN and incurs per-image API cost."
}
}
}
}
}