axe-core icon indicating copy to clipboard operation
axe-core copied to clipboard

Option to truncate excessively large `.html` in results

Open stephenmathieson opened this issue 6 months ago • 2 comments

Product

axe-core

Feature Description

When analyzing a axe Watcher results in prod, we noticed we have a few excessively large datums (>1MB). This is preventing us from migrating result data to a different (much faster data store).

After digging further, it was noticed that this is due to axe-core including the element in violation's outerHTML (eg .violations[x].nodes[y].html) and its related node's outerHTML (.violations[x].nodes[y].relatedNodes[z].html). Consider the following snippet:

<img class="foo" src="data:png,base64, EXTREMELY LARGE IMAGE CONVERTED TO BASE64" />

It appears axe-core is already truncating some parts (children) of the element's HTML, but not the element itself.

An option similar to axe.configure({ noHtml: true }) which causes axe-core to truncate ALL HTML snippets would be extremely helpful.

stephenmathieson avatar Jul 25 '24 18:07 stephenmathieson