Problem/Motivation
According to the documentation, passing the attribute `'#open' => FALSE` to the Details element will output the <details>
as collapsed by default.
It's not, the Details element just checks if `#open` is specified, without checking the value.
Steps to reproduce
Generate a custom form and add a details element to it :
$form['more_details'] = [
'#type' => 'details',
'#title' => t('More details in here'),
'#open' => FALSE,
];
The "More details in here"<details>
element will be shown open.
Proposed resolution
Check the value of `#open`, if FALSE, do not make the element open.
Remaining tasks
I need to create a PR and run the tests to make sure it doesn't break anything.
API changes
None, if the documentation is right.
Data model changes
None.
Notes
I've filed this in the `render system` component, since it happens in lib/Drupal/Render/Element/Details.php, but I have no idea what I'm doing.