diff --git a/index.bs b/index.bs index 93a96de3..0dc01b7b 100644 --- a/index.bs +++ b/index.bs @@ -3421,29 +3421,21 @@ and |session|: -
-To locate nodes using accessibility attributes with given |context nodes|, |selector|, -|maximum returned node count|, |session|, and |returned nodes|: - -1. If |selector|'s role and |selector|'s name are missing, return [=error=] with [=error code=] - [=invalid selector=]. +
+To collect nodes using accessibility attributes with given |context nodes|, |selector|, +|maximum returned node count|, and |returned nodes|: 1. If |returned nodes| is null: 1. Set |returned nodes| to an empty [=/list=]. -1. If |maximum returned node count| is not null and [=list/size=] of |returned - nodes| is greater or equal to |maximum returned node count|: - - 1. Return [=success=] with data null. - 1. For each |context node| in |context nodes|: 1. Let |match| be true. 1. If |selector|'s role is present: - 1. Let |role| be the result of computing the [=accessible role=] of |context node|. + 1. Let |role| be the [=accessible role=] of |context node|. 1. If |selector|'s role [=is|is not=] |role|: @@ -3451,7 +3443,7 @@ To locate nodes using accessibility attributes with given |context no 1. If |selector|'s name is present: - 1. Let |name| be the result of computing the [=accessible name=] of |context node|. + 1. Let |name| be the [=accessible name=] of |context node|. 1. If |selector|'s name [=is|is not=] |name|: @@ -3459,6 +3451,11 @@ To locate nodes using accessibility attributes with given |context no 1. If |match| is true: + 1. If |maximum returned node count| is not null and [=list/size=] of |returned + nodes| is greater or equal to |maximum returned node count|: + + 1. Return [=success=] with data |returned nodes|. + 1. [=list/Append=] |context node| to |returned nodes|. 1. Let |child nodes| be an empty [=/list=] and, for each node |child| in the @@ -3466,8 +3463,23 @@ To locate nodes using accessibility attributes with given |context no 1. If |child| implements {{Element}}, [=list/append=] |child| to |child nodes|. - 1. Invoke [=locate nodes using accessibility attributes=] with |child nodes|, - |selector|, |maximum returned node count|, |session|, and |returned nodes|. + 1. Invoke [=collect nodes using accessibility attributes=] with |child nodes|, + |selector|, |maximum returned node count|, and |returned nodes|. + + 1. Return [=success=] with data |returned nodes|. + +
+ +
+To locate nodes using accessibility attributes with given |context nodes|, |selector|, and +|maximum returned node count|: + +1. If |selector|'s role and |selector|'s name + are missing, return [=error=] with [=error code=] + [=invalid selector=]. + +1. Return the result of [=collect nodes using accessibility attributes=] with |context nodes|, + |selector|, |maximum returned node count|, and null.
@@ -3552,8 +3564,7 @@ The [=remote end steps=] with |session| and |command parameters| are: 1. Let |selector| be |locator|["value"]. 1. Let |result nodes| be a result of [=trying=] to [=locate nodes using accessibility attributes=] - given |context nodes|, |selector|, |maximum returned node count|, - |session|, and null. + given |context nodes|, |selector|, and |maximum returned node count|. 1. Assert: |maximum returned node count| is null or [=list/size=] of |result nodes| is less than or equal to |maximum returned node count|.