diff --git a/components/com_contact/src/View/Contact/HtmlView.php b/components/com_contact/src/View/Contact/HtmlView.php index ed8bff973ca2a..033407264889e 100644 --- a/components/com_contact/src/View/Contact/HtmlView.php +++ b/components/com_contact/src/View/Contact/HtmlView.php @@ -240,79 +240,65 @@ public function display($tpl = null) switch ($item->params->get('contact_icons')) { case 1: // Text - $item->params->set('marker_address', Text::_('COM_CONTACT_ADDRESS') . ': '); - $item->params->set('marker_email', Text::_('JGLOBAL_EMAIL') . ': '); - $item->params->set('marker_telephone', Text::_('COM_CONTACT_TELEPHONE') . ': '); - $item->params->set('marker_fax', Text::_('COM_CONTACT_FAX') . ': '); - $item->params->set('marker_mobile', Text::_('COM_CONTACT_MOBILE') . ': '); - $item->params->set('marker_webpage', Text::_('COM_CONTACT_WEBPAGE') . ': '); - $item->params->set('marker_misc', Text::_('COM_CONTACT_OTHER_INFORMATION') . ': '); $item->params->set('marker_class', 'jicons-text'); break; case 2: // None - $item->params->set('marker_address', ''); - $item->params->set('marker_email', ''); - $item->params->set('marker_telephone', ''); - $item->params->set('marker_mobile', ''); - $item->params->set('marker_fax', ''); - $item->params->set('marker_misc', ''); - $item->params->set('marker_webpage', ''); - $item->params->set('marker_class', 'jicons-none'); + $item->params->set('marker_class', 'jicons-none visually-hidden'); break; default: if ($item->params->get('icon_address')) { $item->params->set( 'marker_address', - HTMLHelper::_('image', $item->params->get('icon_address', ''), Text::_('COM_CONTACT_ADDRESS'), false) + HTMLHelper::_('image', $item->params->get('icon_address', ''), '', false) ); } if ($item->params->get('icon_email')) { $item->params->set( 'marker_email', - HTMLHelper::_('image', $item->params->get('icon_email', ''), Text::_('COM_CONTACT_EMAIL'), false) + HTMLHelper::_('image', $item->params->get('icon_email', ''), '', false) ); } if ($item->params->get('icon_telephone')) { $item->params->set( 'marker_telephone', - HTMLHelper::_('image', $item->params->get('icon_telephone', ''), Text::_('COM_CONTACT_TELEPHONE'), false) + HTMLHelper::_('image', $item->params->get('icon_telephone', ''), '', false) ); } - if ($item->params->get('icon_fax', '')) { + if ($item->params->get('icon_fax')) { $item->params->set( 'marker_fax', - HTMLHelper::_('image', $item->params->get('icon_fax', ''), Text::_('COM_CONTACT_FAX'), false) + HTMLHelper::_('image', $item->params->get('icon_fax', ''), '', false) ); } if ($item->params->get('icon_misc')) { $item->params->set( 'marker_misc', - HTMLHelper::_('image', $item->params->get('icon_misc', ''), Text::_('COM_CONTACT_OTHER_INFORMATION'), false) + HTMLHelper::_('image', $item->params->get('icon_misc', ''), '', false) ); } if ($item->params->get('icon_mobile')) { $item->params->set( 'marker_mobile', - HTMLHelper::_('image', $item->params->get('icon_mobile', ''), Text::_('COM_CONTACT_MOBILE'), false) + HTMLHelper::_('image', $item->params->get('icon_mobile', ''), '', false) ); } if ($item->params->get('icon_webpage')) { $item->params->set( 'marker_webpage', - HTMLHelper::_('image', $item->params->get('icon_webpage', ''), Text::_('COM_CONTACT_WEBPAGE'), false) + HTMLHelper::_('image', $item->params->get('icon_webpage', ''), '', false) ); } - $item->params->set('marker_class', 'jicons-icons'); + $item->params->set('marker_class', 'jicons-icons visually-hidden'); break; } diff --git a/components/com_contact/tmpl/contact/default.php b/components/com_contact/tmpl/contact/default.php index a67aeaa16de2b..c05501baf82ed 100644 --- a/components/com_contact/tmpl/contact/default.php +++ b/components/com_contact/tmpl/contact/default.php @@ -25,7 +25,7 @@ $canEdit = $canDo->get('core.edit') || ($canDo->get('core.edit.own') && $this->item->created_by === $this->getCurrentUser()->id); $htag = $tparams->get('show_page_heading') ? 'h2' : 'h1'; $htag2 = ($tparams->get('show_page_heading') && $tparams->get('show_name')) ? 'h3' : 'h2'; - +$icon = $this->params->get('contact_icons') == 0; ?>