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

Move secondary requirement texts out of the background #2060

Merged
merged 16 commits into from
Aug 30, 2023
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions __tests__/frontmatter.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,11 @@ function validateRuleFrontmatter({ frontmatter }, metaData) {
*/
const accRequirementValues = Object.values(accessibility_requirements)
test.each(accRequirementValues)('has expected keys for accessibility requirement: `%p`', accReq => {
if (accReq.secondary) {
expect(accReq.secondary).toBeTrue()
if (!accReq) {
return
} else if (accReq.secondary) {
Comment on lines +98 to +100
Copy link
Collaborator

Choose a reason for hiding this comment

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

Note: depending on our ES target, we may be able to use optional chaining:

Suggested change
if (!accReq) {
return
} else if (accReq.secondary) {
if (accReq?.secondary) {

Copy link
Member Author

Choose a reason for hiding this comment

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

That's not quite the same. Doing it the way you suggests triggers the tests on line 107 / 108, which would then fail.

// Note; empty strings & false won't get here, and so aren't allowed
expect(['string', 'boolean']).toContain(typeof accReq.secondary)
return
}

Expand Down
1 change: 1 addition & 0 deletions __tests__/link-to-glossary-term-valid.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const whitelist = [
/^#expectation(-[1-9][0-9]*)?$/,
/^#assumptions$/,
/^#accessibility-support$/,
/^#accessibility-requirements-mapping$/,
/^#background$/,
/^#test-cases$/,
/^#passed(-example-[1-9][0-9]*)?$/,
Expand Down
1 change: 1 addition & 0 deletions __tests__/spelling-ignore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@
- RFC
- rfc
- webauthn
- customizable

# spell checker checks against strict casing & hence some repeated words here
- Autocomplete
Expand Down
8 changes: 3 additions & 5 deletions _rules/aria-attr-defined-5f99a7.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ description: |
This rule checks that each `aria-` attribute specified is defined in ARIA 1.2.
accessibility_requirements:
wcag20:1.3.1: # Info and Relationships (A)
secondary: true
secondary: This success criterion is **less strict** than this rule. This is because the rule does not ignore irrelevant ARIA properties. This is why some of the failed examples may not satisfy this success criterion.
Copy link
Member Author

Choose a reason for hiding this comment

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

Suggested change
secondary: This success criterion is **less strict** than this rule. This is because the rule does not ignore irrelevant ARIA properties. This is why some of the failed examples may not satisfy this success criterion.
secondary: This success criterion is **less strict** than this rule. This is because the rule does not ignore irrelevant ARIA properties. Some of the failed examples satisfy this success criterion.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@WilcoFiers and others ... I would want us to define the "some" where as you'd want to map to what are the "some" examples that people can reference in context of what fails / passes as secondary reqs. Thanks!

Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
secondary: This success criterion is **less strict** than this rule. This is because the rule does not ignore irrelevant ARIA properties. This is why some of the failed examples may not satisfy this success criterion.
secondary: This success criterion is less strict than this rule. This is because the rule does not ignore irrelevant ARIA properties. Additionally, some of the failed examples meet this success criterion.

Copy link
Collaborator

Choose a reason for hiding this comment

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

  • I agree that the second sentence should be "warning, some failed examples pass the SC" rather than "warning, some failed examples fail the SC", because the later is the normal behaviour of rules.
  • I'd rather keep some emphasis on "less strict" (like the bolding here), to show this is some sort of keyword. I'd even push toward having one such emphasised term in each secondary explanation since it can help us (and readers) categorise them ("less strict", "more strict", "partial", …) Once we get a bit more usage on these secondary requirements, we may even include these terms in the ACt rules format (or a similar document), with detailed explanation about what they mean.
  • agree that the "this is why" is a bit of a mouthful after a sentence full of "thus rule" and "this SC". Another possibility could be:

    Therefore, some FE do satisfy the SC.

  • I'm also not a huge fan of "may (not)" in the "some (passed/failed) example may (not) satisfy the SC". I feel it collides a bit with the RFC 2119 usage of these terms which is somewhat different here. This sounds like an instruction to rule writers (or part of the format): "when a SC is less strict, you MAY write FE that satisfy this SC"; while here we describe a more static state: "there exist FE that satisfy the SC, deal with it".
    (plus "may not satisfy" is always slightly ambiguous between "(may not) satisfy" (= are forbidden to satisfy) and "may (not satisfy)" (=are not forced to satisfy); "do not satisfy" doesn't have this ambiguity)

Copy link
Collaborator

@maryjom maryjom Jul 27, 2023

Choose a reason for hiding this comment

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

This rule is more strict than the success criterion because it does not ignore irrelevant ARIA properties. Therefore, some of the reported failures can be false positives rather than a success criterion failure.

My comment carries to the rest of the examples where this text appears. It was a little difficult to read and understand, as written.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm not a huge fan of using the term "false positives" here, since it has a connotation of "the rule is bad and generate false positives" while we want to carry the information "this rule is designed for a slightly different use case and tangentially affects this use case".

Typically, in a color contrast case, saying that the 1.4.6 rule "reports false positives (for 1.4.3)" is technically true but sounds a bit dramatic.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I like the change from saying "the rule more strict" (than the SC) to "the SC is less strict" (than the rule).

wcag20:4.1.2: # Name, Role, Value (A)
secondary: true
secondary: This success criterion is **less strict** than this rule. This is because the rule does not ignore irrelevant ARIA properties. This is why some of the failed examples may not satisfy this success criterion.
input_aspects:
- DOM Tree
acknowledgments:
Expand Down Expand Up @@ -36,7 +36,7 @@ There are no accessibility support issues known.

## Background

The presence of unknown ARIA attributes is often the result of a typo or other developer error. These attributes are ignored by browsers and other assistive technologies. This often means that a state or property which should exist is missing. This can cause issues under [success criterion 1.3.1 Info and Relationships][sc131] or [4.1.2 Name, Rule Value][sc412].
The presence of unknown ARIA attributes is often the result of a typo or other developer error. These attributes are ignored by browsers and other assistive technologies. This often means that a state or property which should exist is missing.

### Bibliography

Expand Down Expand Up @@ -130,5 +130,3 @@ This `canvas` element does not have an `aria-` attribute specified.
```

[wai-aria specifications]: #wai-aria-specifications 'Definition of WAI-ARIA specifications'
[sc131]: https://www.w3.org/TR/WCAG21/#info-and-relationships
[sc412]: https://www.w3.org/TR/WCAG21/#name-role-value
8 changes: 3 additions & 5 deletions _rules/aria-state-or-property-permitted-5c01ea.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ accessibility_requirements:
passed: satisfied
inapplicable: satisfied
wcag20:1.3.1: # Info and Relationships (A)
secondary: true
secondary: This success criterion is **less strict** than this rule. This is because the rule does not ignore irrelevant ARIA properties. This is why some of the failed examples may not satisfy this success criterion.
wcag20:4.1.2: # Name, Role, Value (A)
secondary: true
secondary: This success criterion is **less strict** than this rule. This is because the rule does not ignore irrelevant ARIA properties. This is why some of the failed examples may not satisfy this success criterion.
input_aspects:
- Accessibility Tree
- CSS styling
Expand Down Expand Up @@ -60,7 +60,7 @@ Implementation of [Presentational Roles Conflict Resolution][] varies from one b

## Background

The presence of prohibited ARIA attributes is often the result of a developer using an incorrect role, or a misunderstanding of the attribute. These attributes are ignored by browsers and other assistive technologies. This often means that a state or property which should exist is missing. This can cause issues under [success criterion 1.3.1 Info and Relationships][sc131] or [4.1.2 Name, Rule Value][sc412].
The presence of prohibited ARIA attributes is often the result of a developer using an incorrect role, or a misunderstanding of the attribute. These attributes are ignored by browsers and other assistive technologies. This often means that a state or property which should exist is missing.

In HTML, there are language features that do not have corresponding implicit WAI-ARIA semantics. As per [ARIA in HTML](https://www.w3.org/TR/html-aria/), those elements can have [global states or properties][global]. Some of those elements can also have [inherited][], [supported][], or [required][] [states][state] or [properties][property] that correspond to a [WAI-ARIA role](https://www.w3.org/TR/wai-aria-1.2/#introroles). For example, the `audio` element has no corresponding ARIA semantics but it can have [inherited][], [supported][], or [required][] [states][state] or [properties][property] of the [`application` role](https://www.w3.org/TR/wai-aria-1.2/#application).

Expand Down Expand Up @@ -233,5 +233,3 @@ This `div` element is not [included in the accessibility tree][], hence its [WAI
[wai-aria state or property]: https://www.w3.org/TR/wai-aria-1.2/#state_prop_def 'Definition of ARIA States and Properties'
[namespaced element]: #namespaced-element
[prohibited]: https://www.w3.org/TR/wai-aria-1.2/#prohibitedattributes 'WAI-ARIA 1.2 Definition of Prohibited States and Properties'
[sc131]: https://www.w3.org/TR/WCAG21/#info-and-relationships
[sc412]: https://www.w3.org/TR/WCAG21/#name-role-value
8 changes: 3 additions & 5 deletions _rules/aria-state-or-property-valid-value-6a7281.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ accessibility_requirements:
passed: satisfied
inapplicable: satisfied
wcag20:1.3.1: # Info and Relationships (A)
secondary: true
secondary: This success criterion is **less strict** than this rule. This is because the rule does not ignore irrelevant ARIA properties. This is why some of the failed examples may not satisfy this success criterion.
Copy link
Collaborator

@tbostic32 tbostic32 Jul 27, 2023

Choose a reason for hiding this comment

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

Similar to m other comment, but shouldn't less strict criterion mean some of the failed examples may satisfy the criterion?

wcag20:4.1.2: # Name, Role, Value (A)
secondary: true
secondary: This success criterion is **less strict** than this rule. This is because the rule does not ignore irrelevant ARIA properties. This is why some of the failed examples may not satisfy this success criterion.
input_aspects:
- DOM Tree
- CSS Styling
Expand Down Expand Up @@ -46,7 +46,7 @@ Some user agents treat the value of `aria-*` attribute as case-sensitive (even w

## Background

Using invalid ARIA attribute values is often the result of a typo or other developer error. These attributes are then either ignored, or a default value is assumed by browsers and assistive technologies. This often means that a state or property which should exist is missing or has an unexpected value. This can cause issues under [success criterion 1.3.1 Info and Relationships][sc131] or [4.1.2 Name, Rule Value][sc412]. If the default value for invalid attribute values happens to match the author's intention for the value, there will not be an accessibility issue.
Using invalid ARIA attribute values is often the result of a typo or other developer error. These attributes are then either ignored, or a default value is assumed by browsers and assistive technologies. This often means that a state or property which should exist is missing or has an unexpected value. If the default value for invalid attribute values happens to match the author's intention for the value, there will not be an accessibility issue.

This rule does not require the target of an `ID Reference` to exist. This is because referencing an element that does not exist, and not having the reference at all has the same end result. A common use case for using `ID Reference` for a non-existing ID is to use a static `aria-errormessage` on an `input` element, and to only insert the element with the error message if there is an actual error. There are some cases in which ID references are required. These are tested in a separate rule.

Expand Down Expand Up @@ -242,7 +242,5 @@ The `aria-hidden` attribute is not on an [HTML or SVG element][].
```

[html or svg element]: #namespaced-element
[sc131]: https://www.w3.org/TR/WCAG21/#info-and-relationships
[sc412]: https://www.w3.org/TR/WCAG21/#name-role-value
[value type]: https://www.w3.org/TR/wai-aria-1.2/#propcharacteristic_value
[wai-aria state or property]: https://www.w3.org/TR/wai-aria-1.2/#state_prop_def
10 changes: 6 additions & 4 deletions _rules/image-no-text-0va7u6.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ accessibility_requirements:
inapplicable: further testing needed
wcag20:1.4.9: # Images of Text (No Exception) (AAA)
forConformance: true
secondary: true
Copy link
Collaborator

Choose a reason for hiding this comment

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

While I understand why this has been removed (together with the Background note), I feel this requires a specific PR just to make 1.4.9 a primary requirement instead.

(implementer hat on), making the requirement primary may make my implementation "partially consistent" if it doesn't already report it. That requires me to update my report. An easy fix, but I'd rather track that change to an ACT PR that focuses on it.
(Alfa is actually not having an implementation of this rule, but you get the idea).

Copy link
Member Author

@WilcoFiers WilcoFiers Aug 10, 2023

Choose a reason for hiding this comment

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

The real reason I did this is because I couldn't come up with an explanation of why this was secondary. If you have one I don't mind putting it in, but I don't think there's anything I can put in here. This rule assumes that the difference between 1.4.5 and 1.4.9 doesn't occur, and so the rule maps to those criteria the same way.

I can put this into a separate PR, but I can't merge this one until that separate PR would then be merged. I did it this way to avoid introducing a blocking PR. Are you okay with that @Jym77?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Also, we made 1.4.6 a secondary requirement for the 1.4.3 rule, while it always fail.
Iirc, that was due to the fact that 1.4.6 is AAA and some tools don't report AAA failures, but that shouldn't prevent them to claim consistency on the 1.4.3 rule.

How is that case different?

Copy link
Member Author

Choose a reason for hiding this comment

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

See above. This rule assume there is the difference between 1.4.5 and 1.4.9 never occurs. That's why we don't have two rules for image-no-text. There is no difference in how we test 1.4.5 and 1.4.9. For color contrast the numbers are different, and so we have two different rules.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm confused 😕

Back in #1920 when we added secondary requirements, part of the reasoning in the PR description was:

Their implementations are reported as partially consistent for not failing a AAA success criterion, even though the implementor does not support AAA to begin with. [in the 1.4.3/1.4.6 case]

This, in turn, linked to w3c/wcag-act-rules#134 which has pretty much the same description:

reporting against AAA criteria should not be required by tools that don't support AAA criteria.

The later is marked as fixed by w3c/wcag-act#531 which updates the format (to allow secondary requirements) but doesn't change the tool consistency checking by discarding AAA mapping for AA tools or something like that.


How will that not recreate the same situation?
Tools/methods that only check AA level won't report AAA SC, hence they won't report 1.4.9 on these test cases. Which part of our machinery (something in act-tools?) will let them claim a consistent implementation of the rule?

Copy link
Member Author

Choose a reason for hiding this comment

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

There are two reasons why an implementation may not report an accessibility requirement and still be consistent:

  1. The requirement is secondary
  2. The requirement is of a conformance level the implementation does not support

I think what you were expecting is for secondary requirements to cover both situations. That's not the intent. This is exactly an example of why that difference is necessary. If an implementation supports AAA, then it must report both 1.4.5 and 1.4.9 as not satisfied when this rule fails, Otherwise it is partially consistent. An implementation that only covers AA is not required to report 1.4.9.

Whether or not it can report 1.4.9 is an open question, and is possibly a topic for TPAC.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I still do not understand why 1.4.9 shouldn't be a more strict secondary requirement 🤔

How is the 1.4.5/1.4.9 case (and the 2.1.1/2.1.3 one) different from the 2.4.4/2.4.9, the 1.4.3/1.4.6, the 1.2.3/1.2.5-1.2.8, or the 2.2.1/2.2.4-3.2.5 ones?
This PR keeps a more strict secondary requirement for the 4 later cases, but changes the first two as primary requirements instead. What is the criterion to decide that a more strict SC is a secondary or primary requirement? (shouldn't we instead try and find Passed Examples that fail the more strict SC?)

I won't block the PR due to that, it seems I'm misunderstanding something. I guess we can talk through that at TPAC.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll take another crack at explaining, but yes, lets take this to TPAC.

The way I think of it, and why I ended up doing it this way is because this rule effectively treats those 1.4.5 and 1.4.9 as identical criteria. The assumption effectively says there is no difference, and so they are tested in the same way, and only require one rule. Compare that to 2.2.1 / 2.2.4. There are two rules for it. One with the 20 hour exception and one without. Similarly 1.4.3 / 1.4.6. Two rules, one with a 4.5:1 contrast, and one with a 7:1 contrast.

I can explain why the rule for 1.4.3 is less strict than 1.4.6: The number is lower. I can explain why the rule for 2.2.1 is less strict than 2.2.4: The rule has a 20 hour exception. There is no difference between how 1.4.5 is measured and how 1.4.9 is measured. The rule assume it.

failed: not satisfied
passed: further testing needed
inapplicable: further testing needed
Expand Down Expand Up @@ -56,7 +55,7 @@ There are no accessibility support issues known.

## Background

This rule is designed specifically for [SC 1.4.5 Images of Text][sc1.4.5] which includes exceptions to the images it applies to that are not part of [SC 1.4.9 Images of Text (No Exception)][sc1.4.9]. Therefore, some images that are inapplicable for this rule can be applicable to [SC 1.4.9 Images of Text (No Exception)][sc1.4.9].
This rule is designed specifically for [SC 1.4.5 Images of Text][sc1.4.5]. There are however only minimal differences between this criterion and [SC 1.4.9 Images of Text (No Exception)][sc1.4.9]. The two differences are that customizable images of text are allowed, and that images of text are allowed when the presentation cannot otherwise be achieved. These scenarios are so rare the rule ignores them as part of the assumptions, and so the [accessibility requirements mapping](#accessibility-requirements-mapping) of these two criteria is the same.
Copy link
Collaborator

Choose a reason for hiding this comment

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

While I agree that SC 1.4.5 and 1.4.9 are very similar, I do not agree with characterization of "only minimal differences" because using the Essential exception for logotypes is very common.

But maybe there is a precondition for the applicability of this test?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think the confusion here comes from this "No exception" thing in the title of that SC. 1.4.9 does allow text where presentation is essential (like logos) and text that is purely decorative. The only difference between 1.4.5 and 1.4.9 is that 1.4.5 allows images of text if the text can be customised.


### Bibliography

Expand Down Expand Up @@ -210,10 +209,13 @@ This image resource referenced by the `img` element contains text that provides
This `img` element loads an SVG with text as an image resource. Because the SVG is loaded as an image resource, instead of being embedded in HTML the text cannot be selected or customized.

```html
<img alt="WCAG Rocks" src="data:image/svg+xml;utf8,
<img
alt="WCAG Rocks"
src="data:image/svg+xml;utf8,
<svg xmlns='http://www.w3.org/2000/svg' height='20px' width='80px'>
<text x='0' y='15'>WCAG Rocks</text>
</svg>" />
</svg>"
/>
Comment on lines -213 to +218
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 was Prettier's doing.

```

### Inapplicable
Expand Down
8 changes: 1 addition & 7 deletions _rules/link-in-context-descriptive-5effbb.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,7 @@ accessibility_requirements:
passed: further testing needed
inapplicable: further testing needed
wcag20:2.4.9: # Link Purpose (Link Only) (AAA)
forConformance: true
secondary: true
failed: not satisfied
passed: further testing needed
inapplicable: further testing needed
secondary: This success criterion is **stricter** than this rule. This is because the rule also considers the context of the link, in addition to the link text. This is why some of the passed examples may not satisfy this success criterion.
input_aspects:
- Accessibility Tree
- DOM Tree
Expand Down Expand Up @@ -53,8 +49,6 @@ The [accessible name][] of each target element together with its [programmatical

## Background

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].

### Related rules

- [Link has non-empty accessible name](https://www.w3.org/WAI/standards-guidelines/act/rules/c487ae/)
Expand Down
6 changes: 1 addition & 5 deletions _rules/link-non-empty-accessible-name-c487ae.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ accessibility_requirements:
inapplicable: further testing needed
wcag20:2.4.9: # Link Purpose (Link Only) (AAA)
forConformance: true
secondary: true
failed: not satisfied
passed: further testing needed
inapplicable: further testing needed
Expand All @@ -27,7 +26,7 @@ accessibility_requirements:
passed: further testing needed
inapplicable: further testing needed
wcag20:1.1.1: # Non-text content (A)
secondary: true
secondary: This success criterion **partially overlaps** this rule. This is because the HTML`area` element count as both a link, and as non-text content. This is why some of the failed examples may not satisfy this success criterion.
WilcoFiers marked this conversation as resolved.
Show resolved Hide resolved
input_aspects:
- Accessibility Tree
- DOM Tree
Expand Down Expand Up @@ -66,8 +65,6 @@ The rule assumes that all links are [user interface components](https://www.w3.o

## Background

The HTML `area` element is both a link and non-text content. When this rule fails on `area` elements [success criterion 1.1.1 Non-text content][sc111] is not satisfied.

### Related rules

- [Link in context is descriptive](https://www.w3.org/WAI/standards-guidelines/act/rules/5effbb/proposed/)
Expand Down Expand Up @@ -365,4 +362,3 @@ This `a` element does not have the role of link because it does not have an `hre
[semantic role]: #semantic-role 'Definition of Semantic Role'
[attribute value]: #attribute-value 'Definition of Attribute value'
[html element]: #namespaced-element
[sc111]: https://www.w3.org/TR/WCAG21/#non-text-content
5 changes: 1 addition & 4 deletions _rules/links-identical-name-equivalent-purpose-b20e66.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ accessibility_requirements:
passed: further testing needed
inapplicable: further testing needed
wcag20:2.4.4: # Link Purpose (In Context) (A)
secondary: true
secondary: This success criterion is **less strict** than this rule. This is because the rule does not consider the context of the link. This is why some of the failed examples may not satisfy this success criterion.
Copy link
Collaborator

Choose a reason for hiding this comment

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

If the success criterion is less strict, shouldn't the failed examples potentially satisfy the criterion (e.g., where the link text does not provide the purpose but the context does).

Copy link

@mbgower mbgower Jul 27, 2023

Choose a reason for hiding this comment

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

In regard to @tbostic32's concerns with the over-use of the word "this"...
Without commenting on the accuracy of the statements, a rewrite of the prior secondary could be:

This success criterion is less strict than this rule because the rule does not consider the context of the link. Some of the failed examples may not satisfy this success criterion.

@tbostic32's second comment seems correct to me just reading the sentence statements. If the following is not accurate, then I think there's a larger problem here...

This success criterion is less strict than this rule because the rule does not consider the context of the link. Some of the failed examples may not satisfy this success criterion.

input_aspects:
- Accessibility Tree
- DOM Tree
Expand Down Expand Up @@ -57,8 +57,6 @@ When followed, the links in each set of target elements resolve to the [same res

## Background

This rule is closely related to [success criterion 2.4.4 Link Purpose (In Context)][sc244]. Because this rule is stricter, links that pass this rule satisfy 2.4.4 Link Purpose (In Context).

### Bibliography

- [CSS Scoping Module Level 1 (editor's draft)](https://drafts.csswg.org/css-scoping/)
Expand Down Expand Up @@ -389,7 +387,6 @@ These `span` elements do not have a [semantic role][] of `link`. They are not va
[presentational roles conflict resolution]: https://www.w3.org/TR/wai-aria-1.1/#conflict_resolution_presentation_none 'Presentational Roles Conflict Resolution'
[same resource]: #same-resource 'Definition of same resource'
[sc249]: https://www.w3.org/TR/WCAG21/#link-purpose-link-only 'Success Criterion 2.4.9: Link Purpose (Link Only)'
[sc244]: https://www.w3.org/TR/WCAG21/#link-purpose-in-context 'Success Criterion 2.4.4: Link Purpose (In Context)'
[semantic role]: #semantic-role 'Definition of semantic role'
[shadow tree]: https://dom.spec.whatwg.org/#shadow-tree 'Definition of shadow tree'
[web page (html)]: #web-page-html 'Definition of web page (HTML)'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,7 @@ accessibility_requirements:
passed: further testing needed
inapplicable: further testing needed
wcag20:2.4.9: # Link Purpose (Link Only) (AAA)
forConformance: true
secondary: true
failed: not satisfied
passed: further testing needed
inapplicable: further testing needed
secondary: This success criterion is **stricter** than this rule. This is because the rule also considers the context of the link, in addition to the link text. This is why some of the passed examples may not satisfy this success criterion.
input_aspects:
- DOM Tree
- CSS Styling
Expand Down Expand Up @@ -64,9 +60,7 @@ There are no accessibility support issues known.

## Background

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].

There is a difference between two contexts being the *same* and being *identical*. This rule specifically targets links within the *same* context. The same context means exactly the same set of DOM nodes. Identical (but not the same) contexts might have a different set of DOM nodes, but those DOM nodes have equivalent content - such as text content, attribute values, and so on. This difference is similar to the difference in some programming languages between pointer equivalence and deep object equivalence. 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 has been deemed infeasible at this time, and so has been left out of this rule.
There is a difference between two contexts being the _same_ and being _identical_. This rule specifically targets links within the _same_ context. The same context means exactly the same set of DOM nodes. Identical (but not the same) contexts might have a different set of DOM nodes, but those DOM nodes have equivalent content - such as text content, attribute values, and so on. This difference is similar to the difference in some programming languages between pointer equivalence and deep object equivalence. 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 has been deemed infeasible at this time, and so has been left out of this rule.

### Bibliography

Expand Down Expand Up @@ -374,7 +368,7 @@ These two `span` elements do not have a [semantic role][] of link.

#### Inapplicable Example 5

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 though the two contexts in this example are *identical*, they are not the *same*. That is: even though they have equivalent content, they do not consist of the same DOM elements.
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 though the two contexts in this example are _identical_, they are not the _same_. That is: even though they have equivalent content, they do not consist of the same DOM elements.

```html
<html lang="en">
Expand Down Expand Up @@ -407,7 +401,6 @@ These two HTML `a` elements have the same [accessible name][] but different [pro
[programmatically determined link context]: #programmatically-determined-link-context 'Definition of programmatically determined link context'
[same resource]: #same-resource 'Definition of same resource'
[sc244]: https://www.w3.org/TR/WCAG21/#link-purpose-in-context 'Success Criterion 2.4.4: Link Purpose (In Context)'
[sc249]: https://www.w3.org/TR/WCAG21/#link-purpose-link-only 'Success Criterion 2.4.9: Link Purpose (Link Only)'
[semantic role]: #semantic-role 'Definition of semantic role'
[shadow tree]: https://dom.spec.whatwg.org/#shadow-tree 'Definition of shadow tree'
[web page (html)]: #web-page-html 'Definition of web page (HTML)'
Expand Down
Loading