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
make visible text content definition objective #1419
Conversation
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.
Typos.
input_aspects: | ||
- CSS styling | ||
- DOM tree | ||
--- | ||
|
||
Elements that are [visible](#visible), that are of type text, excluding text content in `title` or `alt` attributes, and are not categorized as [non text content](https://www.w3.org/WAI/WCAG21/Understanding/non-text-content). | ||
The _visible text content_ of an [element][] is a set of all [visible][] [text node][] that are a [descendant][] in the [flat tree][] of the element. |
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.
The _visible text content_ of an [element][] is a set of all [visible][] [text node][] that are a [descendant][] in the [flat tree][] of the element. | |
The _visible text content_ of an [element][] is a set of all [visible][] [text nodes][text node] that are [descendants][descendant] in the [flat tree][] of this element. |
The complete [visible text content][] of the target element either matches or is contained within its [accessible name][]. | ||
|
||
**Note:** Leading and trailing [whitespace][] and difference in case sensitivity should be ignored. | ||
All [text nodes][] in the [visible text content][] of each target element matches, or is contained within the [accessible name][] of the target element, except for [text nodes][] contains [non-text content][]. Leading and trailing [whitespace][] and difference in case sensitivity should be ignored. |
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.
All [text nodes][] in the [visible text content][] of each target element matches, or is contained within the [accessible name][] of the target element, except for [text nodes][] contains [non-text content][]. Leading and trailing [whitespace][] and difference in case sensitivity should be ignored. | |
Each [text node][] in the [visible text content][] of each target element matches, or is contained within, the [accessible name][] of this target element, except for [text nodes][] containing [non-text content][]. Leading and trailing [whitespace][] and difference in case sensitivity should be ignored. |
Maybe even un-nesting a bit to avoid the "except":
All [text nodes][] in the [visible text content][] of each target element matches, or is contained within the [accessible name][] of the target element, except for [text nodes][] contains [non-text content][]. Leading and trailing [whitespace][] and difference in case sensitivity should be ignored. | |
Each [text node][] that is in the [visible text content][] of each target element and does not contain [non-text content][] matches, or is contained within, the [accessible name][] of the target element. Leading and trailing [whitespace][] and difference in case sensitivity should be ignored. |
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.
I think it's better to use the word "except" to be clear something is an exception, rather then use "or" to chain two conditions together.
c4e492f
to
5b82c71
Compare
5b82c71
to
b25f172
Compare
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.
👍
The complete [visible text content][] of the target element either matches or is contained within its [accessible name][]. | ||
|
||
**Note:** Leading and trailing [whitespace][] and difference in case sensitivity should be ignored. | ||
All [text nodes][] in the [visible text content][] of each target element matches, or is contained within the [accessible name][] of the target element, except for characters used to express [non-text content][]. Leading and trailing [whitespace][] and difference in case sensitivity should be ignored. |
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.
All [text nodes][] in the [visible text content][] of each target element matches, or is contained within the [accessible name][] of the target element, except for characters used to express [non-text content][]. Leading and trailing [whitespace][] and difference in case sensitivity should be ignored. | |
Each [text nodes][] in the [visible text content][] of each target element matches, or is contained within the [accessible name][] of this target element, except for characters used to express [non-text content][]. Leading and trailing [whitespace][] and difference in case sensitivity should be ignored. |
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.
Subtle but (IMO) important distinction here. The expectation applies to each applicable element, but within that element, all text nodes have to meet the condition or follow the exception.
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.
The question is whether we want:
- each individual text node matches or is contained.
- all text nodes, grouped together in one single thingie, match or are contained.
I am not sure what it means for "all test nodes" to match a string. We need to somehow gather "all text nodes" into a single stuff that can match the string. Is it concatenation in tree order? And then, the trimming of whitespace, does it occur before or after gathering all text nodes into a single thingie?
Maybe we want to call in @EmmaJP 😄
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.
I've tried to adjust the order of the wording. Hope that helps clarify it.
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.
I still find the sentence super weird, would personally use "each" and am not sure whether "all" should be singular or plural in that case.
But I won't block this further if I'm the only one having problem with this.
Also, why did you put the Final Call label on this PR? Looks like a misclick… |
Co-authored-by: daniel-montalvo <49305434+daniel-montalvo@users.noreply.github.com>
Huh! I thought I had fixed that.
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.
These changes look good and seem good solutions for the issues raised.
On a side note, as I haven't come across 'widget' used within rules to date I had to look up precisely what it meant in this context. Perhaps indicating a need to add a glossary definition. It could simply refer to https://www.digitala11y.com/widget-role/ or a similar explanation in the aria docs if there is one.
UPDATE: Just came across [widget role]: https://www.w3.org/TR/wai-aria-1.1/#widget_roles 'WAI-ARIA widget roles'
in the autocomplete stuff. Might be helpful to add to this rule where relevant.
@EmmaJP I'm not sure what to do with your comment about widget roles. The term "widget role" is linked in this rule to its definition in WAI-ARIA I think that's what you were asking? In which case that's already done. |
Closes #1254, closes #975
Need for Final Call: 1 week