axe-html html string in, axe-core results out. install npm install --save-dev axe-html usage import { analyze } from "axe-html"; const axeResults = await analyze("<img src='abc.png' />", options); See the typescript typings for more.