Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,20 @@
# Issue templates in .github
/.github/ISSUE_TEMPLATE/ff-project-issue.md @mdn/content-team

# VSCode configuration
/.vscode/ @mdn/engineering
/.vscode/dictionaries/ @mdn/content-team
/.vscode/cspell.json @mdn/content-team

# Root directory
/* @mdn/engineering
# Markdown files in root directory
/*.md @mdn/content-team
# Filecheck
# Scripts and Tests
/scripts @mdn/engineering
/tests @mdn/engineering

# These are @mdn-bot because the auto-merge GHA workflow uses the PAT of this account.
# If another reviewer is specified, update the PAT token or auto-merge will cease to be automatic.
/package.json @mdn-bot
/yarn.lock @mdn-bot
/package.json @mdn/engineering @mdn-bot
/yarn.lock @mdn/engineering @mdn-bot
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ We are going to get you to solve this challenge in your local development enviro
2. Inside the folder, create an `index.html` file and paste the following content into it:

```html
<!DOCTYPE html>
<!doctype html>
<html lang="en-US">
<head>
<meta charset="utf-8" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ We are going to get you to solve this challenge in your local development enviro
2. Inside the folder, create an `index.html` file and paste the following content into it:

```html
<!DOCTYPE html>
<!doctype html>
<html lang="en-US">
<head>
<meta charset="utf-8" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@ It doesn't take too much effort to get our HTML looking like a fully-featured to
<button
type="button"
class="destroy"
title="Remove this todo"></button>
title="Remove this todo"
aria-label="Remove this todo"></button>
</div>

<input autofocus class="edit" value="Todo Text" />
Expand All @@ -120,7 +121,8 @@ It doesn't take too much effort to get our HTML looking like a fully-featured to
<button
type="button"
class="destroy"
title="Remove this todo"></button>
title="Remove this todo"
aria-label="Remove this todo"></button>
</div>

<input autofocus class="edit" value="Todo Text" />
Expand Down Expand Up @@ -254,7 +256,11 @@ Now that we have all of our component structure files, we can cut and paste the
class="toggle"
type="checkbox" />
<label>Buy Movie Tickets</label>
<button type="button" class="destroy" title="Remove this todo"></button>
<button
type="button"
class="destroy"
title="Remove this todo"
aria-label="Remove this todo"></button>
</div>

<input autofocus class="edit" value="Todo Text" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ The class `visually-hidden` has no effect yet, because we have not included any

Further down, you can find our [`<ul>`](/en-US/docs/Web/HTML/Reference/Elements/ul) element:

```html
```jsx
<ul
role="list"
className="todo-list stack-large stack-exception"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ Here we have:
1. `<!doctype html>`: The doctype. When HTML was young (1991-1992), doctypes were meant to act as links to a set of rules that the HTML page had to follow to be considered good HTML. Doctypes used to look something like this:

```html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!doctype html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
```

More recently, the doctype is a historical artifact that needs to be included for everything else to work right. `<!doctype html>` is the shortest string of characters that counts as a valid doctype. That is all you need to know!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ You'll solve this challenge on your local development environment; ideally, you'
2. Inside the folder, create an `index.html` file and paste the following content into it:

```html
<!DOCTYPE html>
<!doctype html>
<html lang="en-US">
<head>
<meta charset="utf-8" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ Our finished example will look (and function) something like the following:
<button class="stop" data-icon="S" aria-label="stop"></button>
<div class="timer">
<div></div>
<span aria-label="timer">00:00</span>
<span>00:00</span>
</div>
<button class="rwd" data-icon="B" aria-label="rewind"></button>
<button class="fwd" data-icon="F" aria-label="fast forward"></button>
Expand Down Expand Up @@ -399,7 +399,7 @@ To get started with this example, follow these steps:
<button class="stop" data-icon="S" aria-label="stop"></button>
<div class="timer">
<div></div>
<span aria-label="timer">00:00</span>
<span>00:00</span>
</div>
<button class="rwd" data-icon="B" aria-label="rewind"></button>
<button class="fwd" data-icon="F" aria-label="fast forward"></button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,19 @@ The standard `doctype` declaration that will trigger standards mode is:
When at all possible, you should just use the above doctype. There are other valid legacy doctypes that will trigger Standards or Almost Standards mode:

```html
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
```

```html
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<!doctype html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
```

```html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!doctype html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
```

```html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!doctype html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
```

## Why doesn't my CSS, which is valid, render at all?
Expand Down
4 changes: 1 addition & 3 deletions files/en-us/mdn/kitchensink/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -358,9 +358,7 @@ if (5 < 30 && 55 > 20 && 5 < 20 && 55 > 10) {
Move the rectangle with arrow keys. Green means collision, blue means no
collision.
</p>
<script
type="text/javascript"
src="https://cdnjs.cloudflare.com/ajax/libs/crafty/0.5.4/crafty-min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/crafty/0.5.4/crafty-min.js"></script>
```

```js
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,15 +190,15 @@ The [legacy Firefox Style Guide](https://firefoxux.github.io/StyleGuide/#/naviga
&#x3C;div class="panel-formElements-item">
&#x3C;label for="picker01">Label:&#x3C;/label>
&#x3C;select id="picker01">
&#x3C;option value="value1" selected="true">Dropdown&#x3C;/option>
&#x3C;option value="value1" selected>Dropdown&#x3C;/option>
&#x3C;option value="value2">List Item&#x3C;/option>
&#x3C;option value="value3">List Item&#x3C;/option>
&#x3C;/select>
&#x3C;/div>
&#x3C;div class="panel-formElements-item">
&#x3C;label for="placeholder01">Label:&#x3C;/label>
&#x3C;input type="text" placeholder="Placeholder" id="placeholder01" />
&#x3C;button name="expander" class="expander">&#x3C;/button>
&#x3C;button name="expander" class="expander" aria-label="Expand">&#x3C;/button>
&#x3C;/div>
&#x3C;/div></pre
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ In this example:
- The cursor is placed in the Name field of the form the first time the page is loaded. In Firefox 1.5, when the user navigates back to the page, the cursor remains in the field it was when the user navigated away from the page. In other browsers, the cursor moves back to the Name field.

```html
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!doctype html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Order query Firefox 1.5 Example</title>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,20 @@ The `grid` role is a composite widget containing a collection of one or more row
<tr>
<th scope="row">Aisle 1</th>
<td tabindex="0">
<button id="1a" tabindex="-1">1A</button>
<button id="btn-1a" tabindex="-1">1A</button>
</td>
<td tabindex="-1">
<button id="1b" tabindex="-1">1B</button>
<button id="btn-1b" tabindex="-1">1B</button>
</td>
<!-- More Columns -->
</tr>
<tr>
<th scope="row">Aisle 2</th>
<td tabindex="-1">
<button id="2a" tabindex="-1">2A</button>
<button id="btn-2a" tabindex="-1">2A</button>
</td>
<td tabindex="-1">
<button id="2b" tabindex="-1">2B</button>
<button id="btn-2b" tabindex="-1">2B</button>
</td>
<!-- More Columns -->
</tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,11 @@ The HTML code example below uses the `group` role with a `tree` view:
role="presentation"
aria-owns="animalGroup"
aria-expanded="true">
<img role="presentation" tabindex="-1" src="images/treeExpanded.gif" />
<img
role="presentation"
tabindex="-1"
src="images/treeExpanded.gif"
alt="" />
<span role="treeitem" tabindex="0">Animals</span>
</div>
<div id="animalGroup" role="group">
Expand All @@ -50,7 +54,11 @@ The HTML code example below uses the `group` role with a `tree` view:
role="presentation"
aria-owns="catGroup"
aria-expanded="false">
<img role="presentation" tabindex="-1" src="images/treeContracted.gif" />
<img
role="presentation"
tabindex="-1"
src="images/treeContracted.gif"
alt="" />
<span role="treeitem" tabindex="0">Cats</span>
</div>
<div id="catGroup" role="group">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ The ARIA `img` role can be used to identify multiple elements inside page conten
```html
<div role="img" aria-label="Description of the overall image">
<img src="graphic1.png" alt="" />
<img src="graphic2.png" />
<img src="graphic2.png" alt="" />
</div>
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ This example creates a widget and assigns the ARIA `switch` role to it.
id="speakerPower"
class="switch">
<span aria-hidden="true">off</span>
<span aria-hidden="true">on</span>
<span aria-hidden="false">on</span>
</button>
<label for="speakerPower" class="switch">Speaker power</label>
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,15 +119,15 @@ All of the `tabpanel` elements have `tabindex="0"` to make them tabbable, and al
role="tabpanel"
tabindex="0"
aria-labelledby="tab-2"
hidden="hidden">
hidden>
<p>How to run this application on macOS</p>
</div>
<div
id="panel-3"
role="tabpanel"
tabindex="0"
aria-labelledby="tab-3"
hidden="hidden">
hidden>
<p>How to run this application on Linux</p>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,9 @@ By not indexing the page (`noindex`) and not following links on the page (`nofol
<title>…</title>
<meta name="robots" content="noindex, nofollow" />
</head>
<body>
</body>
</html>
```

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/abstractrange/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ To illustrate this, consider the HTML below:
```html
<div class="container">
<div class="header">
<img src="" class="sitelogo" />
<img src="..." alt="" class="sitelogo" />
<h1>The Ultimate Website</h1>
</div>
<article>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ If you leave the attribute value blank, the registration request will be sent to
Let's look at an `<img>` element example:

```html
<img src="advertising-image.png" attributionsrc />
<img src="advertising-image.png" alt="" attributionsrc />
```

You could also achieve this via the {{domxref("HTMLImageElement.attributionSrc")}} property:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ Here's an `<img>` element example:
```html
<img
src="https://shop.example/conversion/4rghshdh5"
alt=""
width="1"
height="1"
attributionsrc />
Expand Down Expand Up @@ -211,6 +212,7 @@ For example, in the case of an `<img>` element you could declare the URL in the
```html
<img
src="https://shop.example/conversion/4rghshdh5"
alt=""
attributionsrc="https://my-separate-tracking-site.example.com"
width="1"
height="1" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -400,20 +400,20 @@ function draw() {
```

```html hidden
<table>
<tr>
<td>
<canvas id="canvas" width="150" height="150" role="presentation"></canvas>
</td>
<td>
Change the <code>miterLimit</code> by entering a new value below and
clicking the redraw button.<br /><br />
<label for="miterLimit">Miter limit</label>
<input type="number" id="miterLimit" size="3" min="1" />
<input type="submit" id="redraw" value="Redraw" />
</td>
</tr>
</table>
<canvas id="canvas" width="150" height="150" role="presentation"></canvas>
<div>
Change the <code>miterLimit</code> by entering a new value below and clicking
the redraw button.<br /><br />
<label for="miterLimit">Miter limit</label>
<input type="number" id="miterLimit" min="1" />
<button id="redraw">Redraw</button>
</div>
```

```css hidden
body {
display: flex;
}
```

```js hidden
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/clipboard/read/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ This example uses the `read()` method to read image data from the clipboard and

```html
<img id="source" src="butterfly.jpg" alt="A butterfly" />
<img id="destination" />
<img id="destination" src="" alt="Pasted image" />
<button id="reload" type="button">Reload</button>
<p id="log"></p>
```
Expand Down
18 changes: 9 additions & 9 deletions files/en-us/web/api/cspviolationreportbody/blockedurl/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,18 +167,18 @@ In addition, it specifies the directive `require-trusted-types-for 'script'`, wh
<input type="text" id="userInput" />
<button>Update Content</button>
<div id="content"></div>
</body>

<script>
function updateContent() {
const userInput = document.getElementById("userInput").value;
<script>
function updateContent() {
const userInput = document.getElementById("userInput").value;

// Passing unsanitized content - a violation of the policy
document.getElementById("content").innerHTML = userInput;
}
// Passing unsanitized content - a violation of the policy
document.getElementById("content").innerHTML = userInput;
}

document.querySelector("button").addEventListener("click", updateContent);
</script>
document.querySelector("button").addEventListener("click", updateContent);
</script>
</body>
</html>
```

Expand Down
Loading