diff --git a/src/accessibility.ts b/src/accessibility.ts index 11ff5f743a..66170aa374 100644 --- a/src/accessibility.ts +++ b/src/accessibility.ts @@ -72,7 +72,7 @@ export class Accessibility { interestingOnly = true, root = null, } = options; - const {tree, needle} = await this._getAXTree(root); + const {tree, needle} = await this._getAXTree(root || undefined); if (!interestingOnly) { if (root) return needle && serializeTree(needle)[0]; diff --git a/test/accessibility.spec.js b/test/accessibility.spec.js index 29805d6c5d..64ab278d4a 100644 --- a/test/accessibility.spec.js +++ b/test/accessibility.spec.js @@ -76,7 +76,7 @@ module.exports.describe = function({testRunner, expect, FFOX, CHROMIUM, WEBKIT, {role: 'textbox', name: 'disabled input', disabled: true}, {role: 'textbox', name: 'Input with whitespace', value: ' ' }, {role: 'textbox', name: '', value: 'value only' }, - {role: 'textbox', name: 'placeholder',value: 'and a value'}, + {role: 'textbox', name: 'placeholder', value: 'and a value'}, {role: 'textbox', name: 'This is a description!',value: 'and a value'}, // webkit uses the description over placeholder for the name ] };