Skip to content

Commit 24d0ffc

Browse files
- removing mention of "the rule" from label-in-name-algorithm.md . replacing it with a new idea: the algorithm 'return value' eg. 'returns "is contained"'.
- rewording rule expectation. I think that 'For the target element' is better than 'For each target element' because for this rule, the computation of the expecation for each applicable target element is done in isolation from the other applicable targets on the page. It's simpler if the "for loop" over all applicable targets is done by the tool, not the rule.
1 parent 8ed61b8 commit 24d0ffc

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

_rules/visible-label-in-accessible-name-2ee8b8.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ This rule applies to any element for which all the following is true:
3939

4040
## Expectation
4141

42-
For each target element, the [visible inner text][] is contained within the [accessible name][] of the target element according to the [label in name algorithm][].
42+
For the target element, the [visible inner text][] is contained within the [accessible name][] according to the [label in name algorithm][].
4343

4444
## Assumptions
4545

pages/glossary/label-in-name-algorithm.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Then do the check: is the tokenized 'label' a sublist of the tokenized 'name'?
2828
- It checks whether elements are consecutive or not. i.e. it checks for a substring, in the computer science sense of the term. Not a subsequence.
2929
- An empty list is a sublist of any list.
3030

31-
If the answer is "yes" (i.e. the tokenized 'label' a sublist of the tokenized 'name'), then the target element passes the rule. Otherwise, it fails the rule.
31+
If the answer is "yes" (that is: the tokenized 'label' is a sublist of the tokenized 'name'), then this algorithm returns "is contained". Otherwise, it returns "is not contained".
3232

3333
[accessible name]: #accessible-name 'Definition of accessible name'
3434
[visible inner text]: #visible-inner-text 'Definition of Visible inner text'

0 commit comments

Comments
 (0)