Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / modules / tour / src / Plugin / tour / tip / TipPluginText.php
index 268741a83d9bc0df10b8581b86adee9055b69e6d..b809a64ee418f78ca59fdbc71c882663fac39a5f 100644 (file)
@@ -39,6 +39,13 @@ class TipPluginText extends TipPluginBase implements ContainerFactoryPluginInter
    */
   protected $location;
 
+  /**
+   * Unique aria-id.
+   *
+   * @var string
+   */
+  protected $ariaId;
+
   /**
    * Constructs a \Drupal\tour\Plugin\tour\tip\TipPluginText object.
    *
@@ -70,11 +77,10 @@ class TipPluginText extends TipPluginBase implements ContainerFactoryPluginInter
    *   A unique id to be used to generate aria attributes.
    */
   public function getAriaId() {
-    static $id;
-    if (!isset($id)) {
-      $id = Html::getUniqueId($this->get('id'));
+    if (!$this->ariaId) {
+      $this->ariaId = Html::getUniqueId($this->get('id'));
     }
-    return $id;
+    return $this->ariaId;
   }
 
   /**