act-rules.github.io icon indicating copy to clipboard operation
act-rules.github.io copied to clipboard

New Rule: inline link in paragraph is distinguishable be4d0c

Open carlosapaduarte opened this issue 5 years ago • 25 comments

New rule

Blocked: waiting for decision on how to handle states in rules

Need for Final Call: This will require a 2 weeks Final Call << new rule, or substantial changes affecting a large number of test cases, if in doubt, use this. >>


Pull Request Etiquette

When creating PR:

  • Make sure you requesting to pull a branch (right side) to the develop branch (left side).

After creating PR:

  • Add yourself (and co-authors) as "Assignees" for PR.
  • Add label to indicate if it's a Rule, Definition or Chore.
  • Close the issue that the PR resolves (and make sure the issue is referenced in the top of this comment)
  • Optionally request feedback from anyone in particular by assigning them as "Reviewers".

How to Review And Approve

  • Go to the “Files changed” tab
  • Here you will have the option to leave comments on different lines.
  • Once the review is completed, find the “Review changes” button in the top right, select “Approve” (if you are really confident in the rule) or "Request changes" and click “Submit review”.
  • Make sure to also review the proposed Final Call period. In case of disagreement, the longer period wins.

carlosapaduarte avatar Nov 07 '19 09:11 carlosapaduarte

I was using "Numerical color values" from CSS 3 (https://www.w3.org/TR/2018/REC-css-color-3-20180619/#numerical). But I'm also okay with moving to CSS 4 even if it's in draft.

I'll update the PR accordingly.

carlosapaduarte avatar Jan 29 '20 14:01 carlosapaduarte

@WilcoFiers, I addressed (or answered) your comments. @kasperisager and @daniel-montalvo, following @wilco's review, this rule is now a composite. Also, there were a few changes to the applicability, and to expectations (of what now are atomic rules). Following your previous approval, could you please reveiw again?

carlosapaduarte avatar Feb 09 '20 15:02 carlosapaduarte

@WilcoFiers I've rewritten the applicability to consider the (computed) display property of the ancestor element instead of what element it is. Also, I've added another assumption to account for
elements. Could you have a quick look at it?

@kasperisager @daniel-montalvo It would be great if you guys could also give me your feedback on this, given that you had previously approved this PR.

I've only touched the applicability in the composite rule. If everyone agrees with the proposed change then I'll update the atomic rules.

carlosapaduarte avatar Mar 23 '20 12:03 carlosapaduarte

Some changes following @daniel-montalvo review to try to improve the readability of the applicability. Still looking forward to your comments on this @WilcoFiers Just look at the applicability of the composite rule (the atomic rules have not been updated yet).

carlosapaduarte avatar Mar 30 '20 09:03 carlosapaduarte

All atomic rules have the updated applicability and examples in accordance. This one is ready for reviews again.

carlosapaduarte avatar Apr 01 '20 11:04 carlosapaduarte

Final call ends July 10

carlosapaduarte avatar Jun 26 '20 10:06 carlosapaduarte

I've not looked at this stuff before (sorry), and there is a lot to look at.

If I'm understanding it correctly, it makes me feel rather uncomfortable because the atomic rules seem to be checking for something that is not in and of itself an accessibility issue. I've not thought that about an atomic rule before.

1.4.1 is the only SC referenced. It cares that color is not the only way information is conveyed. For links specifically, that a link is distinguishable as a link without needing to see colors. I think that not all the atomic rules are clear that they are checking an aspect of that.

It may take me a while to untangle everything, so please bear with any comments I add. They may yet get edited, and I can't do much more today.

EmmaJP avatar Jun 26 '20 16:06 EmmaJP

If I'm understanding it correctly, it makes me feel rather uncomfortable because the atomic rules seem to be checking for something that is not in and of itself an accessibility issue. I've not thought that about an atomic rule before.

Yes! You'll be able to see that the atomics do not have any accessibility requirements because there are multiple ways to meet the success criterion. That's why we can't say that if a rule fails the SC is not met.

This is what happens with most (all?) atomic that are part of composite rules.

It may take me a while to untangle everything, so please bear with any comments I add. They may yet get edited.

Take your time :-)

carlosapaduarte avatar Jun 26 '20 16:06 carlosapaduarte

Taking this out of final call to address the requested changes.

carlosapaduarte avatar Jul 15 '20 17:07 carlosapaduarte

Following @Jym77 helpful revision and suggestions, this rule has been substantially revised. I believe it's easier to understand now. It's also much smaller (from 6 to 2 atomic).

carlosapaduarte avatar Jul 16 '20 17:07 carlosapaduarte

