Skip to content

Commit 98cd4bd

Browse files
authored
Remove trailing slashes from void elements (#3353)
* Remove trailing slashes from void elements * Revert SVG changes * more updates
1 parent 3e60882 commit 98cd4bd

61 files changed

Lines changed: 350 additions & 350 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/content/en/2020/http.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ This <a hreflang="en" href="https://github.com/andydavies/http2-prioritization-i
346346
<thead>
347347
<tr>
348348
<th>CDN</th>
349-
<th>Prioritize <br />correctly</th>
349+
<th>Prioritize <br>correctly</th>
350350
<th>Desktop</th>
351351
<th>Mobile</th>
352352
</tr>

src/content/en/2020/media.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ For example:
4343

4444
```html
4545
<img srcset="images/example_3x.jpg 3x, images/example_2x.jpg 2x"
46-
src="images/example.jpg" alt="..." />
46+
src="images/example.jpg" alt="...">
4747
```
4848

4949
Around 26.5% of all pages now include `srcset`
@@ -79,15 +79,15 @@ When providing the candidate list to the user agent, we have two mechanisms to a
7979

8080
```html
8181
<img srcset="images/example_3x.jpg 3x, images/example_2x.jpg 2x"
82-
src="images/example.jpg" alt="..." />
82+
src="images/example.jpg" alt="...">
8383
```
8484

8585
`w` descriptors describe the candidate's pixel width, along with a `sizes` attribute that is used to select the appropriate image.
8686

8787
```html
8888
<img srcset="images/example_small.jpg 600w, images/example_medium.jpg 1400w, images/example_large.jpg 2400w"
8989
sizes="100vw"
90-
src="images/example_fallback.jpg" alt="..." />
90+
src="images/example_fallback.jpg" alt="...">
9191
```
9292

9393
Both approaches enable the user agent to mathematically factor in the current device pixel ratio when assessing the most appropriate image candidate.
@@ -115,7 +115,7 @@ For example:
115115
```html
116116
<img sizes="(min-width: 640px) 50vw, 100vw"
117117
srcset="images/example_small.jpg 600w, images/example_medium.jpg 1400w, images/example_large.jpg 2400w"
118-
src="images/example_fallback.jpg" alt="..." />
118+
src="images/example_fallback.jpg" alt="...">
119119
```
120120

121121
{{ figure_markup(
@@ -154,8 +154,8 @@ While there are some services and image CDNs which can provide auto-format switc
154154

155155
```html
156156
<picture>
157-
<source type="image/webp" srcset="images/example.webp" />
158-
<img src="images/example.jpg" alt="..." />
157+
<source type="image/webp" srcset="images/example.webp">
158+
<img src="images/example.jpg" alt="...">
159159
</picture>
160160
```
161161

@@ -191,11 +191,11 @@ Here is an example of the markup syntax that could be used to offer multiple for
191191

192192
```html
193193
<picture>
194-
<source type="image/avif" srcset="images/example.avif" />
195-
<source type="image/webp" srcset="images/example.webp" />
196-
<source type="image/jp2" srcset="images/example.jp2" />
197-
<source type="image/vnd.ms-photo" srcset="images/example.jxr" />
198-
<img src="images/example.jpg" alt="Description" />
194+
<source type="image/avif" srcset="images/example.avif">
195+
<source type="image/webp" srcset="images/example.webp">
196+
<source type="image/jp2" srcset="images/example.jp2">
197+
<source type="image/vnd.ms-photo" srcset="images/example.jxr">
198+
<img src="images/example.jpg" alt="Description">
199199
</picture>
200200
```
201201

@@ -235,11 +235,11 @@ In this example, we are changing out the aspect ratio of the served media, from
235235
```html
236236
<picture>
237237
<source media="(max-width: 780px)"
238-
srcset="image/example_square.jpg 1x, image/example_square_2x.jpg 2x" />
238+
srcset="image/example_square.jpg 1x, image/example_square_2x.jpg 2x">
239239
<source media="(max-width: 1400px)"
240-
srcset="image/example_4_3_aspect.jpg 1x, image/example_4_3_aspect_2x.jpg 2x" />
241-
<source srcset="image/example_16_9_aspect.jpg 1x, image/example_16_9_aspect_2x.jpg 2x"/>
242-
<img src="image/example_fallback.jpg" alt="..." />
240+
srcset="image/example_4_3_aspect.jpg 1x, image/example_4_3_aspect_2x.jpg 2x">
241+
<source srcset="image/example_16_9_aspect.jpg 1x, image/example_16_9_aspect_2x.jpg 2x">
242+
<img src="image/example_fallback.jpg" alt="...">
243243
</picture>
244244
```
245245

@@ -267,7 +267,7 @@ Example syntax:
267267
media="(min-width: 960px) and (orientation: landscape)">
268268
<source srcset="images/example_tall.jpg"
269269
media="(min-width: 960px) and (orientation: portrait)">
270-
<img src="..." alt="..." />
270+
<img src="..." alt="...">
271271
</picture>
272272
```
273273

src/content/en/2021/accessibility.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -183,11 +183,11 @@ Before the introduction of HTML5, ARIA landmark roles were needed to accomplish
183183
<table>
184184
<thead>
185185
<tr>
186-
<th>HTML5 <br />element</th>
187-
<th>ARIA role <br />equivalent</th>
188-
<th>Pages with <br />element</th>
189-
<th>Pages with <br />role</th>
190-
<th>Pages with <br />element or role</th>
186+
<th>HTML5 <br>element</th>
187+
<th>ARIA role <br>equivalent</th>
188+
<th>Pages with <br>element</th>
189+
<th>Pages with <br>role</th>
190+
<th>Pages with <br>element or role</th>
191191
</tr>
192192
</thead>
193193
<tbody>

src/content/en/2021/security.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -974,7 +974,7 @@ When looking at the adoption of certain security features such as CSP and `X-Fra
974974
<tr>
975975
<td>Blogger (Blogs)</td>
976976
<td>
977-
X-Content-Type-Options (99.6%),<br/>
977+
X-Content-Type-Options (99.6%),<br>
978978
X-XSS-Protection (99.6%)
979979
</td>
980980
</tr>
@@ -986,7 +986,7 @@ When looking at the adoption of certain security features such as CSP and `X-Fra
986986
<td>Drupal (CMS)</td>
987987
<td>
988988
X-Content-Type-Options (77.9%),
989-
<br />
989+
<br>
990990
X-Frame-Options (83.1%)
991991
</td>
992992
</tr>
@@ -997,35 +997,35 @@ When looking at the adoption of certain security features such as CSP and `X-Fra
997997
<tr>
998998
<td>Shopify (E-commerce)</td>
999999
<td>
1000-
Content-Security-Policy (96.4%),<br/>
1001-
Expect-CT (95.5%),<br/>
1002-
Report-To (95.5%),<br/>
1003-
Strict-Transport-Security (98.2%),<br/>
1004-
X-Content-Type-Options (98.3%),<br/>
1005-
X-Frame-Options (95.2%),<br/>
1000+
Content-Security-Policy (96.4%),<br>
1001+
Expect-CT (95.5%),<br>
1002+
Report-To (95.5%),<br>
1003+
Strict-Transport-Security (98.2%),<br>
1004+
X-Content-Type-Options (98.3%),<br>
1005+
X-Frame-Options (95.2%),<br>
10061006
X-XSS-Protection (98.2%)
10071007
</td>
10081008
</tr>
10091009
<tr>
10101010
<td>Squarespace (CMS)</td>
10111011
<td>
1012-
Strict-Transport-Security (87.9%),<br/>
1012+
Strict-Transport-Security (87.9%),<br>
10131013
X-Content-Type-Options (98.7%)
10141014
</td>
10151015
</tr>
10161016
<tr>
10171017
<td>Sucuri (CDN)</td>
10181018
<td>
1019-
Content-Security-Policy (84.0%),<br/>
1020-
X-Content-Type-Options (88.8%),<br/>
1021-
X-Frame-Options (88.8%),<br/>
1019+
Content-Security-Policy (84.0%),<br>
1020+
X-Content-Type-Options (88.8%),<br>
1021+
X-Frame-Options (88.8%),<br>
10221022
X-XSS-Protection (88.7%)
10231023
</td>
10241024
</tr>
10251025
<tr>
10261026
<td>Wix (Blogs)</td>
10271027
<td>
1028-
Strict-Transport-Security (98.8%),<br/>
1028+
Strict-Transport-Security (98.8%),<br>
10291029
X-Content-Type-Options (99.4%)
10301030
</td>
10311031
</tr>

src/content/en/2022/accessibility.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -211,11 +211,11 @@ Landmarks help divide a web page into thematic regions that makes it easier for
211211
<table>
212212
<thead>
213213
<tr>
214-
<th>HTML5 <br />element</th>
215-
<th>ARIA role <br />equivalent</th>
216-
<th>Pages with <br /> element</th>
217-
<th>Pages with <br /> role</th>
218-
<th>Pages with <br /> element or role</th>
214+
<th>HTML5 <br>element</th>
215+
<th>ARIA role <br>equivalent</th>
216+
<th>Pages with <br> element</th>
217+
<th>Pages with <br> role</th>
218+
<th>Pages with <br> element or role</th>
219219
</tr>
220220
</thead>
221221
<tbody>

src/content/en/2022/http.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ With the challenges to HTTP/2 priorities, a new prioritization scheme was needed
113113
While most of the resource priorities are decided by the browser itself, developers can now also use the new <a hreflang="en" href="https://web.dev/priority-hints/">priority hints</a> to tweak the priority of a particular resource. Priority hints can be specified via the `fetchpriority` attribute in the HTML. For example, suppose that a website would like to prioritize a hero image, it can add `fetchpriority` to the image tag:
114114

115115
```html
116-
<img src="hero.png" fetchpriority="high" />
116+
<img src="hero.png" fetchpriority="high">
117117
```
118118

119119
Priority hints can be very effective in improving user experience. For example, <a hreflang="en" href="https://www.etsy.com/codeascraft/priority-hints-what-your-browser-doesnt-know-yet">Etsy conducted an experiment</a> and observed a 4% improvement in Largest Contentful Paint (LCP) on product listing pages that included priority hints for certain images.
@@ -158,7 +158,7 @@ Given the challenges to using HTTP/2 Push, and it's deprecation from Chrome, dev
158158
Developers can use Preload as one alternative to pre-emptively request a resource that will be used later in a page load. This is enabled by including[`<link rel="preload">`](https://developer.mozilla.org/docs/Web/HTML/Link_types/preload) in the `<head>` section of the HTML. For example:
159159

160160
```html
161-
<link rel="preload" href="/css/style.css" as="style" />
161+
<link rel="preload" href="/css/style.css" as="style">
162162
```
163163

164164
Or as a `Link` HTTP header:

src/content/en/2022/mobile-web.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ Pages that fail the audit generally have more than one failing link. The median
213213

214214
### Zooming and scaling
215215

216-
Mobile devices have become a big part of daily life for most people, and the expectation is that interaction with mobile web content should be quick and easy. How websites handle zooming and scaling can go a long way to improving interactions on mobile. There are different takes on this, and while most will agree that you need to set a proper initial scale in the viewport for mobile users (`&lt;meta name="viewport" content="width=device-width, initial-scale=1">`), there is not universal agreement about the second part of a viewport setting, which controls if you should or shouldn’t disable scaling and zooming (`…user-scalable=no" />` or perhaps `…user-scalable=yes" />`). Most authorities, <a hreflang="en" href="https://www.w3.org/WAI/standards-guidelines/act/rules/b4f0c3/proposed/">including the W3C</a>, suggest that restricting scaling and zooming can create a bad user experience and adversely impact accessibility, so it should be avoided. Settings for `minimum-scale` and `maximum-scale` can also be set, and these are often safer limits, if a developer believes that limits are needed.
216+
Mobile devices have become a big part of daily life for most people, and the expectation is that interaction with mobile web content should be quick and easy. How websites handle zooming and scaling can go a long way to improving interactions on mobile. There are different takes on this, and while most will agree that you need to set a proper initial scale in the viewport for mobile users (`&lt;meta name="viewport" content="width=device-width, initial-scale=1">`), there is not universal agreement about the second part of a viewport setting, which controls if you should or shouldn’t disable scaling and zooming (`…user-scalable=no">` or perhaps `…user-scalable=yes">`). Most authorities, <a hreflang="en" href="https://www.w3.org/WAI/standards-guidelines/act/rules/b4f0c3/proposed/">including the W3C</a>, suggest that restricting scaling and zooming can create a bad user experience and adversely impact accessibility, so it should be avoided. Settings for `minimum-scale` and `maximum-scale` can also be set, and these are often safer limits, if a developer believes that limits are needed.
217217

218218
Zooming can be a good workaround for a user who is visually impaired, or anyone who just doesn’t have their reading glasses handy when they need them. On the other hand, it can be hard to build sites that universally scale well on mobile. There are many different font size settings that would need to be accommodated, and getting it wrong can make the site much harder to interact with. This is why some designers prefer to prevent scaling and zooming, to ensure that the page renders in a highly predictable way that is not impacted by scaling and zooming. While this is true, disabling zooming and scaling impedes the usability of a mobile site, and thus, should be avoided for the sake of accessibility.
219219

src/content/en/2022/security.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1098,41 +1098,41 @@ Another factor that can strongly influence the adoption of certain security mech
10981098
<tr>
10991099
<td>Blogger</td>
11001100
<td>
1101-
<code>Content-Security-Policy</code> (99%),<br/>
1102-
<code>X-Content-Type-Options</code> (99%),<br/>
1103-
<code>X-Frame-Options</code> (99%),<br/>
1101+
<code>Content-Security-Policy</code> (99%),<br>
1102+
<code>X-Content-Type-Options</code> (99%),<br>
1103+
<code>X-Frame-Options</code> (99%),<br>
11041104
<code>X-XSS-Protection</code> (99%)
11051105
</td>
11061106
</tr>
11071107
<tr>
11081108
<td>Wix</td>
11091109
<td>
1110-
<code>Strict-Transport-Security</code> (99%),<br/>
1110+
<code>Strict-Transport-Security</code> (99%),<br>
11111111
<code>X-Content-Type-Options</code> (99%)
11121112
</td>
11131113
</tr>
11141114
<tr>
11151115
<td>Drupal</td>
11161116
<td>
1117-
<code>X-Content-Type-Options</code> (77%),<br/>
1117+
<code>X-Content-Type-Options</code> (77%),<br>
11181118
<code>X-Frame-Options</code> (77%)
11191119
</td>
11201120
</tr>
11211121
<tr>
11221122
<td>Squarespace</td>
11231123
<td>
1124-
<code>Strict-Transport-Security</code> (91%),<br/>
1124+
<code>Strict-Transport-Security</code> (91%),<br>
11251125
<code>X-Content-Type-Options</code> (98%)
11261126
</td>
11271127
</tr>
11281128
<tr>
11291129
<td>Google Sites</td>
11301130
<td>
1131-
<code>Content-Security-Policy</code> (96%),<br/>
1132-
<code>Cross-Origin-Opener-Policy</code> (96%),<br/>
1133-
<code>Referrer-Policy</code> (96%),<br/>
1134-
<code>X-Content-Type-Options</code> (97%),<br/>
1135-
<code>X-Frame-Options</code> (97%),<br/>
1131+
<code>Content-Security-Policy</code> (96%),<br>
1132+
<code>Cross-Origin-Opener-Policy</code> (96%),<br>
1133+
<code>Referrer-Policy</code> (96%),<br>
1134+
<code>X-Content-Type-Options</code> (97%),<br>
1135+
<code>X-Frame-Options</code> (97%),<br>
11361136
<code>X-XSS-Protection</code> (97%)
11371137
</td>
11381138
</tr>
@@ -1143,16 +1143,16 @@ Another factor that can strongly influence the adoption of certain security mech
11431143
<tr>
11441144
<td>Wagtail</td>
11451145
<td>
1146-
<code>X-Content-Type-Options</code> (51%),<br/>
1146+
<code>X-Content-Type-Options</code> (51%),<br>
11471147
<code>X-Frame-Options</code> (72%)
11481148
</td>
11491149
</tr>
11501150
<tr>
11511151
<td>Medium</td>
11521152
<td>
1153-
<code>Content-Security-Policy</code> (75%),<br/>
1154-
<code>Expect-CT</code> (83%),<br/>
1155-
<code>Strict-Transport-Security</code> (84%),<br/>
1153+
<code>Content-Security-Policy</code> (75%),<br>
1154+
<code>Expect-CT</code> (83%),<br>
1155+
<code>Strict-Transport-Security</code> (84%),<br>
11561156
<code>X-Content-Type-Options</code> (83%)
11571157
</td>
11581158
</tr>

src/content/es/2020/http.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ Este <a hreflang="en" href="https://github.com/andydavies/http2-prioritization-i
346346
<thead>
347347
<tr>
348348
<th>CDN</th>
349-
<th>Prioriza <br />correctamente</th>
349+
<th>Prioriza <br>correctamente</th>
350350
<th>Escritorio</th>
351351
<th>Móvil</th>
352352
</tr>

src/content/it/2020/http.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ Questa <a hreflang="en" href="https://github.com/andydavies/http2-prioritization
346346
<thead>
347347
<tr>
348348
<th>CDN</th>
349-
<th>Assegna la priorità <br />correttamente</th>
349+
<th>Assegna la priorità <br>correttamente</th>
350350
<th>Desktop</th>
351351
<th>Mobile</th>
352352
</tr>

0 commit comments

Comments
 (0)