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

"Element with presentational children has no focusable content" (rule 307n5z) - adding examples #2099

Open
wants to merge 26 commits into
base: develop
Choose a base branch
from

Conversation

dan-tripp-siteimprove
Copy link
Collaborator

@dan-tripp-siteimprove dan-tripp-siteimprove commented Aug 17, 2023

Adding examples to rule presentational-children-no-focusable-content-307n5z. Mostly uncontroversial, I think, except for Inapplicable Example 4 ("At the time of writing..."), which I expect will ruffle some feathers.

Closes issue(s): none

Need for Call for Review:
This will not require a Call for Review : editorial changes (including to the applicability, expectation or examples section)


Pull Request Etiquette

When creating PR:

  • Make sure you're requesting to pull a branch (right side) to the develop branch (left side).
  • Make sure you do not remove the "How to Review and Approve" section in your pull request description

After creating PR:

  • Add yourself (and co-authors) as "Assignees" for PR.
  • Add label to indicate if it's a Rule, Definition or Chore.
  • Link the PR to any issue it solves. This will be done automatically by referencing the issue at the top of this comment in the indicated place.
  • Optionally request feedback from anyone in particular by assigning them as "Reviewers".

When merging a PR:

  • Close any issue that the PR resolves. This will happen automatically upon merging if the PR was correctly linked to the issue, e.g. by referencing the issue at the top of this comment.

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 Call for Review period. In case of disagreement, the longer period wins.

