From 0cfc6162c53bcc0233c962a1843c6aec4a0f86f9 Mon Sep 17 00:00:00 2001 From: Michael Vickers Date: Sat, 3 Oct 2020 13:52:05 +0100 Subject: [PATCH] Add aria-label to modal link with title attribute --- app/Helper/ModalHelper.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Helper/ModalHelper.php b/app/Helper/ModalHelper.php index 4cff1ffaf..b528f4ac8 100644 --- a/app/Helper/ModalHelper.php +++ b/app/Helper/ModalHelper.php @@ -49,7 +49,8 @@ class ModalHelper extends Base public function medium($icon, $label, $controller, $action, array $params = array(), $title = '') { - $html = ''.$label; + $ariaLabel = (empty($title) ? 'aria-hidden="true"' : 'role="img" aria-label="'.$title.'"'); + $html = ''.$label; return $this->helper->url->link($html, $controller, $action, $params, false, 'js-modal-medium', $title); }