-
Notifications
You must be signed in to change notification settings - Fork 9.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve node selectors shown in the details table #4015
Comments
Decided to do something simple here just using the class, id, and name/type attributes of the current node and not worry about parents Function to make the nodes clickable in devtools lighthouse/lighthouse-core/gather/gatherers/accessibility.js Lines 53 to 73 in 8c088a6
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In
is-crawlable
andhreflang
audits 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-size
audit is in a bit better situation because we do have all the data needed from the gatherer, however, we still can't reusegetSelector
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.
The text was updated successfully, but these errors were encountered: