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

Updating CG writing guidance with example removed from ACT format doc. #2156

Open
wants to merge 9 commits into
base: develop
Choose a base branch
from
18 changes: 17 additions & 1 deletion pages/design/rule-design.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,26 @@ While optional, this can provide information on authors, previous authors, and o

Applicability describes which (elements of) web pages should be tested using the rule. These elements are known as test targets. Applicability must be written in plain language, as well-formed grammatically correct sentences, so that it can be used by QA testers. Applicability must rely on well defined properties of the technologies that are tested. For instance, a rule may be applicable to all `video` elements, but it can not be applicable to all `object` elements used to show video, unless the term "video" is further defined.

Use objective, unambiguous definitions within applicability. Finding objective definitions to use in rules can be difficult, if not outright impossible in some cases. The intent here is to ensure repeatability of the rule. Not everything in WCAG testing is entirely repeatable, but when it comes to rule applicability, this is a hard requirement.
The applicability of a rule must be unambiguous and should be written using objective statements and in plain language. Finding objective definitions to use in rules can be difficult, if not outright impossible in some cases. New in version 1.1 of the ACT rules format is the ability to write rules using a subjective applicability. For rules that include a subjectivity, it is preferred to include a list of features (either in line or as part of a definition) that describes how an element should be evaluated for matching the accessibility (see the "Styled as a Heading" example in the [ACT Rules Format: Applicability](https://www.w3.org/TR/act-rules-format/#applicability)). Additionally, in the past, exception statements have been included in the Expectation that can now be directly placed in the applicability. Placing exceptions in the Applicability is now the recommended approach when the test subject is inapplicable, instead of artificially making the test subject pass the rule by having the subjectivity in the expectation (see the "Subjectivity in Applicability vs Expectation" example below). As a reminder, the intent here is to ensure repeatability of the rule.

> _For example:_ A rule testing that page titles are descriptive should only apply to specific `title` elements and this could be stated as _"This rule applies to the first HTML `title` element that is a descendant of the `html` element of a web page, and contains children that are text nodes that are not only whitespace."_.

### Subjectivity in Applicability vs Expectation Examples

With the development of ACT Rules format 1.1, subjectivity is now allowed in both the Applicability and the Expectation. However, depending on the rule, it can be difficult to know if a subjective phrase belongs in the Applicability or the Expectation. While we will continue to rely on the best judgment of the rule authors, most S.C. contain language suggesting where the subjectivity be placed. Lastly, at the bottom of this section, we provide some concrete examples of each of the cases below to help illustrate our point.
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
With the development of ACT Rules format 1.1, subjectivity is now allowed in both the Applicability and the Expectation. However, depending on the rule, it can be difficult to know if a subjective phrase belongs in the Applicability or the Expectation. While we will continue to rely on the best judgment of the rule authors, most S.C. contain language suggesting where the subjectivity be placed. Lastly, at the bottom of this section, we provide some concrete examples of each of the cases below to help illustrate our point.
With the development of ACT Rules format 1.1, subjectivity is now allowed in both the Applicability and the Expectation. However, depending on the rule, it can be difficult to know if a subjective phrase belongs in the Applicability or the Expectation. While we will continue to rely on the best judgment of the rule authors, most success criteria contain language suggesting where the subjectivity be placed. Lastly, at the bottom of this section, we provide some concrete examples of each of the cases below to help illustrate our point.

consistent with wording above


When determining the placement of subjectivity in an ACT rule, the main question to answer is whether the S.C. would apply at all to the given content or if the content would satisfy the criteria via a normative exception. For example,
- For S.C. 1.4.3 Contrast Minimum, non-text content or text that is not expressing something in human language (like an emoji) is not evaluated by the S.C. and so should not be applicable in an ACT rule for 1.4.3
- For S.C. 1.4.3 Contrast Minimum, logos are a normative exception to the S.C., so they should be included as a passed exception to the Expectation for an ACT rule testing 1.4.3.
- For S.C. 2.5.5 Target Size (Enhanced), a link inside of a paragraph of text and a pin on a map would fit the normative exceptions of "Inline" and "Essential" respectively, and so should be included as a passed exception in the Expectation.
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
- For S.C. 2.5.5 Target Size (Enhanced), a link inside of a paragraph of text and a pin on a map would fit the normative exceptions of "Inline" and "Essential" respectively, and so should be included as a passed exception in the Expectation.
- For S.C. 2.5.5 Target Size (Enhanced), a link inside of a paragraph of text and a pin on a map would fit the normative exceptions of "Inline" and "Essential" respectively, and so should be included as passed exceptions in the Expectation.

Comment on lines +116 to +119
Copy link
Collaborator

@giacomo-petri giacomo-petri Jun 20, 2024

Choose a reason for hiding this comment

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

Suggested change
When determining the placement of subjectivity in an ACT rule, the main question to answer is whether the S.C. would apply at all to the given content or if the content would satisfy the criteria via a normative exception. For example,
- For S.C. 1.4.3 Contrast Minimum, non-text content or text that is not expressing something in human language (like an emoji) is not evaluated by the S.C. and so should not be applicable in an ACT rule for 1.4.3
- For S.C. 1.4.3 Contrast Minimum, logos are a normative exception to the S.C., so they should be included as a passed exception to the Expectation for an ACT rule testing 1.4.3.
- For S.C. 2.5.5 Target Size (Enhanced), a link inside of a paragraph of text and a pin on a map would fit the normative exceptions of "Inline" and "Essential" respectively, and so should be included as a passed exception in the Expectation.
When determining the placement of subjectivity in an ACT rule, the main question to answer is whether the success criterion would apply at all to the given content or if the content would satisfy the criteria via a normative exception. For example,
- For SC 1.4.3 Contrast Minimum, non-text content or text that is not expressing something in human language (like an emoji) is not evaluated by the success criterion and so should not be applicable in an ACT rule for 1.4.3
- For SC 1.4.3 Contrast Minimum, logos are a normative exception to the success criterion, so they should be included as a passed exception to the Expectation for an ACT rule testing 1.4.3.
- For SC 2.5.5 Target Size (Enhanced), a link inside of a paragraph of text and a pin on a map would fit the normative exceptions of "Inline" and "Essential" respectively, and so should be included as passed exceptions in the Expectation.

consistent with WCAG acronym (I'm not sure we have best practices as ACT on how to consistently present some common words, but I think this is more appropriate and consitent with WCAG documentation).

- For S.C. 3.3.1: Error Identification, a page should not be applicable for an ACT rule until a form field error indicator exists, thus the presence of a form field error indicator should be included in the rule's applicability.
Copy link
Collaborator

@giacomo-petri giacomo-petri Jun 20, 2024

Choose a reason for hiding this comment

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

Suggested change
- For S.C. 3.3.1: Error Identification, a page should not be applicable for an ACT rule until a form field error indicator exists, thus the presence of a form field error indicator should be included in the rule's applicability.
- For SC 3.3.1 Error Identification, a page should not be applicable for an ACT rule until a form field error indicator exists, thus the presence of a form field error indicator should be included in the rule's applicability.


When making these determinations, it maybe helpful to consider the following circumstances:
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
When making these determinations, it maybe helpful to consider the following circumstances:
When making these determinations, it may be helpful to consider the following circumstances:

- If there was a page with only the content in question, would you expect it to be passed or inapplicable for an ACT rule. Passing would indicate the subjectivity belongs in the Expectation while inapplicable suggests it belongs in the Applicability.
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
- If there was a page with only the content in question, would you expect it to be passed or inapplicable for an ACT rule. Passing would indicate the subjectivity belongs in the Expectation while inapplicable suggests it belongs in the Applicability.
- If a page contained only the specific example, would you expect it to pass or be deemed inapplicable for an ACT rule? Passing would imply the subjectivity belongs in the Expectation, while being inapplicable suggests it belongs in the Applicability.

I think "content in question" should be replaced with "specific example", since "Example" is the word we use for each test case.

- Does the formulation of applicability and expectation lead to test cases that pass that should be inapplicable? If so, subjectivity likely needs to be added to the Applicability (possibility moved from the Expectation to the Applicability)
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
- Does the formulation of applicability and expectation lead to test cases that pass that should be inapplicable? If so, subjectivity likely needs to be added to the Applicability (possibility moved from the Expectation to the Applicability)
- Does the formulation of applicability and expectation lead to test cases passing when they should be deemed inapplicable? If so, subjectivity likely needs to be added to the Applicability (possibility moved from the Expectation to the Applicability)

rewording a little bit to improve clarity


As a final reminder, the end goal of allowing subjectivity in the applicability is allow the writing of rules that were previously impossible and to prevent rules from creating passed test cases that are inapplicable to the S.C. the rule is intended to test.
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
As a final reminder, the end goal of allowing subjectivity in the applicability is allow the writing of rules that were previously impossible and to prevent rules from creating passed test cases that are inapplicable to the S.C. the rule is intended to test.
As a final reminder, the end goal of allowing subjectivity in the applicability is to allow the creation of rules that were previously impossible and to prevent rules from creating passed examples that are inapplicable to the success criteria the rule is intended to test.

reworded a little bit to improve clarity


For more details, see [ACT Rules Format: Applicability](https://www.w3.org/TR/act-rules-format/#applicability).

## Expectations
Expand Down
Loading