Bug 230408 - AX: iOS VoiceOver doesn't correctly announce expanded state of details element if summary has display: inline-block
Summary: AX: iOS VoiceOver doesn't correctly announce expanded state of details elemen...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: Safari 14
Hardware: iPhone / iPad iOS 14
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks: 252223
  Show dependency treegraph
 
Reported: 2021-09-17 08:54 PDT by Oliver Byford
Modified: 2023-10-25 15:52 PDT (History)
3 users (show)

See Also:


Attachments
Test case, with alternative versions for comparison (715 bytes, text/html)
2021-09-17 08:58 PDT, Oliver Byford
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Byford 2021-09-17 08:54:50 PDT
Given a details element where the summary is set to `display: inline-block`:

```
<details>
  <summary style="display: inline-block;">Summary</summary>
  <p>Content</p>
</details>
```

1. Activate VoiceOver on iOS
2. Swipe to 'Summary'
3. Double tap to expand the details element
4. Swipe forwards to the expanded content
5. Swipe back to 'Summary'

Expected result:
In step 3, after expanding the element , VO should announce 'Summary, expanded'
In step 5, when swiping back to the summary, VO should announce 'Summary, expanded'

Actual result:
In step 3, after expanding the element , VO announces 'Summary, collapsed'
In step 5, when swiping back to the summary, VO announces 'Summary'

This issue does not occur if the summary element is set to `display: inline-block` or the user-agent default `display: list-item`.
Comment 1 Radar WebKit Bug Importer 2021-09-17 08:55:03 PDT
<rdar://problem/83242798>
Comment 2 Oliver Byford 2021-09-17 08:58:46 PDT
Created attachment 438478 [details]
Test case, with alternative versions for comparison

Adding an example test case, with versions using `display: block` and the user-agent default `display` for comparison.
Comment 3 Curtis Wilcox 2023-10-25 15:52:10 PDT
Using iOS 17.1 with the attached test case, after double tapping the summary with inline-block, VoiceOver (VO) repeats the summary's name but doesn't announce the state ("expanded"). After swiping forward and then back, VO again announces only the name but not the state.

After double-tapping the summary with inline-block again, VO does announce both the name and the collapsed state and does so again if I swipe forward and then back.

VO always announces the name and state for the default `display` and `display: block` versions (before iOS 17.1, VO wasn't announcing *any* states for details/summary elements).