Skip to content

ARIA in HTML update for summary element allowances #3911

Closed

Description

@scottaohara

ARIA in HTML is updating to clarify the ARIA attribute allowances for the summary element:

The summary currently allows no role, and any global aria-* attributes, and any aria-* attributes applicable to the button role.

The update changes this to indicate that no role is allowed so long as the summary element serves as the summary for its parent details element. However, Any role will be allowed on the element if it does not meet this requirement.

For instance, the following would continue to disallow any role from developers, as applying roles can cause AT to no longer correctly expose the current state of the disclosure widget:

<details>
  <summary>no role allowed</summary>
  ...
</details>

But the following examples demonstrate where any role may be applied to the summary element, as it does not meet HTML's conditions to be considered the summary for its parent details.

<details>
  <summary>
  	no role allowed on this summary, as it is the first instance of the summary
  	element within the details element, and thus browsers treat this as the 
  	summary / trigger to open/close the disclosure widget.
  </summary>

  <summary role=paragraph>
   any role is allowed on this summary element because it is ignored as a summary
   element by browsers, and instead returned as a generic element.
  </summary>
</details>

<summary role=group>
  this summary element also allows any role because it is not a child to a 
  details element, and thus is exposed as a generic by browsers.
</summary>

As the summary element is not consistently exposed as a button by all browsers, AND not all of the allowed ARIA attributes for button element even work on this element, the allowed attributes have been modified to reflect this.

If the summary element acts as the summary for its parent details, then global aria attributes and the aria-haspopup and aria-disabled attribute may be specified. Note that aria-expanded and aria-pressed are the attributes no longer allowed, and per testing, these attributes were not respected anyway.

If the summary element is not the summary for its parent details, then any global aria attributes and any attribute applicable to the allowed specified role may be used.

Additional examples and test cases can be viewed here:

Activity

  1. straker commented on Feb 13, 2023

    @straker
    Contributor

    Thanks for the update. This one may be hard to do with our current architecture. What roles/attributes are allowed on HTML elements is handled by our htlm-elms code. The code has the ability to change which roles/attributes are allowed based on attributes or properties of the node (using the variant property), but that only can work for checking things about the node itself. We currently do not have the ability to check for how the element is used (parent, structure, etc.). As a note, we also have the same problem for the figure element, so may have to make the same exception here (that is, allow any role to bypass the failure of using a role outside of details).

  2. scottaohara commented on Feb 13, 2023

    @scottaohara
    ContributorAuthor

    might this current limitation also relate to #3439

    and future updates we were planning to clarify the allowances for table element roles (similar to this li rule. if the table is no longer a table, then any role is allowed on the child elements (so long as they also then meet the requirements for their use)

  3. straker commented on Feb 13, 2023

    @straker
    Contributor

    Yep, that one also would fall under this limitation. Looks like we'll have to figure out a way to handle this moving forward.

  4. added
    standards
    on Feb 16, 2023
  5. added this to the Axe-core 4.9 milestone on Aug 7, 2023
  6. straker commented on Jul 21, 2026

    @straker
    Contributor

    The idea we have is to add more matching functions to our libs/commons/matches that can implement the check to see how the element is used. Similar to the functions needed in our lib/commons/standards/implicit-html-roles. Then we can trigger the matches functions from the html-elms variants.

  7. self-assigned this
    on Jul 22, 2026
  8. added a commit that references this issue on Jul 29, 2026
    0cf95be
  9. added a commit that references this issue on Aug 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

standards

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions