Skip to content
Snippets Groups Projects

re-rolled and tested the Patch.

Merged Prem Suthar requested to merge issue/flag-2901287:2901287-accessibility--focus into 8.x-4.x
1 file
+ 5
0
Compare changes
  • Side-by-side
  • Inline
@@ -4,6 +4,7 @@ namespace Drupal\flag\Controller;
use Drupal\Component\Utility\Html;
use Drupal\Core\Ajax\AjaxResponse;
use Drupal\Core\Ajax\InvokeCommand;
use Drupal\Core\Ajax\ReplaceCommand;
use Drupal\Core\DependencyInjection\ContainerInjectionInterface;
use Drupal\Core\Entity\EntityInterface;
@@ -158,6 +159,10 @@ class ActionLinkController implements ContainerInjectionInterface {
$replace = new ReplaceCommand($selector, $this->renderer->renderInIsolation($link));
$response->addCommand($replace);
// Put the focus back on the link.
$focus = new InvokeCommand($selector . '>a', 'focus');
$response->addCommand($focus);
// Push a message pulsing command onto the stack.
$pulse = new ActionLinkFlashCommand($selector, $message);
$response->addCommand($pulse);
Loading