Find images missing alt text
Goal: Spot images with no alt text — a quick accessibility check before publishing.
Prerequisites: None.
Query
select(.image.alt == "")
$ mq 'select(.image.alt == "")' README.md
Just the file paths, for a punch list:
$ mq 'select(.image.alt == "") | .image.url' README.md
Input



Output

Notes
.image.alton its own skips images with empty alt text (selectors drop falsy matches), so it’s only useful for listing the alt text that does exist. To find the gaps, filter explicitly withselect(.image.alt == "").- Gotcha: a non-matching node’s result is
Noneafterselect, andNoneresults are what actually get suppressed from output — not “filtering” in a control-flow sense. Plain field access on thatNone(like.image.urlabove) staysNoneand stays suppressed. But routing it through something that produces a real value even forNoneinput — string concatenation (__FILE__ + ": " + .image.url), or a function likeis_none(self)— “launders” it into a non-Noneresult, and it prints for every node, defeating the filter. Keep transformations afterselectlimited to plain field/selector access, or restructure so theselectis the last step.