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

make visible text content definition objective #1419

Merged
merged 6 commits into from Sep 7, 2020

Conversation

WilcoFiers
Copy link
Member

@WilcoFiers WilcoFiers commented Aug 18, 2020

  • Because the definition of Visible text content is used in the applicability, it can not be subjective.
  • Add a ligature font passed example

Closes #1254, closes #975

Need for Final Call: 1 week

Jym77
Jym77 previously requested changes Aug 18, 2020
Copy link
Collaborator

@Jym77 Jym77 left a 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.
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
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.
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
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":

Suggested change
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.

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 it's better to use the word "except" to be clear something is an exception, rather then use "or" to chain two conditions together.

@WilcoFiers WilcoFiers force-pushed the visible-text-subjective branch 2 times, most recently from c4e492f to 5b82c71 Compare August 18, 2020 12:15
Jym77
Jym77 previously requested changes Aug 18, 2020
Copy link
Collaborator

@Jym77 Jym77 left a 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.
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
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.

Copy link
Member Author

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.

Copy link
Collaborator

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 😄

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've tried to adjust the order of the wording. Hope that helps clarify it.

@WilcoFiers WilcoFiers requested a review from Jym77 August 19, 2020 08:14
@WilcoFiers WilcoFiers added Review Call 1 week Call for review for small changes and removed reviewers wanted labels Aug 19, 2020
Copy link
Collaborator

@Jym77 Jym77 left a 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.

@Jym77
Copy link
Collaborator

Jym77 commented Aug 19, 2020

Also, why did you put the Final Call label on this PR? Looks like a misclick…
#1419 (comment)

@WilcoFiers WilcoFiers added reviewers wanted and removed Review Call 1 week Call for review for small changes labels Aug 19, 2020
Co-authored-by: daniel-montalvo <49305434+daniel-montalvo@users.noreply.github.com>
@WilcoFiers WilcoFiers dismissed daniel-montalvo’s stale review August 19, 2020 10:15

Huh! I thought I had fixed that.

@WilcoFiers WilcoFiers added Review Call 1 week Call for review for small changes and removed reviewers wanted labels Aug 24, 2020
Copy link
Collaborator

@EmmaJP EmmaJP left a 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.

@WilcoFiers
Copy link
Member Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Review Call 1 week Call for review for small changes
Projects
None yet
5 participants