Skip to content

Commit

Permalink
Update code with the links in their own div for link-img-alt
Browse files Browse the repository at this point in the history
  • Loading branch information
IsaDC committed Dec 17, 2024
1 parent 4936d3b commit 4ccbea9
Showing 1 changed file with 12 additions and 14 deletions.
26 changes: 12 additions & 14 deletions tests/link-img-alt/reference/2023-3-13_11377/link.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,40 +4,38 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Link Example 2 (img element with alt attribute)</title>

<!-- Core JS and CSS shared by all examples -->
<link rel="stylesheet" href="https://www.w3.org/StyleSheets/TR/2016/base.css">
<link rel="stylesheet" href="../../../shared/css/core.css">
<script src="../../../shared/js/examples.js"></script>
<script src="../../../shared/js/highlight.pack.js"></script>
<script src="../../../shared/js/app.js"></script>
<script src="../../../shared/js/skipto.js"></script>

<!-- JS and CSS for this example -->
<link href="css/link.css" rel="stylesheet">
<script src="js/link.js"></script>
</head>
<body>
<main>
<h1>Link Example 2 (img element with alt attribute</h1>

<section>
<h2>About This Example</h2>
<p>
The example below demonstrates one variation of the <a href="../link-pattern.html">Link Pattern</a>.
The link pattern is used when it is necessary for elements other than the HTML <code>a</code> element to have link behaviors.
<p>The example below demonstrates one variation of the <a href="../link-pattern.html">Link Pattern</a>.
The link pattern is used when it is necessary for elements other than the HTML <code>a</code> element to have link behaviors.
</p>
</section>

<section>
<h2 id="ex_label">Examples</h2>
<div role="separator" id="ex_start_sep" aria-labelledby="ex_start_sep ex_label" aria-label="Start of"></div>
<a id="beforelink" href="#beforelink">Navigate forwards from here</a>
<img tabindex="0" role="link" id="link" onclick="goToLink(event, 'https://www.w3.org/')" onkeydown="goToLink(event, 'https://www.w3.org/')" src="images/w3c-logo.svg" alt="W3C Website">
<a id="afterlink" href="#afterlink">Navigate backwards from here</a>
<div>
<a id="beforelink" href="#beforelink">Navigate forwards from here</a>
</div>
<div>
<img tabindex="0" role="link" id="link" onclick="goToLink(event, 'https://www.w3.org/')" onkeydown="goToLink(event, 'https://www.w3.org/')" src="images/w3c-logo.svg" alt="W3C Website">
</div>
<div>
<a id="afterlink" href="#afterlink">Navigate backwards from here</a>
</div>
<div role="separator" id="ex_end_sep" aria-labelledby="ex_end_sep ex_label" aria-label="End of"></div>
</section>

</main>
</body>
</html>
</html>

0 comments on commit 4ccbea9

Please sign in to comment.