Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion _rules/summary-non-empty-accessible-name-2t702h.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Each target element has an [accessible name][] that is not empty (`""`), nor jus

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


If the `summary` element is not included in the accessibility tree, but is still included in sequential focus navigation, this can result in accessibility issues not tested by this rule. This is covered under [Element with aria-hidden has no content in sequential focus navigation][6cfa84].

Expand Down
Loading