Skip to main content
Checks for proper use of figure and figcaption elements
Rule IDimages/figure-figcaption
CategoryImages
ScopePer-page
Severityinfo
Weight2/10

Solution

Use <figure> and <figcaption> for images with captions. This provides semantic meaning and accessibility benefits. Screen readers announce figcaption as the image caption. Good for SEO as captions often contain keywords. Example: <figure>``<img src='...' alt='...'>``<figcaption>Description</figcaption>``</figure>.

Enable / Disable

Disable this rule

squirrel.toml
[rules]
disable = ["images/figure-figcaption"]

Disable all Images rules

squirrel.toml
[rules]
disable = ["images/*"]

Enable only this rule

squirrel.toml
[rules]
enable = ["images/figure-figcaption"]
disable = ["*"]