Verified Commit 90d6e3ba authored by Lauri Timmanee's avatar Lauri Timmanee
Browse files

Issue #3443868 by Linh Le, YevKo: Add documentation to arrow-navigation.js

parent 0466b818
Loading
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
/**
 * @file
 * Keyboard navigation component.
 */

((Drupal, once, { focusable }) => {
  /**
   * Attaches the keyboard navigation functionality.
   *
   * @type {Drupal~behavior}
   *
   * @prop {Drupal~behaviorAttach} attach
   *   Attaches the behavior to the `.admin-toolbar` element.
   */
  Drupal.behaviors.keyboardNavigation = {
    attach: (context) => {
      once('keyboard-processed', '.admin-toolbar', context).forEach(