Skip to content
Snippets Groups Projects

Issue #3248774 - Add Accessibility

1 file
+ 3
1
Compare changes
  • Side-by-side
  • Inline
+ 3
1
@@ -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') {
Loading