Skip to content

summary name, element position clarified#2323

Merged
WilcoFiers merged 2 commits intoact-rules:developfrom
zlayaAvocado:rule-page-update
May 8, 2025
Merged

summary name, element position clarified#2323
WilcoFiers merged 2 commits intoact-rules:developfrom
zlayaAvocado:rule-page-update

Conversation

@zlayaAvocado
Copy link
Copy Markdown
Collaborator

@zlayaAvocado zlayaAvocado commented Apr 16, 2025

Adds clarification on how the summary element can be used since HTML specification requires the summary element to be the first child of details, while WCAG does not.

This will not require a Call for Review : editorial changes to background

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.

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Apr 16, 2025

CLA assistant check
All committers have signed the CLA.

@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 16, 2025

Deploy Preview for act-rules ready!

Name Link
🔨 Latest commit 6d0e1ef
🔍 Latest deploy log https://app.netlify.com/sites/act-rules/deploys/680023c4c7bf93000869094d
😎 Deploy Preview https://deploy-preview-2323--act-rules.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@zlayaAvocado zlayaAvocado marked this pull request as ready for review April 16, 2025 21:43
@WilcoFiers WilcoFiers self-requested a review April 17, 2025 14:13
## Background

This rule is only applicable to `summary` elements that the browser will use as controls for a `details` element. While this rule is not applicable to `summary` elements with an [explicit role][], most of the time these likely do still require an [accessible name][]. This is covered by other rules, such as the [Button has non-empty accessible name][97a4e1].
This rule is only applicable to `summary` elements that the browser will use as controls for a `details` element. Even though the [HTML specification - The summary element](https://html.spec.whatwg.org/#the-summary-element) requires the `summary` element to be the first child of `details`, this is not required for WCAG. And while this rule is not applicable to `summary` elements with an [explicit role][], most of the time these likely do still require an [accessible name][]. This is covered by other rules, such as the [Button has non-empty accessible name][97a4e1].
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

(1) WCAG can't override HTML 5; (2) per ARIA in HTML, a 'summary' element neither has an implicit nor explicit role; and (3) a "summary" represent a summary, caption, or legend for its parent "details" element, rather than "use as control for a 'details' element".
Suggest changing into: "This rule is only applicable to a summary element that is a child of a details element. An accessible name is required for a "summary" element because the details element are often presented by browsers as a disclosure widget from which the user can obtain additional information or controls.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't really understand your point here. We're not testing HTML, or HTML in ARIA in this rule. I like Sasha's suggestion better.

## Background

This rule is only applicable to `summary` elements that the browser will use as controls for a `details` element. While this rule is not applicable to `summary` elements with an [explicit role][], most of the time these likely do still require an [accessible name][]. This is covered by other rules, such as the [Button has non-empty accessible name][97a4e1].
This rule is only applicable to `summary` elements that the browser will use as controls for a `details` element. Even though the [HTML specification - The summary element](https://html.spec.whatwg.org/#the-summary-element) requires the `summary` element to be the first child of `details`, this is not required for WCAG. And while this rule is not applicable to `summary` elements with an [explicit role][], most of the time these likely do still require an [accessible name][]. This is covered by other rules, such as the [Button has non-empty accessible name][97a4e1].
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't really understand your point here. We're not testing HTML, or HTML in ARIA in this rule. I like Sasha's suggestion better.

@WilcoFiers WilcoFiers merged commit b4e371c into act-rules:develop May 8, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants