Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Correction: conditionally revise allowed attributes and roles on summary element#435

Merged
scottaohara merged 16 commits intogh-pagesfrom
summary-element-attr-allowances
May 31, 2023
Merged

Correction: conditionally revise allowed attributes and roles on summary element#435
scottaohara merged 16 commits intogh-pagesfrom
summary-element-attr-allowances

Conversation

@scottaohara
Copy link
Member

@scottaoharascottaohara commentedNov 2, 2022
edited
Loading

Normative follow-on from#434

The spec was updated to note that the summary element doesnt' always map to the button element. The allowed attributes indicated that all attributes that were applicable to the button role were allowed. However, in practice this doesn't make sense and could break or be in contradiction to the implicit semantics.

The allowed aria-* attributes for the button role include

  • aria-disabled
  • aria-haspopup
  • aria-expanded
  • aria-pressed

Edit: after testing,aria-expanded andaria-pressed provide zero value on asummary element, as they are presently ignored by user agents (browsers/AT).https://codepen.io/scottohara/pen/ZEjZPoR

markup and results of linked codepen
<details open><summary aria-pressed=false>test 1</summary>aria-pressed on summary element</details>

<details open>
<summary aria-expanded=false>test 2</summary>
aria-expanded=false on summary element
</details>

<details open>
<summary aria-haspopup=dialog>test 3</summary>
aria-haspopup=dialog on summary element
</details>

<details open>
<summary aria-disabled=true>test 4</summary>
aria-disabled=true on summary element
</details>

test 1JAWS/NVDA+Chromium/Gecko - attribute ignoredNarrator+Edge - attribute ignored / UIA ignores attriOS/macos safari/firefox+VO - ignoredtest 2JAWS/NVDA+Chromium/Gecko - attribute ignoredNarrator+Edge - attribute ignored / UIA ignores attriOS/macos safari/firefox+VO - ignoredtest 3JAWS/NVDA+Chromium/Gecko - announces as a button menuNarrator+Edge - has popupmacOS VO + Safari - has popupiOS VO + safari, macOS VO firefox - ignoredtest 4JAWS/NVDA+Chromium/Gecko - disabled state conveyedNarrator+Edge - disablediOS/macOS Safari/firefox+VO - disabled

Concerning the allowed roles for a summary element. A summary element can be one of two things, the 'summary for its parent details' - where it acts as the triggering element for the disclosure widget. Or, if it doesn't meet the conditions to be that (e.g., it is not a child of a details element, or it is not the first instance of a summary element - e.g., it's the 2+ summary element within a details), then it is treated as a generic element, so any role/attribute should be allowed.

test cases -https://w3c.github.io/html-aria/tests/summary-allowances.html

  • HTML Validator
  • IBM equal access accessibility checker
  • axe-core
  • ARC toolkit

(linked issues to each checker referenced in the following thread)


Preview |Diff

Normative follow-on from#434The spec was updated to note that the summary element doesnt' always map to the button element.  The allowed attributes indicated that all attributes that were applicable to the button role were allowed.  However, in practice this doesn't make sense and could break or be in contradiction to the implicit semantics.The allowed aria-* attributes for the button role include * aria-disabled* aria-haspopup* aria-expanded* aria-pressedOf those four, aria-expanded and pressed are the ones that would pose problems by conflicting or not making any sense with the implicit expanded/collapsed states provided by the element (who gets the state per the parent details having an open attribute or not).
@scottaoharascottaohara added needs implementation commitmentCannot merge into spec until implementations in conformance checkers has been confirmed. needs changelog entryonce 2 implementations land, we can merge and note it in our changelog. labelsNov 2, 2022
@JAWS-test

This comment was marked as resolved.

@scottaohara

This comment was marked as resolved.

@JAWS-test

This comment was marked as resolved.

@scottaohara

This comment was marked as resolved.

@JAWS-test

This comment was marked as resolved.

@JAWS-test

This comment was marked as resolved.

@scottaohara

This comment was marked as resolved.

@JAWS-test

This comment was marked as resolved.

move to the parent paragraph element, rather than being on a child span.
this addition to the PR takes into account that only a summary element that serves as the 'summary for its parent details' needs to adhere to these rules.otherwise, a summary element that doesn't meet the criteria of the HTML spec is essentially just a generic element, so any roles/attributes can be used on that.
@scottaoharascottaohara changed the titlerevise allowed attributes on summary elementCorrection: conditionally revise allowed attributes and roles on summary elementFeb 7, 2023
@scottaoharascottaohara added Allowed rolesPertaining to the allowed roles of HTML elements Allowed aria-* attributes labelsFeb 7, 2023
@scottaoharascottaohara merged commitbf5c04b intogh-pagesMay 31, 2023
@scottaoharascottaohara deleted the summary-element-attr-allowances branchMay 31, 2023 14:34
@scottaoharascottaohara added Meets 2 implementations reqIndicates that a spec change has met the necessary 2 implementations needed to merge. and removed needs changelog entryonce 2 implementations land, we can merge and note it in our changelog. needs implementation commitmentCannot merge into spec until implementations in conformance checkers has been confirmed. labelsMay 31, 2023
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@stevefaulknerstevefaulknerAwaiting requested review from stevefaulkner

Assignees

No one assigned

Labels

Allowed aria-* attributesAllowed rolesPertaining to the allowed roles of HTML elementsMeets 2 implementations reqIndicates that a spec change has met the necessary 2 implementations needed to merge.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@scottaohara@JAWS-test@stevefaulkner

Comments


[8]ページ先頭

©2009-2026 Movatter.jp