a11y: add title attribute to asterisk marking required fields (#34736)
This commit is contained in:
parent
41515156ce
commit
4e6f1778d2
|
@ -99,7 +99,8 @@ def is_prefilled(self):
|
|||
def render_title(self, title):
|
||||
if title:
|
||||
if self.required:
|
||||
title += htmltext('<span class="required">*</span>')
|
||||
title += htmltext('<span title="%s" class="required">*</span>') % _(
|
||||
'This field is required.')
|
||||
return htmltext('<div class="title"><label for="form_%s">%s</label></div>') % (
|
||||
self.name, title)
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue