Bug 244984 - AX: Text fields within summary element can cause unexpected open/close behavior
Summary: AX: Text fields within summary element can cause unexpected open/close behavior
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks: 252223
  Show dependency treegraph
 
Reported: 2022-09-09 09:15 PDT by Scott
Modified: 2023-09-14 01:21 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.