This commit is contained in:
Eloy Lafuente (stronk7) 2022-02-10 21:12:19 +01:00
commit 057a21e381

View File

@ -118,7 +118,12 @@ final class action {
);
$this->attributes['role'] = 'button';
$this->attributes['title'] = $this->attributes['aria-label'] = (string) $this->title;
// Ensure we have a title attribute set, if one wasn't already provided.
if (!array_key_exists('title', $this->attributes)) {
$this->attributes['title'] = (string) $this->title;
}
$this->attributes['aria-label'] = $this->attributes['title'];
if ($this->popup) {
$this->attributes['data-action'] = 'report-action-popup';