You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems to me that in the following scenario, it is incorrect to expect the heading be announced:
<details><summary><h2>All about trains</h2></summary><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p></details>
According to ARIA in HTML, the implicit role of <summary> is button. Then looking up button in ARIA 1.1, it says it has Children Presentational: True. The way I understand presentational children is that the ARIA spec forces the role of all descendants of such elements to be presentation. So putting an h2 in a summary element should result in that h2 having its role forced to be presentation.
I know quite a few browsers don't respect the presentational children requirement in ARIA. I personally think they are right on that, and that presentational children should be taken out of ARIA, but unless I'm misunderstanding something, what is called a fail in these tests is actually the expected bahavior.
The text was updated successfully, but these errors were encountered:
Thank you, @WilcoFiers. You make very valid points. I still struggle with this. Let me explain why I think the heading semantics need to be conveyed.
The HTML spec allows headings in the summary element but not the button element. Thus, in HTML speak, they are not the same thing.
The HTML AAM spec doesn't map <summary> directly to the ARIA button role. Instead, it bypasses the ARIA button role and directly maps it to roles in a11y APIs, preferring disclosure triangles over buttons where available. Thus, I hesitate applying the Children Presentational: True rule from ARIA 1.1.
If a given screen reader / browser pairing strips the heading semantics from <summary>, this will have a negative impact on the document outline and will create a disparity between visual and non-visual users.
I'd like to get another perspective on this. @scottaohara would you be okay with chiming in? If you agree that the heading semantics should not be stripped, would it be good to add this rule to the HTML AAM spec? I can open an issue there if needed.
It seems to me that in the following scenario, it is incorrect to expect the heading be announced:
According to ARIA in HTML, the implicit role of
<summary>
isbutton
. Then looking upbutton
in ARIA 1.1, it says it hasChildren Presentational: True
. The way I understand presentational children is that the ARIA spec forces the role of all descendants of such elements to bepresentation
. So putting anh2
in asummary
element should result in thath2
having its role forced to bepresentation
.I know quite a few browsers don't respect the presentational children requirement in ARIA. I personally think they are right on that, and that presentational children should be taken out of ARIA, but unless I'm misunderstanding something, what is called a fail in these tests is actually the expected bahavior.
The text was updated successfully, but these errors were encountered: