@joomla/joomla-a11y-checker
Version:
ooa11y is an accessibility and quality assurance tool that visually highlights common accessibility and usability issues.
223 lines (209 loc) • 10.3 kB
HTML
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<meta name="description" content="" />
<meta name="author" content="" />
<title>JOOA11Y - The Joomla Accessibility Checker</title>
<link rel="icon" type="image/x-icon" href="../assets/favicon.ico" />
<link rel="stylesheet" href="../assets/css/joomla-a11y-checker.min.css" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css"
integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css"
integrity="sha512-1ycn6IcaQQ40/MKBW2W4Rhis/DbILU74C1vSrLJxCq57o941Ym01SwNsOMqvEBFlcgUa6xLiPY/NS5R+E6ztJQ==" crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- Bootstrap core JS-->
<script defer src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.min.js"
integrity="sha384-QJHtvGhmr9XOIpI6YVutG+2QOK9T+ZnN4kzFN1RtK3zEFEIsxhlmWl5/YESvpZ13" crossorigin="anonymous"></script>
<!-- Core theme JS-->
<script type="module" src="script.js"></script>
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<div class="container">
<a class="navbar-brand" href="#">Jooa11y - the Joomla Accessibility Checker</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse"
data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false"
aria-label="Toggle navigation"><span class="navbar-toggler-icon"></span></button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav ms-auto mb-2 mb-lg-0">
<li class="nav-item"><a class="nav-link active" aria-current="page" href="../index.html">Home</a>
</li>
<li class="nav-item"><a class="nav-link" href="howto.html">How To</a></li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" id="navbarDropdownExamples" href="#" role="button"
data-bs-toggle="dropdown" aria-expanded="false">Examples</a>
<ul class="dropdown-menu dropdown-menu-end" aria-labelledby="navbarDropdownExamples">
<li><a class="dropdown-item" href="errors.html">Errors</a></li>
<li><a class="dropdown-item" href="warnings.html">Warnings</a></li>
<li><a class="dropdown-item" href="pass.html">No Errors</a></li>
</ul>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" id="navbarDropdownTests" href="#" role="button"
data-bs-toggle="dropdown" aria-expanded="false">Tests</a>
<ul class="dropdown-menu dropdown-menu-end" aria-labelledby="navbarDropdownTests">
<li><a class="dropdown-item" href="headings.html">Headings</a></li>
<li><a class="dropdown-item" href="images.html">Images</a></li>
<li><a class="dropdown-item" href="links.html">Links</a></li>
<li><a class="dropdown-item" href="tables.html">Tables</a></li>
<li><hr class="dropdown-divider" /></li>
<li><a class="dropdown-item" href="contrast.html">Contrast</a></li>
<li><a class="dropdown-item" href="labels.html">Labels</a></li>
<li><hr class="dropdown-divider" /></li>
<li><a class="dropdown-item" href="audiovideo.html">Audio & Video</a></li>
<li><a class="dropdown-item" href="text.html">Text</a></li>
<li><a class="dropdown-item" href="fakelists.html">Fake Lists</a></li>
<li><a class="dropdown-item" href="iframes.html">iFrames</a></li>
<li><a class="dropdown-item" href="pdf.html">PDF Content</a></li>
<li><hr class="dropdown-divider" /></li>
<li><a class="dropdown-item" href="social.html">Social Media</a></li>
</ul>
</li>
</ul>
</div>
</div>
</nav>
<main>
<section id="title" class="bg-secondary">
<div class="container">
<div class="text-center text-white py-5">
<h1>Labels</h1>
<p class="lead">Accessibility tests for form inputs and labels.</p>
</div>
</div>
</section>
<section id="content">
<div class="container pt-4">
<div class="row">
<div class="col-sm-12">
<div class="ms-5 mb-5">
<div class="row">
<div class="col-md-6">
<h2>Example 1</h2>
<p>Error: Input without a label or missing <kbd>id</kbd>.</p>
<input type="text" />
</div>
<div class="col-md-6">
<h2>Example 2</h2>
<p>Error: Input with ID, although previous label does not have a <kbd>for</kbd> attribute.</p>
<label>Name</label>
<input type="text" id="asdfg" />
</div>
</div>
<div class="row mt-4">
<div class="col-md-6">
<h2 id="ex3">Example 3</h2>
<p id="ex3para">Warning: Input is using aria-label or aria-labelledby. Warn user to ensure there is a visible label.</p>
<input aria-labelledby="ex3 ex3para" type="text" />
</div>
<div class="col-md-6">
<h2>Example 4</h2>
<p>Pass: Input has <kbd>id</kbd> and label has corresponding <kbd>for</kbd> attribute.</p>
<label for="asdfgh">Address</label>
<input type="text" id="asdfgh" />
</div>
</div>
<div class="row mt-4">
<div class="col-md-6">
<h2>Example 5</h2>
<p>Warning: Input where <kbd>type='reset'</kbd>.</p>
<input type="reset"/>
</div>
<div class="col-md-6">
<h2>Example 6</h2>
<p>Pass: Input where <kbd>type='submit'</kbd></p>
<input type="submit" />
</div>
</div>
<div class="row mt-4">
<div class="col-md-6">
<h2>Example 7</h2>
<p>Pass: Input where <kbd>type='button'</kbd>.</p>
<input type="button" value="Input Button"/>
</div>
<div class="col-md-6">
<h2>Example 8</h2>
<p>Pass: Implicit labels. <kbd><label>First name: <input type="text"/><label></kbd> </p>
<label>
First name:
<input type="text"/>
</label>
</div>
</div>
<div class="row mt-4">
<div class="col-md-6">
<h2>Example 9</h2>
<p>Fail: Implicit labels without text. <kbd><label><input type="text"/><label></kbd> </p>
<label>
<input type="text"/>
</label>
</div>
<div class="col-md-6">
<h2>Example 10</h2>
<p>Fail: Select without corresponding label.</p>
<label>Choose a car:</label>
<select name="cars">
<option value="volvo">Volvo</option>
<option value="saab">Saab</option>
<option value="mercedes">Mercedes</option>
<option value="audi">Audi</option>
</select>
</div>
</div>
<div class="row mt-4">
<div class="col-md-6">
<h2>Example 11</h2>
<p>Fail: Textarea missing label.</p>
<label>Feedback</label>
<textarea rows="2" cols="50">
</textarea>
</div>
<div class="col-md-6">
<h2>Example 12</h2>
<p>Pass: Textarea has label.</p>
<label for="review">Review of W3Schools:</label>
<textarea id="review" rows="2" cols="50">
</textarea>
</div>
</div>
<div class="row mt-4">
<div class="col-md-6">
<h2>Example 13</h2>
<p>Fail: Input where <kbd>type="image"</kbd> and doesn't have alt text or aria-label.</p>
<label for="q">Search:</label><input type="text" name="q" id="q"><input type="image" alt=" " width="20" src="https://upload.wikimedia.org/wikipedia/commons/thumb/7/7e/Vector_search_icon.svg/1280px-Vector_search_icon.svg.png" class="">
</div>
<div class="col-md-6">
<h2>Example 14</h2>
<p>Pass: Input has an "id" that that matches the "for" on a label, after the input.</p>
<input type="text" id="asd"/><br>
<label for="asd">Label after input</label>
</div>
</div>
<div class="row mt-4">
<div class="col-md-6">
<h2>Example 15</h2>
<p>Pass: Input has <kbd>title</kbd> attribute for accessible name.</p>
<input type="text" title="Phone number"><br><br>
<input type="text" title="Address">
</div>
<div class="col-md-6"></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
</main>
<footer class="text-white bg-dark py-3">
<div class="container">
<p class="my-1">By default Jooa11y only checks the parts of the website that is contained inside the <main> landmark.
For example, <a href="#">this</a> link will be
ignored as it is inside the <footer>.</p><p> If a content editor can't edit it, then Jooa11y doesn't scan it.</p>
</div>
</footer>
</body>
</html>