@dan-tripp-siteimprove dan-tripp-siteimprove self-assigned this Aug 17, 2023
@dan-tripp-siteimprove dan-tripp-siteimprove added the Editorial For editorial changes that does not change the meaning of a rule or Glossary term label Aug 17, 2023
@dan-tripp-siteimprove dan-tripp-siteimprove changed the title Presentational children no focusable content 307n5z examples aug 2023 "Element with presentational children has no focusable content" (rule 307n5z) - adding examples Aug 17, 2023
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 examples are good. The descriptions are very verbose and going into much more details compared to what we usually do. Some of these discussions might be moved to the background section instead (e.g. the discussion about presentational/hidden/decorative.

</li>
</ul>

Adding to this confusion is a third term: "decorative". The words "decorative" and "presentational" are often used interchangeably, but that usage is inaccurate. The word "decorative" often appears in a sentence such as "marking an image as decorative" - that is, by adding `alt=""` to an `<img>` element. "Decorative" in that context <i>does</i> mean "hidden" - and "hidden", again, is different from "presentational" - so using "decorative" and "presentational" interchangeably is inaccurate. At the time of writing (August 2023), the ACT definition of "[marked as decorative][]" unfortunately encourages this inaccurate usage: it states that <q>An element is marked as decorative if ... it has an explicit role of none or presentation</q>.
Copy link
Collaborator

Choose a reason for hiding this comment

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

That's why we use "marked as decorative", and not "decorative" 😄
Being "marked as decorative" is showing author intention to somehow remove the content. It doesn't necessarily means that the content will effectively be removed/hidden/… (because the presentational role conflict resolution can trigger).

I also consider "decorative" as being a semantic property of the page. "presentational" (or role of presentation (post-conflict resolution)) is more of a functional/effective property of the page. The same way that "being a label (WCAG sense of the term)" is a semantic property while using a label element is the functional property (and the way to convey that semantics programmatically). That is, an image is "decorative" not because it has alt="" but because it is "serving only an aesthetic purpose, providing no information, and having no functionality" (WCAG's "pure decoration"). Adding alt="" is a way to convey programmatically the fact that the image is decorative, so that ATs can treat it differently from a non-decorative image.

In that spirit, "marked as decorative" is "the author tried to convey programmatically the semantic information that something is decorative". This may work as intended (and the stuff will be either presentational or hidden), but this may also fail (and the stuff will be exposed as normal).

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Okay, so decorative != marked as decorative. Even if that's okay (which is unclear to me), I still think we have a problem.

I would draw a venn diagram here if I could, but I can't, so here is a tree which represents a venn diagram of the situation you described. (In this venn diagram tree, all child sets totally consume the parent set. eg. Set B minus Set C minus Set D = an empty set.)

  • Set A: marked as decorative
    • Set B: "marked as decorative" worked
      • Set C: presentational
      • Set D: hidden
    • Set E: "marked as decorative" did not work (==> still has semantics)

That presents two problems:

  1. Sets C and D are so different, I think it's confusing for us to include them both under "Set B: "marked as decorative" worked".
  2. I think that "Set D: hidden" corresponds to what most people think when they hear "marked as decorative". Also, I suspect that it overlaps precisely with their ideas of "decorative" and WCAG's "pure decoration" - and that's a good thing. If we go with the the above venn diagram, someone might say that ACT is out of touch, and they would be right.

Copy link
Member

Choose a reason for hiding this comment

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

While I think this feedback about how some definitions can be perceived is important, I don't think this is a good place to discuss it. I would suggest @dan-tripp-siteimprove opens an issue to discuss these points, and rewrite the example description is a less verbose manner.

@dan-tripp-siteimprove
Copy link
Collaborator Author

Some of these discussions might be moved to the background section instead (e.g. the discussion about presentational/hidden/decorative.

I can do that. How about I move Inapplicable Examples 3 and 4 to the Background section?

Copy link
Member

@carlosapaduarte carlosapaduarte left a comment

Choose a reason for hiding this comment

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

Tried to cut down on the verbosity of the example's descriptions.

</li>
</ul>

Adding to this confusion is a third term: "decorative". The words "decorative" and "presentational" are often used interchangeably, but that usage is inaccurate. The word "decorative" often appears in a sentence such as "marking an image as decorative" - that is, by adding `alt=""` to an `<img>` element. "Decorative" in that context <i>does</i> mean "hidden" - and "hidden", again, is different from "presentational" - so using "decorative" and "presentational" interchangeably is inaccurate. At the time of writing (August 2023), the ACT definition of "[marked as decorative][]" unfortunately encourages this inaccurate usage: it states that <q>An element is marked as decorative if ... it has an explicit role of none or presentation</q>.
Copy link
Member

Choose a reason for hiding this comment

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

While I think this feedback about how some definitions can be perceived is important, I don't think this is a good place to discuss it. I would suggest @dan-tripp-siteimprove opens an issue to discuss these points, and rewrite the example description is a less verbose manner.

- reducing verbosity.
- removing most commentary on "hidden" vs. "presentational".
- removing all commentary on "marked as decorative".
@dan-tripp-siteimprove
Copy link
Collaborator Author

dan-tripp-siteimprove commented Sep 21, 2023

I would suggest @dan-tripp-siteimprove opens an issue to discuss these points, and rewrite the example description is a less verbose manner.
@carlosapaduarte That's fair. I haven't opened a new issue yet - I'll discuss it in-person first. I did rewrite the example description and pushed another commit (d161d08). Let me know what you think.

@Jym77 Jym77 self-requested a review September 26, 2023 14:19
@dan-tripp-siteimprove dan-tripp-siteimprove requested review from Jym77 and carlosapaduarte and removed request for Jym77 and carlosapaduarte September 26, 2023 19:52
@tombrunet
Copy link
Collaborator

@dan-tripp-siteimprove I think what's here is fine. Is it worth mentioning for Inapplicable 4 that that issue is covered by another rule (https://www.w3.org/WAI/standards-guidelines/act/rules/6cfa84/)?

@dan-tripp-siteimprove
Copy link
Collaborator Author

@dan-tripp-siteimprove I think what's here is fine. Is it worth mentioning for Inapplicable 4 that that issue is covered by another rule (https://www.w3.org/WAI/standards-guidelines/act/rules/6cfa84/)?

I think yes, and I just did it in commit d7ea3d3. Thank you.

@Jym77 Jym77 dismissed their stale review December 7, 2023 14:38

Changes done

@Jym77 Jym77 self-requested a review December 7, 2023 14:39
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.

Just some cleanup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Editorial For editorial changes that does not change the meaning of a rule or Glossary term reviewers wanted
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants