Skip to content

Commit e1bf21f

Browse files
authored
Fix accessible ebooks (#4389)
* Fix accessibly ebooks * Fixes * Fix more markup * Fix markup * More robust parsing * More fixes * More markup fixes * Fix link * Another fix * Update comment * Upgrade Prince
1 parent 14b4b36 commit e1bf21f

File tree

23 files changed

+125
-96
lines changed

23 files changed

+125
-96
lines changed

.github/workflows/predeploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ name: Predeploy script
1414

1515
env:
1616
# Update periodically from https://www.princexml.com/latest/
17-
PRINCE_PACKAGE: 'prince_20250207-1_ubuntu24.04_amd64.deb'
17+
PRINCE_PACKAGE: 'prince_16.1-1_ubuntu24.04_arm64.deb'
1818

1919
on:
2020
workflow_dispatch:

src/content/en/2021/caching.md

Lines changed: 37 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -119,40 +119,43 @@ When using the `Cache-Control` header, you specify one or more _directives_—pr
119119

120120
Below is a table showing the most common `Cache-Control` directives:
121121

122-
<table>
123-
<tr>
124-
<th>Directive</th>
125-
<th>Description</th>
126-
</tr>
127-
<tr>
128-
<td><code class="no-wrap">max-age</code></td>
129-
<td>Indicates the number of seconds that a resource can be cached for relative to the current time. For example, <code>max-age=86400</code>.</td>
130-
</tr>
131-
<tr>
132-
<td><code class="no-wrap">public</code></td>
133-
<td>Indicates that any cache can store the response, including the browser and the CDN. This is assumed by default.</td>
134-
</tr>
135-
<tr>
136-
<td><code class="no-wrap">no-cache</code></td>
137-
<td>A cached resource must be revalidated before its use, via a conditional request, even if it is not marked as stale.</td>
138-
</tr>
139-
<tr>
140-
<td><code class="no-wrap">must-revalidate</code></td>
141-
<td>A stale cached entry must be revalidated before its use, via a conditional request.</td>
142-
</tr>
143-
<tr>
144-
<td><code class="no-wrap">no-store</code></td>
145-
<td>Indicates that the response must not be cached.</td>
146-
</tr>
147-
<tr>
148-
<td><code class="no-wrap">private</code></td>
149-
<td>The response is intended for a specific user and should not be stored by shared caches such as CDNs.</td>
150-
</tr>
151-
<tr>
152-
<td><code class="no-wrap">immutable</code></td>
153-
<td>Indicates that the cached entry will never change during its TTL, and that revalidation is not necessary.</td>
154-
</tr>
155-
</table>
122+
<figure>
123+
<table>
124+
<tr>
125+
<th>Directive</th>
126+
<th>Description</th>
127+
</tr>
128+
<tr>
129+
<td><code class="no-wrap">max-age</code></td>
130+
<td>Indicates the number of seconds that a resource can be cached for relative to the current time. For example, <code>max-age=86400</code>.</td>
131+
</tr>
132+
<tr>
133+
<td><code class="no-wrap">public</code></td>
134+
<td>Indicates that any cache can store the response, including the browser and the CDN. This is assumed by default.</td>
135+
</tr>
136+
<tr>
137+
<td><code class="no-wrap">no-cache</code></td>
138+
<td>A cached resource must be revalidated before its use, via a conditional request, even if it is not marked as stale.</td>
139+
</tr>
140+
<tr>
141+
<td><code class="no-wrap">must-revalidate</code></td>
142+
<td>A stale cached entry must be revalidated before its use, via a conditional request.</td>
143+
</tr>
144+
<tr>
145+
<td><code class="no-wrap">no-store</code></td>
146+
<td>Indicates that the response must not be cached.</td>
147+
</tr>
148+
<tr>
149+
<td><code class="no-wrap">private</code></td>
150+
<td>The response is intended for a specific user and should not be stored by shared caches such as CDNs.</td>
151+
</tr>
152+
<tr>
153+
<td><code class="no-wrap">immutable</code></td>
154+
<td>Indicates that the cached entry will never change during its TTL, and that revalidation is not necessary.</td>
155+
</tr>
156+
</table>
157+
<figcaption>{{ figure_link(caption="<code>Cache-Control</code> directives.") }}</figcaption>
158+
</figure>
156159

157160
{{ figure_markup(
158161
image="cache-control-directives.png",

src/content/en/2021/ecommerce.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ As we continue down the leaderboard, there are few surprises in this space. Quit
181181

182182
It is hard to compare the total number of ecommerce sites found across years. As described earlier, this is because the ability to detect whether a site is ecommerce has been improved substantially. In part through the use of secondary signals such as Google Analytics Enhanced Ecommerce integration.
183183

184-
So instead, [last year's report](./../2020/ecommerce#covid-19-impact-on-ecommerce) focused on a small number of platforms to see how their use had changed. The early signs in the first half of 2020 were that there were measurable and notable increases in Shopify and WooCommerce use. The growth was in the region of 20% between January 2020 and July 2020 while other platforms like Magento did not see the same growth. These platforms are known for their low entry costs and ease of use, while Magento is not.
184+
So instead, [last year's report](../2020/ecommerce#covid-19-impact-on-ecommerce) focused on a small number of platforms to see how their use had changed. The early signs in the first half of 2020 were that there were measurable and notable increases in Shopify and WooCommerce use. The growth was in the region of 20% between January 2020 and July 2020 while other platforms like Magento did not see the same growth. These platforms are known for their low entry costs and ease of use, while Magento is not.
185185

186186
Fast-forward to 2021, people and businesses around the world have continued to adapt. Ecommerce in the US in 2020 saw revenue growth of 32.4% <a hreflang="en" href="https://www.digitalcommerce360.com/article/coronavirus-impact-online-retail/">according to a report</a> by the Commerce Department. In the UK, the <a hreflang="en" href="https://internetretailing.net/industry/industry/ecommerce-grew-by-46-in-2020---its-strongest-growth-for-more-than-a-decade--but-overall-retail-sales-fell-by-a-record-19-ons-22603">Office of National Statistics reported</a> a 46% growth.
187187

src/content/en/2021/security.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ We see that 58.5% of all first-party cookies with a `SameSite` attribute have th
303303

304304
Cookie prefixes `__Host-` and `__Secure-` help mitigate attacks to override the session cookie information for a <a hreflang="en" href="https://owasp.org/www-community/attacks/Session_fixation">session fixation attack</a>. `__Host-` helps in domain locking a cookie by requiring the cookie to also have `Secure` attribute, `Path` attribute set to `/`, not have `Domain` attribute and to be sent from a secure origin. `__Secure-` on the other hand requires the cookie to only have `Secure` attribute and to be sent from a secure origin.
305305

306-
<figure>
306+
<figure>
307307
<table>
308308
<thead>
309309
<tr>

src/content/en/2022/performance.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -676,7 +676,7 @@ There are other, more direct ways site owners can improve their CLS. Setting `he
676676

677677
Effectively all websites have "good" FID for desktop users, and this trend has held firm over the years. Mobile FID performance is also exceptionally fast, with 92% of websites having "good" FID, a slight improvement over last year.
678678

679-
While it's great that so many websites have good FID experiences, developers need to be careful not to become too complacent. Google has been <a hreflang="en" href="https://web.dev/better-responsiveness-metric/">experimenting with a new responsiveness metric</a> that could end up replacing FID, which is especially important because sites tend to perform much worse on [this new metric](./#interaction-to-next-paint-inp) than FID.
679+
While it's great that so many websites have good FID experiences, developers need to be careful not to become too complacent. Google has been <a hreflang="en" href="https://web.dev/better-responsiveness-metric/">experimenting with a new responsiveness metric</a> that could end up replacing FID, which is especially important because sites tend to perform much worse on [this new metric](#interaction-to-next-paint-inp) than FID.
680680

681681
### FID metadata and best practices
682682

src/content/en/2024/accessibility.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ Tables present data and relationships using two dimensions. For accessibility, t
371371
<th scope="colgroup" colspan=2>All Sites</th>
372372
</tr>
373373
<tr>
374-
<th></th>
374+
<td></td>
375375
<th scope="col">desktop</th>
376376
<th scope="col">mobile</th>
377377
<th scope="col">desktop</th>

src/content/en/2024/security.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1425,7 +1425,7 @@ For CMS's that can be easily self-hosted such as Plone or Wagtail, it is more di
14251425
Large websites often have a high number of visitors and registered users, of which they might store highly sensitive data. This means they likely attract more attackers and are thus more prone to targeted attacks. Additionally, when an attack succeeds, these websites could be fined or sued, costing them money and/or reputational damage. Therefore, it can be expected that popular websites invest more in their security to secure their users.
14261426

14271427
{{ figure_markup(
1428-
image="security-headeers-by-rank.png",
1428+
image="security-headers-by-rank.png",
14291429
caption="Security header adoption by website rank according to the April 2024 CrUX.",
14301430
description="Bar chart showing in top 1,000 sites, 64% have XFO, 60% have HSTS and 56% have X-Content-Type-Options headers. In top 10,000, 54% have XFO, 46% have HSTS and 54% have X-Content-Type-Options headers. In top 100,000, 51% have XFO, 42% have HSTS and 50% have X-Content-Type-Options headers. In top 1,000,000, 45% have XFO, 36% have HSTS and 47% have X-Content-Type-Options headers. Among all sites, 29% have XFO, 31% have HSTS and 43% have X-Content-Type-Options.",
14311431
chart_url="https://docs.google.com/spreadsheets/d/e/2PACX-1vTxTTMlFFSMT3mZgw2awA0wl3F68gzU1OLuyMaZXscSFq-Pa5ev_qTXx8ZaGEOl_ox_aHsraAGMXZ9Y/pubchart?oid=256464807&format=interactive",

src/content/en/2024/sustainability.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ doi: 10.5281/zenodo.14065377
2727

2828
## Introduction
2929

30-
In the current chapter, we will rely as much as possible on [the 2022 Sustainability chapter](./../2022/sustainability). If you haven't yet, you should read it right now. Yes, recycling/reusing is a major part of sustainability.
30+
In the current chapter, we will rely as much as possible on [the 2022 Sustainability chapter](../2022/sustainability). If you haven't yet, you should read it right now. Yes, recycling/reusing is a major part of sustainability.
3131

3232
Since the 2022 Almanac, the field of digital sustainability has advanced considerably. That said, it is very much in its infancy, as this is a complex problem. We cannot know, with absolute certainty, what the full effects of our digital lives are on our physical planet. What we can be confident in is that the full impacts are bigger than generally accounted for. Water, land, rare minerals, and electricity are all consumed by our "clean" digital interfaces, and toxic waste is often produced.
3333

@@ -630,7 +630,7 @@ Automatically preloading videos is a concern for web sustainability. This practi
630630
sql_file="video_preload_values.sql"
631631
) }}
632632

633-
Comparing the usage of the preload attribute between [2022](./../2022/sustainability) and 2024, we observe some changes. The percentage of websites not using preload has slightly decreased, from 58% to 55% on desktop and from 60% to 56% on mobile. This shift suggests a small increase in the use of preload attributes, which could have implications for sustainability.
633+
Comparing the usage of the preload attribute between [2022](../2022/sustainability) and 2024, we observe some changes. The percentage of websites not using preload has slightly decreased, from 58% to 55% on desktop and from 60% to 56% on mobile. This shift suggests a small increase in the use of preload attributes, which could have implications for sustainability.
634634

635635
It's important to remember that the preload attribute only has three valid values: none, auto, and metadata (default). Using the preload attribute with no value or an incorrect value may be interpreted as 'metadata', which can still involve loading up to 3% of the video to retrieve metadata. From a sustainability standpoint, 'none' remains the most environmentally friendly option.
636636

@@ -653,7 +653,7 @@ It's important to note that the autoplay attribute can override preload settings
653653
sql_file="video_autoplay_values.sql"
654654
) }}
655655

656-
Comparing the usage of autoplay between [2022](./../2022/sustainability) and 2024, we see some notable changes. The percentage of websites explicitly not using autoplay has decreased, from 53% to 45% on desktop and from 53% to 45% on mobile. This could be a concern for sustainability efforts. Also, we notice a slight increase for websites using an empty value for this attribute, which also triggers autoplay (and is bad for sustainability).
656+
Comparing the usage of autoplay between [2022](../2022/sustainability) and 2024, we see some notable changes. The percentage of websites explicitly not using autoplay has decreased, from 53% to 45% on desktop and from 53% to 45% on mobile. This could be a concern for sustainability efforts. Also, we notice a slight increase for websites using an empty value for this attribute, which also triggers autoplay (and is bad for sustainability).
657657

658658
It's crucial to remember that autoplay is a Boolean attribute, meaning its presence, even with an empty value, triggers autoplay behavior. The combined percentage of explicit autoplay usage (including `autoplay`, `TRUE` and other values) has remained relatively stable, around 8% for both desktop and mobile.
659659

@@ -888,7 +888,7 @@ For further information, refer to:
888888
sql_file="stylesheet_count.sql"
889889
) }}
890890

891-
When we compare this year's data to [2022 data](./../2022/sustainability) we can see the following:
891+
When we compare this year's data to [2022 data](../2022/sustainability) we can see the following:
892892
1. Increase in inline stylesheet usage:
893893
- Desktop: from 25% in 2022 to 31% in 2024.
894894
- Mobile: from 25% in 2022 to 32% in 2024.

src/content/en/2025/pwa.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,8 @@ Let's examine how individual members rate in the totality of manifest files scan
161161
<thead>
162162
<tr>
163163
<th>Manifest field</th>
164-
<th class="numeric">Sites</th>
164+
<th>Desktop</th>
165+
<th>Mobile</th>
165166
</tr>
166167
</thead>
167168
<tbody>

src/content/ja/2019/cdn.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ CDNプロバイダーには、汎用CDNと目的別CDNの2つのカテゴリが
332332
</tr>
333333
</tbody>
334334
</table>
335-
<figcaption>表5のデータを示すツリーマップグラフ。</figcaption>
335+
<figcaption>{{ figure_link(caption="表5のデータを示すツリーマップグラフ。") }}</figcaption>
336336
</figure>
337337

338338
上位CDNプロバイダーの構成は、サードパーティのリソースに対して劇的に変化します。サードパーティのリソースをホストするCDNが頻繁に監視されるだけでなく、Facebook、Twitter、Googleなどの目的に合ったCDNプロバイダーも増加しています。

0 commit comments

Comments
 (0)