Bug 244984

Summary: AX: Text fields within summary element can cause unexpected open/close behavior
Product: WebKit Reporter: Scott <scottaohara>
Component: AccessibilityAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: andresg_22, mike, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 252223    

Description Scott 2022-09-09 09:15:28 PDT
Steps to reproduce the problem:
1. Go to https://codepen.io/scottohara/pen/yLjOXdp
2. Move keyboard focus to the nested input element within the summary
3. Use the space key to add spaces to the text input field. Observe that this causes the details element to show/hide its content each time the space key is pressed.

Problem Description:
Including nested interactive elements within a summary can be problematic depending on the screen reader / browser combination.  But, with chromium/webkit browsers in particular an extra unintended behavior occurs if a text field (input type=text or textarea) is a descendant of the summary element. If keyboard focus is moved to this nested text field and the space key is pressed, it will cause the state of the details element to toggle between open|closed.

The codepen provided in the repro steps demonstrates this behavior.

This behavior does not occur in Firefox. It does presently occur in Chrome. Chrome issue - https://bugs.chromium.org/p/chromium/issues/detail?id=1361983
Comment 1 Radar WebKit Bug Importer 2022-09-09 09:15:38 PDT
<rdar://problem/99747154>
Comment 2 sideshowbarker 2023-09-06 02:09:45 PDT
Can you reproduce this in Safari Technology Preview 177?

I’m able to reproduce it in Safari 16.2, but not in Safari Technology Preview 177, nor in the Safari 17 developer beta.

So it seems like this might have been fixed in the sources.
Comment 3 sideshowbarker 2023-09-14 01:21:44 PDT
This seems to have been fixed in the sources, and will ship in Safari 17.