Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance accessibility a11y #63

Open
wants to merge 5 commits into
base: gh-pages
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 4 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
1 change: 1 addition & 0 deletions comparisons/forms/color_picker/html.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<form>
<input type="color" aria-label="Select a color" />
<button type="submit">Submit</button>
</form>
16 changes: 8 additions & 8 deletions comparisons/navigation/accordion/html.html
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
<div class="togglebox">
<div class="togglebox" role="tablist">
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested this locally and it doesn't seem to make the toggle keyboard accessible still :/

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested it on NVDA & Chromevox and it's work correctly with a keyboard if you used tab and up,down arrow will hear and see the content.

<input id="toggle1" type="radio" name="toggle" />
<label for="toggle1">Label 1</label>
<label for="toggle1" role="tab" tabindex="0" aria-describedby="content-area1">Label 1</label>
<section id="content1">
<p>Content for the first accordion</p>
<p id="content-area1">Content for the first accordion</p>
</section>

<input id="toggle2" type="radio" name="toggle" />
<label for="toggle2">Label 2</label>
<label for="toggle2" role="tab" tabindex="0" aria-describedby="content-area2">Label 2</label>
<section id="content2">
<p>Content for the second accordion</p>
<p id="content-area2">Content for the second accordion</p>
</section>

<input id="toggle3" type="radio" name="toggle" />
<label for="toggle3">Label 3</label>
<label for="toggle3" role="tab" tabindex="0" aria-describedby="content-area3">Label 3</label>
<section id="content3">
<p>Content for the third accordion</p>
<p id="content-area3">Content for the third accordion</p>
</section>
</div>
</div>
6 changes: 3 additions & 3 deletions comparisons/navigation/lightbox/html.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<!-- thumbnail image wrapped in a link -->
<a href="#img1">
<img src="img.jpg" class="thumbnail">
<img src="img.jpg" class="thumbnail" alt="image description">
</a>

<!-- lightbox container hidden with CSS -->
<a href="#" class="lightbox" id="img1">
<img src="img.jpg">
</a>
<img src="img.jpg" alt="image description">
</a>
22 changes: 11 additions & 11 deletions comparisons/navigation/tabs/html.html
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
<div class="tabs">
<div class="tab">
<div class="tabs" role="tablist">
<div class="tab" role="tab">
<input type="radio" name="tabgroup" id="tab-1" checked>
<label for="tab-1">Label One</label>
<label for="tab-1" tabindex="0" aria-describedby="content-area1">Label One</label>
<div class="content">
<p>Tab One Content</p>
<p id="content-area1">Tab One Content</p>
</div>
</div>

<div class="tab">
<div class="tab" role="tab">
<input type="radio" name="tabgroup" id="tab-2">
<label for="tab-2">Label Two</label>
<label for="tab-2" tabindex="0" aria-describedby="content-area2">Label Two</label>
<div class="content">
<p>Tab Two Content</p>
<p id="content-area2">Tab Two Content</p>
</div>
</div>

<div class="tab">
<div class="tab" role="tab">
<input type="radio" name="tabgroup" id="tab-3">
<label for="tab-3">Label Three</label>
<label for="tab-3" tabindex="0" aria-describedby="content-area3">Label Three</label>
<div class="content">
<p>Tab Three Content</p>
<p id="content-area3">Tab Three Content</p>
</div>
</div>
</div>
</div>