-
Notifications
You must be signed in to change notification settings - Fork 28
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
DRAFT: Subjective applicability #539
Changes from all commits
43ce209
9b840ac
ddbce11
c8b05a9
d9cc98a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -408,11 +408,18 @@ The applicability describes what parts of the [=test subject=] are tested. | |
|
||
### Applicability for Atomic Rules ### {#applicability-atomic} | ||
|
||
The applicability section is a required part of an [=atomic rule=]. It <em class="rfc2119">must</em> contain a precise description of the parts of the [=test subject=] to which the rule applies. For example, specific nodes in the DOM [[DOM]] tree, or tags that are incorrectly closed in an HTML [[HTML]] document. These are known as the [=test targets=]. The applicability <em class="rfc2119">must</em> only use information made available through the listed [input aspects](#input-aspects) in the rule. No other information can be used in the applicability. Applicability <em class="rfc2119">must</em> be described objectively, unambiguously and in plain language. | ||
The applicability section is a required part of an [=atomic rule=]. It <em class="rfc2119">must</em> contain a precise description of the parts of the [=test subject=] to which the rule applies. For example, specific nodes in the DOM [[DOM]] tree, or tags that are incorrectly closed in an HTML [[HTML]] document. These are known as the [=test targets=]. The applicability <em class="rfc2119">must</em> only use information made available through the listed [input aspects](#input-aspects) in the rule. Definitions used in the description can be put in the rule [glossary](#glossary), or they can be defined in the section where they are used. No other information can be used in the applicability. | ||
|
||
An objective description is one that can be resolved without uncertainty, in a given technology. Examples of objective properties in HTML are tag names, their computed role, the distance between two elements, etc. Subjective properties on the other hand, are concepts like decorative, navigation mechanism and pre-recorded. | ||
Applicability <em class="rfc2119">must</em> be written unambiguously and in plain language. Applicability <em class="rfc2119">must</em> either be described objectively or use an **allowed subjective form**. An objective description is one that can be resolved without uncertainty, in a given technology. Examples of objective properties in HTML are tag names, their computed role, the distance between two elements, etc. When possible, objective descriptions <em class="rfc2119">should</em> be used since they reduce uncertainty. | ||
|
||
Even concepts like headings and images can be misunderstood. These terms could refer to the tag name, the semantic role, or the element's purpose on the web page because they are ambiguous. The latter of which is almost impossible to define objectively. When used in applicability, potentially ambiguous concepts <em class="rfc2119">must</em> be defined objectively. Definitions can be put in the rule [glossary](#glossary), or they can be defined in the section where they are used. | ||
Subjective properties on the other hand, are concepts like decorative, navigation mechanism and pre-recorded. When possible, subjectivity <em class="rfc2119">should</em> be avoided since it can easily be misunderstood. For example, concepts like headings and images could refer to the tag name, the semantic role, or the element’s purpose on the web page because they are ambiguous. The latter of which is almost impossible to define objectively. In some cases, where meeting the objectivity requirement is impossible, the use of a subjective description in the applicability is acceptable. | ||
|
||
Any applicability including subjective descriptions <em class="rfc2119">must</em> use one of the **Allowed Subjective Forms** shown below and place all subjectivity within a glossary definition. Glossary definitions used to identify subjective test targets <em class="rfc2119">must</em> provide a list of features or characteristics that are common to the intended test targets and the logic for determining if an element is applicable. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have had this in my own comments for awhile, but am finally putting it here. From our discussion at TPAC, we settled on basically having two types of definitions. The would include logical definitions (i.e., allowed to use AND, OR, NOT) and the "Getting warmer/colder" approach that generally defines the applicable test targets. For a rule with an applicability of "The rule applies to any HTML element that is styled as a heading." we would need to create the definition for "Styled as a heading". Example "getting warmer" definition:
NOTE: The last element in this list may need to be removed, its description mentions nothing about styling and may be the definitive definition of what it means for something to be a heading. Some of my current thoughts as of 12/5/2023 -
So what - It seems that we continue to identify best practices for writing subjective rules, but not changes that need to be made to the rules format in order to allow subjective rules. Given this we could simply include only the changes above that allow subjective rules and then have community rule writing guidelines that ensure the quality of the rules. This would make the rules format less prescriptive but much more adaptable. Lastly, I still think it would be beneficial to clearly label rules as objective or subjective (perhaps for both Applicability and Expectation) to ensure the expectations of readers/implementers are clear. |
||
|
||
**Allowed Subjective Forms**: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. A couple of thoughts here, is it clear that the things in brackets are the "fill in the blank" portion of the form? I should maybe add more verbiage to this. Is "Objective target description" the best verbiage we can use to state what the subjectivity is applying to? Is "role/common design pattern/subjective attribute" good wording for what kinds of subjectivity go with each form? I think not, this to me is the weakest part of this addition and the one that needs the most fleshing out and thought. |
||
1. [Objective target description] is styled as a [role] | ||
2. [Objective target description] functions like a [role/common design pattern] | ||
3. [Objective target description] is/has/expresses [subjective attribute] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This one feels too vague to me. One thing I think I'd like to do is for us to go over the subjective definitions we have today and see if we can categorise them somehow. Maybe see which ones we think would be okay for use in an applicability and which ones aren't. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It will be good to revisit it now with more context, but my initial stab at finding some of the subjectivity types we use are in act-rules/act-rules.github.io#2061 (comment). That is where these 3 forms originally came from, they seemed to deal with the examples I found as well as some I had seen people want to use. |
||
|
||
<aside class=example> | ||
<header>Example applicability of an atomic rule testing [WCAG 2.2 success criterion 1.4.2 Audio Control](https://www.w3.org/WAI/WCAG22/quickref/#audio-control):</header> | ||
|
@@ -436,6 +443,20 @@ Even concepts like headings and images can be misunderstood. These terms could r | |
</blockquote> | ||
</aside> | ||
|
||
<aside class=example> | ||
<header>Example applicability of a rule with visual headings as a test target</header> | ||
<blockquote> | ||
<p>The rule applies to any HTML element that is styled as a heading.</p> | ||
<p>Since this applicability is subjective, it requires a glossary definition for "styled as a heading".</p> | ||
<p>Styled as a heading defintion - An element is considered to be styled as a heading when it exhibits at least 2 of the following characteristics.</p> | ||
<ul> | ||
<li>Element text is visually distinct from nearby text, such as through the use of a larger font-size or bolding.</li> | ||
<li>Element is clearly delineated from surrounding text, either through the use of spacing or other visual effects.</li> | ||
<li>The element text broadly describes the content that follows it in the reading order of the page.</li> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To avoid including unintended targets, how about making the third item |
||
</ul> | ||
</blockquote> | ||
</aside> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I tried to create an example of what form these types of definitions might take. In the format above, I left it up to the definition author to determine the logic behind the classification (i.e., it doesn't always have to be meet 3 of X criteria to apply). For example, I considered making the logic here that a heading should be at least one of the first 2 bullet points and then must meet the 3rd. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I haven't made any changes to the format yet, but here are some of my initial responses to the questions we raised at the last meeting:
I think in all cases this would mean that the definition requires further expansion/editing. We already have processes in place to handle this, and I think as long as we stick to them we will be fine. I am a bit concerned that we will open the door to "cascading" complexity if we try to make our definitions cover too much ground, but I don't have any methods for preventing that at the moment.
With our current conversation, we have discussed (and I believe at least initially agreed) to allow more complex logic inside of the definitions. In my opinion, this means usages of the standard |
||
|
||
### Applicability for Composite Rules ### {#applicability-composite} | ||
|
||
The applicability of a composite rule is defined as the union of all applicability definitions from the rules listed in the [input rules](#input-rules). Rule authors <em class="rfc2119">may</em> omit a description of the applicability for composite rules. This can be useful if it is difficult to express the combined applicability in plain language. If the composite rule includes applicability, it <em class="rfc2119">must</em> be the union of all the applicability in the [input rules](#input-rules). | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As an aside, I think we should remove the
wording, since this refers to 4.1.1 which is getting deprecated in 2.2.