Add hidden accessible form input labels

This commit is contained in:
Michael Vickers 2020-10-02 21:04:11 +01:00 committed by Frédéric Guillot
parent 8308189333
commit c3aec26877
2 changed files with 3 additions and 1 deletions

View File

@ -42,7 +42,8 @@ class TaskHelper extends Base
public function renderTitleField(array $values, array $errors)
{
return $this->helper->form->text(
$html = $this->helper->form->label(t('Title'), 'title', ['class="ui-helper-hidden-accessible"']);
$html .= $this->helper->form->text(
'title',
$values,
$errors,

View File

@ -14,6 +14,7 @@
<h3><?= t('Upload my avatar image') ?></h3>
<form method="post" enctype="multipart/form-data" action="<?= $this->url->href('AvatarFileController', 'upload', array('user_id' => $user['id']), true) ?>">
<?= $this->form->label(t('Avatar'), 'avatar', ['class="ui-helper-hidden-accessible"']) ?>
<?= $this->form->file('avatar') ?>
<div class="form-actions">