In is-crawlable and hreflang audits nodes listed in the details table have no selector set eg.
source: {
type: 'node',
snippet: `<meta name="robots" content="${artifacts.MetaRobots}" />`,
//selector: ??
},
This causes resulting table item title to be set to 'undefined':

We should show element selector instead, just like axe-core audits do:

However, to build a full selector we'd need class+id+nodeName for given node and all its ancestors which would require more work from the gatherers.
font-size audit is in a bit better situation because we do have all the data needed from the gatherer, however, we still can't reuse getSelector from axe-core since we don't have real DOM nodes, but rather devtools protocol nodes.
I've put together a simpler alternative that would work here, but it doesn't guarantee selectors to be pretty or unique. For now we decided to show only id, class or node name of the parent element.
In
is-crawlableandhreflangaudits nodes listed in the details table have no selector set eg.This causes resulting table item title to be set to 'undefined':
We should show element selector instead, just like axe-core audits do:
However, to build a full selector we'd need class+id+nodeName for given node and all its ancestors which would require more work from the gatherers.
font-sizeaudit is in a bit better situation because we do have all the data needed from the gatherer, however, we still can't reusegetSelectorfrom axe-core since we don't have real DOM nodes, but rather devtools protocol nodes.I've put together a simpler alternative that would work here, but it doesn't guarantee selectors to be pretty or unique. For now we decided to show only id, class or node name of the parent element.