Use aria-describedby to link notice and input again

https://www.w3.org/WAI/tutorials/forms/instructions/#using-aria-describedby
This commit is contained in:
simon lehericey 2019-11-20 20:47:36 +01:00
parent 84b125d272
commit bc85e9b7ec
3 changed files with 9 additions and 2 deletions

View file

@ -25,4 +25,10 @@ module ChampHelper
end
simple_format(auto_linked_text, {}, sanitize: false)
end
def describedby_id(champ)
if champ.description.present?
"desc-#{champ.type_de_champ.id}-#{champ.row}"
end
end
end