Skip to content
Snippets Groups Projects
Commit ed420643 authored by Viktor Holovachek's avatar Viktor Holovachek
Browse files

Issue #3248774 - Add Accessibility

parent 604629f3
No related branches found
No related tags found
1 merge request!10Issue #3248774 - Add Accessibility
Pipeline #100543 passed
......@@ -48,10 +48,10 @@
// As in Drupal 10: Remove jQuery dependency from the once feature
// @see: https://www.drupal.org/node/3158256
$(once('formtips', $descriptions, context)).each(function () {
var $formtip = $('<a class="formtip"></a>');
var $description = $(this);
var $item = $description.closest('.form-item');
var descriptionId = $description.attr('id');
var $formtip = $('<a class="formtip" aria-labelledby="' + descriptionId + '" href="javascript:void(0);" tabindex="0"></a>');
// If there is no description id, skip.
if (!descriptionId) {
......@@ -120,6 +120,8 @@
$item.addClass('formtips-item');
$description.toggleClass('formtips-show', false);
$description.attr('tabindex', '0');
$description.attr('role', 'tooltip');
$label.append($formtip);
if (formtip_settings.trigger_action === 'click') {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment