-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
core(axe): use our html snippet rather than axe's #11362
Conversation
@@ -89,7 +89,7 @@ const expectations = [ | |||
node: { | |||
'type': 'node', | |||
'selector': '#aria-required-children', | |||
'snippet': '<div id="aria-required-children" role="radiogroup">\n <div></div>\n </div>', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this one seems good.
@@ -53,7 +53,7 @@ const expectations = [ | |||
'height': '>0', | |||
}, | |||
'selector': '#aria-hidden-focus', | |||
'snippet': '<div id="aria-hidden-focus" aria-hidden="true">\n <button>Focusable Button</button>\n </div>', | |||
'snippet': '<div id="aria-hidden-focus" aria-hidden="true">', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
at first blush we're losing 'Focusable Button' but we actually have that in nodeLabel
. so we good.
same with a few other of these cases.
@@ -363,7 +363,7 @@ const expectations = [ | |||
'type': 'node', | |||
'selector': 'h3', | |||
'path': '2,HTML,1,BODY,37,SECTION,1,H3', | |||
'snippet': '<h3>sub-sub-header</h3>', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dont like this loss. should we change our snippet?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nodeLabel has it covered.
found while working with @gMakunde on his audit. the autofilltypepredictions that are in the DOM were picked up by axe as the
node.html
.. it's just a basic outerHTML grab: https://github.com/dequelabs/axe-core/blob/0cd1eade459a5e3b36220ab9a4d3884db678cc99/lib/core/utils/dq-element.js#L16-L22since our getOuterHTMLSnippet() is far more sophisticated these days.. we should prefer that.