@fluid-topics/ft-reader-toc 1.2.58 → 1.2.60

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8,6 +8,7 @@ import { html, nothing } from "lit";
8
8
  import { repeat } from "lit/directives/repeat.js";
9
9
  import { classMap } from "lit/directives/class-map.js";
10
10
  import { styleMap } from "lit/directives/style-map.js";
11
+ import { ifDefined } from "lit/directives/if-defined.js";
11
12
  import { property, state } from "lit/decorators.js";
12
13
  import { hasChanged, redux, scrollHelper } from "@fluid-topics/ft-wc-utils";
13
14
  import { FtReaderComponent, } from "@fluid-topics/ft-reader-context/build/registration";
@@ -119,7 +120,8 @@ class FtReaderToc extends withI18n(FtReaderComponent) {
119
120
  "padding-left": `calc( ${FtReaderTocCssVariables.tabulationSize} * ${tabNumber} + 4px)` // +4px for padding before button
120
121
  };
121
122
  return html `
122
- <div class="ft-reader-toc--node ${isHighlighted ? "ft-reader-toc--node-highlighted" : ""}">
123
+ <div class="ft-reader-toc--node ${isHighlighted ? "ft-reader-toc--node-highlighted" : ""}"
124
+ aria-current="${ifDefined(isHighlighted ? "true" : undefined)}">
123
125
  <div class="ft-reader-toc--link-container" data-depth="${node.depth}" style=${styleMap(styles)}>
124
126
  ${this.nodesToExpandExist && !this.expanded ? html `
125
127
  <div class="ft-reader-toc--toggle-container">