You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
index2: show correct counter values when JS is disabled
The bottom "trusted by" counters held each animation's *starting*
value in the visible markup (0+, 0%, 7) and relied on JS to count them
to the real values. With JS disabled they showed those wrong start
values.
Put the correct final values (10+, 100%, 0) in the markup and carry the
animation start in a new data-count-from attribute. JS now reads that
attribute to set the start before animating, replacing the brittle
textContent === '7' check. Correct with and without JS, and under
prefers-reduced-motion.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: index2.html
+6-4Lines changed: 6 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -1125,9 +1125,9 @@ <h2>Trusted by sysadmins, hoarders and the merely paranoid.</h2>
1125
1125
<pclass="lead">Borg has protected production servers, research data and family photo
1126
1126
archives for a decade. It is boring, in the best possible way.</p>
1127
1127
<divclass="counters">
1128
-
<divclass="counter"><divclass="num"><spanaria-hidden="true"><spandata-count="10">0</span>+</span><spanclass="sr-only">10+</span></div><divclass="what">years of development</div></div>
<divclass="counter"><divclass="num"><spanaria-hidden="true"><spandata-count="0">7</span></span><spanclass="sr-only">0</span></div><divclass="what">trust required in your server</div></div>
1128
+
<divclass="counter"><divclass="num"><spanaria-hidden="true"><spandata-count="10"data-count-from="0">10</span>+</span><spanclass="sr-only">10+</span></div><divclass="what">years of development</div></div>
<divclass="counter"><divclass="num"><spanaria-hidden="true"><spandata-count="0"data-count-from="7">0</span></span><spanclass="sr-only">0</span></div><divclass="what">trust required in your server</div></div>
1131
1131
</div>
1132
1132
</section>
1133
1133
@@ -1508,7 +1508,9 @@ <h2>Trusted by sysadmins, hoarders and the merely paranoid.</h2>
0 commit comments