Skip to content

Commit

Permalink
[BUGFIX] Revert method signature change
Browse files Browse the repository at this point in the history
With #92682 the method `renderForeignRecordHeader` has been changed
which is bad for extensions which xclasses this method.
Put the new parameter into the data array to minimize the impact of the
accessibility change.

Related: #92682
Resolves: #93044
Releases: 10.4
Change-Id: I706bd62d539b9ba69c395e58c511f9f6cbe3e35f
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/67079
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Oliver Bartsch <bo@cedev.de>
Tested-by: Benni Mack <benni@typo3.org>
Reviewed-by: Oliver Bartsch <bo@cedev.de>
Reviewed-by: Benni Mack <benni@typo3.org>
  • Loading branch information
georgringer authored and bmack committed Dec 10, 2020
1 parent d4c4536 commit f8628a1
Showing 1 changed file with 4 additions and 5 deletions.
Expand Up @@ -217,15 +217,15 @@ public function render()

$ariaExpanded = $data['isInlineChildExpanded'] ? 'true' : 'false';
$ariaControls = htmlspecialchars($objectId . '_fields', ENT_QUOTES | ENT_HTML5);
$ariaAttributesString = 'aria-expanded="' . $ariaExpanded . '" aria-controls="' . $ariaControls . '"';
$data['ariaAttributesString'] = 'aria-expanded="' . $ariaExpanded . '" aria-controls="' . $ariaControls . '"';
$html = '
<div ' . GeneralUtility::implodeAttributes($containerAttributes, true) . '>
<div class="panel-heading" data-toggle="formengine-inline" id="' . htmlspecialchars($hashedObjectId, ENT_QUOTES | ENT_HTML5) . '_header" data-expandSingle="' . ($inlineConfig['appearance']['expandSingle'] ? 1 : 0) . '">
<div class="form-irre-header">
<div class="form-irre-header-cell form-irre-header-icon">
<span class="caret"></span>
</div>
' . $this->renderForeignRecordHeader($data, $ariaAttributesString) . '
' . $this->renderForeignRecordHeader($data) . '
</div>
</div>
<div class="panel-collapse" id="' . $ariaControls . '">' . $html . $hiddenFieldHtml . $combinationHtml . '</div>
Expand Down Expand Up @@ -328,10 +328,9 @@ protected function renderCombinationChild(array $data, $appendFormFieldNames)
* Later on the command-icons are inserted here.
*
* @param array $data Current data
* @param string $ariaAttributesString HTML aria attributes for the collapse button
* @return string The HTML code of the header
*/
protected function renderForeignRecordHeader(array $data, string $ariaAttributesString)
protected function renderForeignRecordHeader(array $data)
{
$languageService = $this->getLanguageService();
$inlineConfig = $data['inlineParentConfig'];
Expand Down Expand Up @@ -405,7 +404,7 @@ protected function renderForeignRecordHeader(array $data, string $ariaAttributes
} else {
$mediaContainer = '<div class="form-irre-header-icon" id="' . $objectId . '_iconcontainer">' . $iconImg . '</div>';
}
$header = '<button class="form-irre-header-cell form-irre-header-button" ' . $ariaAttributesString . '>' .
$header = '<button class="form-irre-header-cell form-irre-header-button" ' . $data['ariaAttributesString'] . '>' .
$mediaContainer .
'<div class="form-irre-header-body">' . $label . '</div>' .
'</button>' .
Expand Down

0 comments on commit f8628a1

Please sign in to comment.