ada tools update
This commit is contained in:
282
test/testdata/test-accessible.html
vendored
Normal file
282
test/testdata/test-accessible.html
vendored
Normal file
@@ -0,0 +1,282 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Accessible Test Page</title>
|
||||
<style>
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: Arial, sans-serif;
|
||||
line-height: 1.6;
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
padding: 20px;
|
||||
background-color: #ffffff;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
h1, h2, h3 {
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
/* High contrast text */
|
||||
.high-contrast {
|
||||
color: #000000;
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
/* Visible focus indicators */
|
||||
a:focus, button:focus, input:focus, select:focus, textarea:focus {
|
||||
outline: 3px solid #0066cc;
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
/* Responsive layout */
|
||||
.container {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 20px;
|
||||
}
|
||||
|
||||
.card {
|
||||
flex: 1 1 300px;
|
||||
padding: 20px;
|
||||
border: 1px solid #000000;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
/* Form styles */
|
||||
label {
|
||||
display: block;
|
||||
margin-bottom: 5px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
input, select, textarea {
|
||||
width: 100%;
|
||||
padding: 8px;
|
||||
margin-bottom: 15px;
|
||||
border: 1px solid #000000;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
button {
|
||||
padding: 10px 20px;
|
||||
background-color: #0066cc;
|
||||
color: #ffffff;
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
button:hover {
|
||||
background-color: #0052a3;
|
||||
}
|
||||
|
||||
/* Navigation */
|
||||
nav {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
nav ul {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
display: flex;
|
||||
gap: 20px;
|
||||
}
|
||||
|
||||
nav a {
|
||||
color: #0066cc;
|
||||
text-decoration: none;
|
||||
padding: 5px 10px;
|
||||
}
|
||||
|
||||
nav a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
/* Skip link */
|
||||
.skip-link {
|
||||
position: absolute;
|
||||
top: -40px;
|
||||
left: 0;
|
||||
background: #000000;
|
||||
color: #ffffff;
|
||||
padding: 8px;
|
||||
text-decoration: none;
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
.skip-link:focus {
|
||||
top: 0;
|
||||
}
|
||||
|
||||
/* Responsive images */
|
||||
img {
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
/* Media queries for responsive design */
|
||||
@media (max-width: 768px) {
|
||||
.container {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
nav ul {
|
||||
flex-direction: column;
|
||||
gap: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 320px) {
|
||||
body {
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.card {
|
||||
padding: 10px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<a href="#main-content" class="skip-link">Skip to main content</a>
|
||||
|
||||
<header>
|
||||
<h1>Accessible Test Page</h1>
|
||||
<nav aria-label="Main navigation">
|
||||
<ul>
|
||||
<li><a href="#home">Home</a></li>
|
||||
<li><a href="#about">About</a></li>
|
||||
<li><a href="#services">Services</a></li>
|
||||
<li><a href="#contact">Contact</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
<main id="main-content">
|
||||
<section>
|
||||
<h2>Welcome</h2>
|
||||
<p class="high-contrast">
|
||||
This is an accessible test page designed to pass WCAG 2.1 Level AA criteria.
|
||||
It includes proper semantic HTML, high contrast colors, keyboard navigation,
|
||||
and responsive design.
|
||||
</p>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2>Features</h2>
|
||||
<div class="container">
|
||||
<div class="card">
|
||||
<h3>High Contrast</h3>
|
||||
<p>All text meets WCAG AA contrast requirements (4.5:1 for normal text, 3:1 for large text).</p>
|
||||
</div>
|
||||
<div class="card">
|
||||
<h3>Keyboard Navigation</h3>
|
||||
<p>All interactive elements are keyboard accessible with visible focus indicators.</p>
|
||||
</div>
|
||||
<div class="card">
|
||||
<h3>Responsive Design</h3>
|
||||
<p>Content reflows properly at 320px width without horizontal scrolling.</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2>Interactive Elements</h2>
|
||||
<button type="button">Click Me</button>
|
||||
<a href="#example">Example Link</a>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2>Contact Form</h2>
|
||||
<form>
|
||||
<div>
|
||||
<label for="name">Name:</label>
|
||||
<input type="text" id="name" name="name" required aria-required="true">
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="email">Email:</label>
|
||||
<input type="email" id="email" name="email" required aria-required="true">
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="subject">Subject:</label>
|
||||
<select id="subject" name="subject">
|
||||
<option value="">Select a subject</option>
|
||||
<option value="general">General Inquiry</option>
|
||||
<option value="support">Support</option>
|
||||
<option value="feedback">Feedback</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="message">Message:</label>
|
||||
<textarea id="message" name="message" rows="5" required aria-required="true"></textarea>
|
||||
</div>
|
||||
|
||||
<button type="submit">Submit</button>
|
||||
</form>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2>Images</h2>
|
||||
<img src="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='300'%3E%3Crect fill='%230066cc' width='400' height='300'/%3E%3Ctext x='50%25' y='50%25' dominant-baseline='middle' text-anchor='middle' fill='white' font-size='24'%3EAccessible Image%3C/text%3E%3C/svg%3E"
|
||||
alt="Accessible image with descriptive alt text">
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2>Lists</h2>
|
||||
<ul>
|
||||
<li>Semantic HTML elements</li>
|
||||
<li>Proper heading hierarchy</li>
|
||||
<li>ARIA labels where appropriate</li>
|
||||
<li>Keyboard accessible controls</li>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2>Table</h2>
|
||||
<table>
|
||||
<caption>WCAG 2.1 Compliance Summary</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">Criterion</th>
|
||||
<th scope="col">Level</th>
|
||||
<th scope="col">Status</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>1.4.3 Contrast (Minimum)</td>
|
||||
<td>AA</td>
|
||||
<td>Pass</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>2.1.1 Keyboard</td>
|
||||
<td>A</td>
|
||||
<td>Pass</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>1.4.10 Reflow</td>
|
||||
<td>AA</td>
|
||||
<td>Pass</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
</main>
|
||||
|
||||
<footer>
|
||||
<p>© 2025 Accessible Test Page. All rights reserved.</p>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user