Generated with the help of an LLM.
Problem/Motivation
We discovered an issue with the right/down icon toggles not updating properly with a form's advanced features toggle after upgrading from Drupal 10 to 11. The proposed code change corrected the issue.
The file at issue is core/misc/details-aria.js . With Drupal 11, this line:
const open =
$(event.currentTarget.parentNode).attr('open') === 'open'
? 'false'
: 'true';always sets "open" to true when opening and closing a drop down box. This caused a open/close icon not to update properly. This worked previously prior to upgrading from Drupal 10 to 11.
Steps to reproduce
This is occurring in a custom module, not easily reproduceable.
Proposed resolution
With the help of AI it was suggested to change this code to:
const open = !$(event.currentTarget.parentNode).prop('open');
I can confirm this fix works in our environment.
Proposed resolution
Remaining tasks
User interface changes
Introduced terminology
API changes
Data model changes
Release notes snippet
| Comment | File | Size | Author |
|---|---|---|---|
| ai-response.txt | 483 bytes | cogliano |
Issue fork drupal-3644250
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3644250-.attropen-should-instead
changes, plain diff MR !18128
Comments
Comment #4
cogliano commentedComment #5
quietone commented@cogliano, Welcome to Drupal!
Issues for Drupal core should be targeted to the 'main' branch, our primary development branch. Changes are made on the main branch first, and are then back ported as needed according to the Core change policies. The version the problem was discovered on should be stated in the issue summary Problem/Motivation section. Thanks.
I am restoring the issue template so we have all the sections to track progress. Also removing the tag as this is already in the javascript component.