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

ARIA in HTML update for summary element allowances #1301

Closed
scottaohara opened this issue Feb 13, 2023 · 4 comments
Closed

ARIA in HTML update for summary element allowances #1301

scottaohara opened this issue Feb 13, 2023 · 4 comments
Assignees
Labels
development engine Issues in the accessibility-checker-engine component priority-3 (low) Ready for QA Standards user-reported Issues identified outside of the core team

Comments

@scottaohara
Copy link

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:

@aliunwala
Copy link
Contributor

From Triage meeting:
@philljenkins Please take a look at this.

@aliunwala
Copy link
Contributor

Triage:
We current treat the summary as an implicit button.

We need to add to our rule to make sure if <summary> is a child of <details> specifying any explicit role is invalid.

@aliunwala aliunwala added engine Issues in the accessibility-checker-engine component priority-3 (low) development labels Feb 23, 2023
@scottaohara
Copy link
Author

well, only the first summary. any summary after the first within a details would also allow any role, as browsers do not treat those as interactive elements anymore.

@philljenkins philljenkins added Standards user-reported Issues identified outside of the core team labels Mar 27, 2023
shunguoy added a commit that referenced this issue Apr 25, 2023
shunguoy added a commit that referenced this issue Apr 26, 2023
shunguoy added a commit that referenced this issue May 1, 2023
shunguoy added a commit that referenced this issue May 1, 2023
@ErickRenteria
Copy link
Contributor

Pushed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
development engine Issues in the accessibility-checker-engine component priority-3 (low) Ready for QA Standards user-reported Issues identified outside of the core team
Projects
None yet
Development

No branches or pull requests

5 participants