Correction: conditionally revise allowed attributes and roles on summary element by scottaohara · Pull Request #435 · w3c/html-aria (original) (raw)

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

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

markup and results of linked codepen

`

test 1 aria-pressed on summary element
test 2

aria-expanded=false on summary element

test 3

aria-haspopup=dialog on summary element

`

`

test 4

aria-disabled=true on summary element

`

test 1 JAWS/NVDA+Chromium/Gecko - attribute ignored Narrator+Edge - attribute ignored / UIA ignores attr iOS/macos safari/firefox+VO - ignored

test 2 JAWS/NVDA+Chromium/Gecko - attribute ignored Narrator+Edge - attribute ignored / UIA ignores attr iOS/macos safari/firefox+VO - ignored

test 3 JAWS/NVDA+Chromium/Gecko - announces as a button menu Narrator+Edge - has popup macOS VO + Safari - has popup iOS VO + safari, macOS VO firefox - ignored

test 4 JAWS/NVDA+Chromium/Gecko - disabled state conveyed Narrator+Edge - disabled iOS/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

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


Preview | Diff