Skip to content

Commit 4dd8bae

Browse files
committed
fix: Do not override HTML attribute title if already set for Actions without a label
1 parent 0012cef commit 4dd8bae

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Factory/ActionFactory.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,9 +157,10 @@ private function processAction(string $pageName, ActionDto $actionDto, ?EntityDt
157157
private function processActionLabel(ActionDto $actionDto, ?EntityDto $entityDto, string $translationDomain, array $defaultTranslationParameters): void
158158
{
159159
$label = $actionDto->getLabel();
160+
$title = $actionDto->getHtmlAttributes()['title'] ?? '';
160161

161162
// FALSE means that action doesn't show a visible label in the interface
162-
if (false === $label) {
163+
if (false === $label && '' === trim($title)) {
163164
$actionDto->setHtmlAttribute('title', $actionDto->getName());
164165

165166
return;

0 commit comments

Comments
 (0)