Skip to content
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

Merged
merged 6 commits into from
Sep 1, 2020
Merged

Conversation

paulirish
Copy link
Member

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-L22

since our getOuterHTMLSnippet() is far more sophisticated these days.. we should prefer that.

@paulirish paulirish requested a review from a team as a code owner September 1, 2020 18:26
@paulirish paulirish requested review from connorjclark and removed request for a team September 1, 2020 18:26
@@ -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>',
Copy link
Member Author

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">',
Copy link
Member Author

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>',
Copy link
Collaborator

@connorjclark connorjclark Sep 1, 2020

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?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nodeLabel has it covered.

@paulirish paulirish changed the title core(axe): prefer our html snippet to axe's core(axe): use our html snippet rather than axe's Sep 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants