Skip to content

Conversation

Jym77
Copy link
Collaborator

@Jym77 Jym77 commented Feb 26, 2020

Presentational roles conflict resolution states that elements with a role="none" must be exposed with their implicit role if they have either a global aria-* attribute (e.g. aria-label) or are focusable. This was completely ignored by our definition of semantic role.

This resolution is not well implemented in all browsers (https://github.com/act-rules/act-rules.github.io/wiki/Tests-on-Presentational-role-Conflict-resolution). A side note being the handling of aria-hidden on focusable elements for which there is no specs and browsers are doing different things.


This PR updates the definition of semantic role to take the resolution into account. The role is linked to the actual role in the accessibility tree to circumvent both the discrepancies between browsers (we do with what we have instead of taking side) and the ambiguous "interactive" term in the spec (we don't decide what is interactive, we just do with whatever the UA is giving us). The new examples are however following the specs (which is also what Chrome, the majority browser, does).

I have also removed examples with aria-hidden on focusable elements. Because there is no spec for what do to in that case, and browsers disagree, I preferred taking these examples out because what to do is far from clear.

I considered that "ARIA state or property is permitted" was the main rule to test the definition and added several examples there. Other rules are mostly using the role incidentally and only got one extra example (usually a Failed one as "when do we fail?" is the important question for our rules).


The definition of "marked as decorative" also ended up as collateral damage of this PR. There was somewhat of an internal contradiction between "having a role of none" and achieving that by "explicitly setting role="none"" (which does not work because of the conflict resolution). Where it was important, "marked as decorative" as been replaced by "role of none" which seems to work.

We might still need a definition of "marked as decorative" which would be in the line of "explicit role of none" so that something could be marked as decorative (expressing intention of the writer) without actually having a role of none (due to conflict resolution) and that would likely indicate some sort of failure or at least bad practice (i.e. explicitly setting role="none" aria-label="foo" is a bad idea as there is conflict between the intention of hiding stuff and showing it).


Changes ripples all over the place and in many rules. Please take a close look and also try to figure out if I've missed something… Keep the problem in mind when looking at other rules in the near future.

Closes issue(s):

Need for Final Call:
This will require a 2 weeks Final Call (changes many rules, has lot of implications).


Pull Request Etiquette

When creating PR:

  • Make sure you're 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.

@Jym77 Jym77 requested a review from kasperisager February 26, 2020 15:07
@Jym77 Jym77 self-assigned this Feb 26, 2020
@Jym77 Jym77 changed the title Handling Presentational role conflict resolution [DRAFT] Handling Presentational role conflict resolution Feb 26, 2020
Jym77 and others added 2 commits March 25, 2020 10:52
Co-Authored-By: Wilco Fiers <WilcoFiers@users.noreply.github.com>
Co-Authored-By: Wilco Fiers <WilcoFiers@users.noreply.github.com>
@Jym77 Jym77 dismissed WilcoFiers’s stale review March 25, 2020 09:53

Changes accepted.

@Jym77 Jym77 requested a review from WilcoFiers March 25, 2020 09:53
Copy link
Contributor

@kasperisager kasperisager left a comment

Choose a reason for hiding this comment

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

👏

Copy link
Member

@WilcoFiers WilcoFiers left a comment

Choose a reason for hiding this comment

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

Minor change suggestion.

@@ -0,0 +1,19 @@
---
title: Explicitly Hidden
Copy link
Member

Choose a reason for hiding this comment

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

Thinking about this a little more... I don't think I like having a "hidden" definition that isn't the opposite of the "visible" definition. We did that in axe-core and it's pretty confusing. I think we should rename this to "hidden state", and say it can be either true or false.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Which is why I called it "explicitly hidden" in the first place #1189 (comment) 😆
"hidden state" is also a good name.

@Jym77 Jym77 dismissed WilcoFiers’s stale review April 6, 2020 09:35

Change done.

@Jym77 Jym77 requested a review from WilcoFiers April 6, 2020 09:35
@Jym77
Copy link
Collaborator Author

Jym77 commented Apr 14, 2020

Final Call ends on April 28th.

@Jym77 Jym77 added Review call 2 weeks Call for review for new rules and big changes and removed reviewers wanted labels Apr 14, 2020
carlosapaduarte added a commit that referenced this pull request Apr 23, 2020
…pose (fd3a94) (#693)

* Create links-with-identical-names-and-context-serve-equivalent-purpose-fd3a94.md

* Create programatically-determined-link-context.md

* Inserting links to definitions in Assumptions

* Insert reference to WCAG definition

* Change link text for WCAG definition link

* Fixed spelling

* Fixed spelling

* Delete programatically-determined-link-context.md

There is already a working definition

* Update links-with-identical-names-and-context-serve-equivalent-purpose-fd3a94.md

* Update links-with-identical-names-and-context-serve-equivalent-purpose-fd3a94.md

* Update _rules/links-with-identical-names-and-context-serve-equivalent-purpose-fd3a94.md

Co-Authored-By: Jean-Yves Moyen <jym@siteimprove.com>

* Update _rules/links-with-identical-names-and-context-serve-equivalent-purpose-fd3a94.md

Co-Authored-By: Jean-Yves Moyen <jym@siteimprove.com>

* Update _rules/links-with-identical-names-and-context-serve-equivalent-purpose-fd3a94.md

Co-Authored-By: Jean-Yves Moyen <jym@siteimprove.com>

* Update links-with-identical-names-and-context-serve-equivalent-purpose-fd3a94.md

* Removed inapplicable example 4

Following #1189

* Update _rules/links-with-identical-names-and-context-serve-equivalent-purpose-fd3a94.md

Co-Authored-By: Wilco Fiers <WilcoFiers@users.noreply.github.com>

* Update links-with-identical-names-and-context-serve-equivalent-purpose-fd3a94.md

* Update links-with-identical-names-and-context-serve-equivalent-purpose-fd3a94.md

* fix: ignore attr lowercase html validation

* Update links-with-identical-names-and-context-serve-equivalent-purpose-fd3a94.md

* Update _rules/links-with-identical-names-and-context-serve-equivalent-purpose-fd3a94.md

Co-Authored-By: Wilco Fiers <WilcoFiers@users.noreply.github.com>

* Update links-with-identical-names-and-context-serve-equivalent-purpose-fd3a94.md

* Update links-with-identical-names-and-context-serve-equivalent-purpose-fd3a94.md

* Update links-with-identical-names-and-context-serve-equivalent-purpose-fd3a94.md

* Apply suggestions from code review

Co-Authored-By: daniel-montalvo <49305434+daniel-montalvo@users.noreply.github.com>

* Update links-with-identical-names-and-context-serve-equivalent-purpose-fd3a94.md

* Update links-with-identical-names-and-context-serve-equivalent-purpose-fd3a94.md

* Update links-with-identical-names-and-context-serve-equivalent-purpose-fd3a94.md

Co-authored-by: jkodu <jey.nandakumar@gmail.com>
Co-authored-by: carlosapaduarte <carlosapaduarte@gmail.com>
Co-authored-by: Jean-Yves Moyen <jym@siteimprove.com>
Co-authored-by: Wilco Fiers <WilcoFiers@users.noreply.github.com>
Co-authored-by: daniel-montalvo <49305434+daniel-montalvo@users.noreply.github.com>
@Jym77
Copy link
Collaborator Author

Jym77 commented Apr 28, 2020

Final Call has ended. Merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Definition General for all rules Review call 2 weeks Call for review for new rules and big changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Definition of role do not take presentational conflict into account

6 participants