@daniel-montalvo Thanks for the suggestions. I've updated the rules.

carlosapaduarte avatar Jul 29 '20 17:07 carlosapaduarte

@daniel-montalvo Thanks for catching that one that I missed. Changes applied.

carlosapaduarte avatar Aug 03 '20 09:08 carlosapaduarte

For at least one element of the set comprised by the test target and all of its visible descendant elements [...]

That seems to mostly do the trick! I'm guessing we should be looking at the flat tree though?

Indeed! It's great to know that I can always count on you to remind me about that 👍

carlosapaduarte avatar Aug 03 '20 17:08 carlosapaduarte

@Jym77 @EmmaJP @kasperisager @WilcoFiers @ShadowBB this is ready for another round of reviews. Hopefully, I addressed successfully the difference between hue and luminance.

carlosapaduarte avatar Sep 02 '20 13:09 carlosapaduarte

@EmmaJP Thanks for the suggestions. Check if you're happy with the description of failed example 1.

carlosapaduarte avatar Sep 03 '20 09:09 carlosapaduarte

Major update, motivated by @Jym77's review: The rule is now a single atomic. A couple more definitions were introduced to try to improve legibility.

carlosapaduarte avatar Sep 04 '20 21:09 carlosapaduarte

Final call ends November 9

carlosapaduarte avatar Oct 26 '20 13:10 carlosapaduarte

@daniel-montalvo @jeeyyy @Jym77 Following @WilcoFiers review there have been multiple updates to this rule (applicability, expectation, examples, a couple of definitions), therefore I need you to review this again

carlosapaduarte avatar Oct 27 '20 20:10 carlosapaduarte

@mitchellevan I've replied to your comments. Would be great to have further feedback from you, if you feel something is still unclear.

carlosapaduarte avatar Nov 06 '20 10:11 carlosapaduarte

This PR was discussed on the ACT CG call of November 26. Two topics in particular were addressed:

  • In what hover/focus states has the expectation to hold for the rule to pass. The consensus was that it needs to hold in all hover/focus states, as supported by the note on example 2 of F73

  • Is the rule applicable to links with a different hue only, i.e. what is the intended meaning of color in SC 1.4.1. There was no consensus on this one. F73 and G183, as well as the understanding document of SC 1.4.11, suggest that hue only differences are needed for the SC to apply. But, the ACT CG decision was to further investigate and reach out to the AGWG for clarification.

The AGWG currently has a PR (https://github.com/w3c/wcag/pull/1500) open, aiming to bring a clear interpretation to the understanding document of SC 1.4.1. This PR would require only different hue to make a link applicable, and require a 3:1 contrast ratio for the rule to pass. Still, while the PR is not merged this can not be assumed for this rule.

carlosapaduarte avatar Nov 30 '20 15:11 carlosapaduarte

With the PR https://github.com/w3c/wcag/pull/1500 having been merged we are free to continue working this rule. I've updated it to expect that the styles are different in every state (hover or focused) and kept it as considering hue only for applicability (and color for expectation).

@WilcoFiers @Jym77 @daniel-montalvo this is ready for another round of reviews.

carlosapaduarte avatar Jan 18 '21 17:01 carlosapaduarte

🙈 Gaaaaaah Github was trigger-happy today. Sorry.

Jym77 avatar Jan 19 '21 14:01 Jym77

It just dawned on me that this rule doesn't yet seem like it would accept a difference in cursor presented as a distinguishing style. Consider the following example:

<style>
  a {
    color: black;
  }

  a:hover {
    text-decoration: none;
  }
</style>

<p>Hello <a href="https://example.com">world</a></p>

When the above link is hovered, the text decoration disappears, which is extremely common. When hovered, the link therefore doesn't seem like it would be considered distinguishable from the surrounding text by the rule. However, the cursor by default changes to a "pointer", prompting for an action and serving as a distinguishing feature for the link.

Thoughts?

kasperisager avatar Jun 25 '21 11:06 kasperisager

The ACT rule never considered the pointer change as good enough…

If we do, we can basically stop testing on hover…

Jym77 avatar Jun 25 '21 12:06 Jym77

Well, it's still possible to do crazy things like this:

<style>
  a {
    color: black;
  }

  a:hover {
    text-decoration: none;
    cursor: default;
  }
</style>

<p>Hello <a href="https://example.com">world</a></p>

Now the cursor doesn't change on hover 😔

Edit: This is already being discussed here: https://github.com/w3c/wcag/issues/1761

kasperisager avatar Jun 25 '21 12:06 kasperisager