@eui/ecl 22.0.0-alpha.37 → 22.0.0-alpha.39

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.
@@ -11,8 +11,53 @@ when off-screen via IntersectionObserver.
11
11
  Uses Embla Carousel (via embla-carousel-angular) with the auto-scroll plugin
12
12
  to match the ECL vanilla implementation.
13
13
 
14
- The component clones projected slides internally to ensure the track is wide
15
- enough for seamless infinite scrolling (matching the vanilla ECL approach).
14
+ ## Why two lists (hidden source + generated track)
15
+
16
+ The consumer provides a plain, semantic list:
17
+
18
+ ```html
19
+ <ecl-slogan-ticker>
20
+ <ul eclSloganTickerList>
21
+ <li eclSloganTickerSlide>SLOGAN ONE</li>
22
+ <li eclSloganTickerSlide>SLOGAN TWO</li>
23
+ </ul>
24
+ </ecl-slogan-ticker>
25
+ ```
26
+
27
+ This authored `<ul eclSloganTickerList>` is NOT the list you see scrolling.
28
+ `EclSloganTickerListDirective` hides it with `display: none`, and it stays in
29
+ the light DOM as the single accessible source of truth. The component reads
30
+ the slide texts out of it via a `contentChildren` query (see `slides`) and
31
+ builds a SEPARATE, component-owned `<ul class="ecl-slogan-ticker__track">`
32
+ from the `trackSlides` signal. That generated track is what Embla animates.
33
+
34
+ Reasons for the split (rather than just scrolling the authored `<ul>`):
35
+
36
+ - Seamless infinite loop needs more content than the author gives. The track
37
+ must be several times wider than the viewport or the loop visibly jumps, so
38
+ `ensureEnoughContent()` measures the originals and appends CLONE sets until
39
+ the total width reaches `CLONE_MULTIPLIER` × the container width.
40
+ - Clones must not pollute accessibility. The authored list stays the one
41
+ accessible list; every generated clone is rendered with `aria-hidden` so a
42
+ screen reader announces each slogan once, not once per clone.
43
+ - You cannot meaningfully grow the authored `<ul>`. Its `<li>` children are
44
+ Angular-projected content that Angular owns; imperatively appending clone
45
+ `<li>` nodes into it fights change detection. Building our own track signal
46
+ and letting `@for` render it is clean and safe. `<li>` is also only valid
47
+ inside a list element, so the `<ul eclSloganTickerList>` wrapper keeps the
48
+ consumer's authored markup valid and self-contained.
49
+
50
+ This mirrors the vanilla ECL slogan ticker (hidden source list + measured,
51
+ cloned, auto-scrolling track).
52
+
53
+ ## Testing note
54
+
55
+ The visible track is only built after a real width measurement
56
+ (`offsetWidth`). Under jsdom every element reports a width of 0, so
57
+ `ensureEnoughContent()` bails early and the generated track stays empty. Unit
58
+ tests should therefore assert slide-driven behavior through its observable
59
+ effects (e.g. the play/pause controls appearing) rather than through the
60
+ generated track DOM.
16
61
 
17
62
 
18
63
  **Selector:** `ecl-slogan-ticker`
@@ -12,7 +12,7 @@
12
12
  - **href**: `string` -
13
13
  - **icon**: `string` -
14
14
  - **iconSet**: `EclIconSet` -
15
- - **isInverted**: `false` -
15
+ - **isInverted**: `boolean` -
16
16
  - **routerLink**: `string` -
17
17
  - **size**: `string` -
18
18
  - **target**: `string` -