Skip to content

Commit 9481484

Browse files
authored
Precise that contexts have to be the same elements (#1864)
1 parent 7d09984 commit 9481484

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

_rules/links-with-identical-names-and-context-serve-equivalent-purpose-fd3a94.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
22
id: fd3a94
3-
name: Links with identical accessible names and context serve equivalent purpose
3+
name: Links with identical accessible names and same context serve equivalent purpose
44
rule_type: atomic
55
description: |
6-
This rule checks that links with identical accessible names and context resolve to the same or equivalent resources.
6+
This rule checks that links with identical accessible names in the same context resolve to the same or equivalent resources.
77
accessibility_requirements:
88
wcag20:2.4.4: # Link Purpose (In Context) (A)
99
forConformance: true
@@ -66,6 +66,8 @@ _There are no major accessibility support issues known for this rule._
6666

6767
This rule is designed specifically for [2.4.4 Link Purpose (In Context)][sc244], which requires the purpose to be clear within the context of a link. Because links that do not have this, also are not clear without that context, this rule maps to [2.4.9 Link Purpose (Link only)][sc249] as well. In order to adequately test the [expectation](#expectation), some of the passed examples do not satisfy [2.4.9 Link Purpose (Link only)][sc249].
6868

69+
This rule specifically targets links within the exact same context. Links with identical name that are in identical (but not the same) contexts also fail [2.4.4 Link Purpose (In Context)][sc244]. However, defining "identical context" unambiguously was not really possible and was left out of this rule.
70+
6971
### Bibliography
7072

7173
- [Understanding Success Criterion 2.4.4: Link Purpose (In Context)](https://www.w3.org/WAI/WCAG21/Understanding/link-purpose-in-context.html)
@@ -372,7 +374,7 @@ These two `span` elements do not have a [semantic role][] of link.
372374

373375
#### Inapplicable Example 5
374376

375-
These two HTML `a` elements have the same [accessible name][] and link to the [same resource][] but different [programmatically determined link contexts][programmatically determined link context].
377+
These two HTML `a` elements have the same [accessible name][] and link to the [same resource][] but different [programmatically determined link contexts][programmatically determined link context]. Even if the contexts have identical content, they are not the same (the same elements).
376378

377379
```html
378380
<html lang="en">
@@ -381,7 +383,7 @@ These two HTML `a` elements have the same [accessible name][] and link to the [s
381383
<a href="/test-assets/links-with-identical-names-serve-equivalent-purpose-b20e66/index.html">Contact us</a> page.
382384
</div>
383385
<div>
384-
You can find contact information in the
386+
You can learn more in the
385387
<a href="/test-assets/links-with-identical-names-serve-equivalent-purpose-b20e66/index.html">Contact us</a> page.
386388
</div>
387389
</html>

0 commit comments

Comments
 (0)