Bug 33103: Fix accessibility issues

* Add spaces
* Add 'Add' and 'Remove' in addition of the icons
* Do not submit the form when enter is hit
* Fix translatability

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Jonathan Druart 2023-04-11 09:53:15 +02:00 committed by Tomas Cohen Arazi
parent 0e666d6c2a
commit 268a044222
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F

View file

@ -492,11 +492,11 @@
let input = $('<input type="hidden" name="alias" />');
input.val(a.alias);
n.append(input);
n.append(`<a onclick="remove_alias(${i});"><i class="fa fa-trash" aria-hidden="true"></i></a>`);
n.append(` <a style="cursor: pointer;" onclick="remove_alias(${i});"><i class="fa fa-trash" aria-hidden="true"></i> ` + _("Remove") + '</a>');
nodes.append(n);
});
nodes.append("<input id='new_alias' type='text' />");
nodes.append(`<a onclick="add_alias();"><i class="fa fa-plus" aria-hidden="true"></i></a>`);
nodes.append("<input id='new_alias' type='text' class='noEnterSubmit' />");
nodes.append(' <a style="cursor: pointer;" onclick="add_alias();"><i class="fa fa-plus" aria-hidden="true"></i> ' + _("Add") + '</a>');
$("#aliases").html(nodes.html());
}