Skip to content

Commit

Permalink
Merge pull request #409 from ember-learn/countdown/ember-a11y-testing
Browse files Browse the repository at this point in the history
Countdown to the New Year: 31 Days of Ember Addons - ember-a11y-testing (Dec 10th 2019)
  • Loading branch information
jenweber committed Dec 10, 2019
2 parents 7c02da5 + 806e029 commit 016d1fa
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 8 deletions.
3 changes: 2 additions & 1 deletion source/2018-11-29-december-event.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,12 @@ To qualify for any of our random assortment of thank you goodies (that we’ve d

## Quality Standards

<!-- alex ignore just -->
We don’t think we need to say these things, but just in case…

- The PR counts once it is merged; the issue counts once we have added the label.
- The PR must not be disruptive (i.e., taking someone else’s branch/commits and creating a PR).
- If you participate by writing an issue, the issue should be of respectable quality and not something that is clearly an intent to +1 your participation count.
- If you participate by writing an issue, the issue should be of respectable quality and not something that appears to be an intent to +1 your participation count.

## Support

Expand Down
36 changes: 36 additions & 0 deletions source/2019-12-10-countdown-to-the-new-year-ember-a11y-testing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
title: Countdown to The New Year- Ember A11Y Testing
author: Sivakumar Kailasam
tags: 2019, Addons, DecEmber, A11y
alias: 2019-12-10-countdown-to-the-new-year-ember-a11y-testing.md
responsive: true
---

**This is the tenth in our DecEmber series- <span style="italics">"Countdown to The New Year: 31 Days of Ember Addons"</span>. We plan to highlight a new addon each day until the new year, and we hope you'll join us for the fun!**

## Day 10

Let's talk about [ember-a11y-testing](https://emberobserver.com/addons/ember-a11y-testing).
READMORE

### What It Does

The `ember-a11y-testing` addon is a wrapper around [Deque Labs'](https://github.com/dequelabs)
[axe-core](https://github.com/dequelabs/axe-core) accessibility(a11y) testing engine that helps you identify accessibility issues in your Ember app & provides useful information on how to solve them.

### Why I Like It

Like many of you out there, I too developed webapps without realizing the impact that accessible apps can have on users. In fact, I
started learning about a11y problems through this addon when I added it to a few apps that I was working on when this addon got
released back in 2015.

While there's more to building accessible apps than automated tools (like this addon) can help with, it does help ensure that
common a11y violations are captured before they can make their way to users.

The best part about this addon is that it lets you conditionally turn off parts or the entire violation report so that you don't have
to feel overwhelmed when you add this to an existing app. In the teams I've worked with, we usually add an environment variable to control
that setting so that we can work on addressing those violations whenever we can & run a variation of the nightly test run on CI with the flag enabled to check if the violation count hasn't increased since the previous run.

This addon is Octane-ready. Give it a try today & begin your a11y journey with it.

Do you use this addon? Or one like it? We'd love to hear about Ember addons that bring you joy!
14 changes: 7 additions & 7 deletions source/javascripts/embertimes-test-ids.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,24 @@ $(function(){


function applyEmberTimesTestIds() {
let sectionTitles = $('[data-embertimes-post-body] h2');
var sectionTitles = $('[data-embertimes-post-body] h2');

sectionTitles.each((i, title) => {
sectionTitles.each(function(i, title) {
/* This annotates each section title of the post. e.g. `## [Ember Roadmap Call for Blog Posts 🤙](#section-url)` with a section specific id */
$(title).attr('data-embertimes-section-title', i);
let sectionFragments = $(title).nextUntil('h2').not('hr');
sectionFragments.each((index, element) => {
var sectionFragments = $(title).nextUntil('h2').not('hr');
sectionFragments.each(function(index, element) {
/* This annotates each sub element of a section, e.g. a `p`, `a`, `ul`, with the section specific id, allowing grouping of content belonging to a single section
into one unit in the automation script */
$(element).attr('data-embertimes-section-fragment', i);
});
});

let introFragmentFirst = $('[data-embertimes-post-body]').children().first();
var introFragmentFirst = $('[data-embertimes-post-body]').children().first();
introFragmentFirst.attr('data-embertimes-intro-fragment', true);
let introFragments = introFragmentFirst.nextUntil('h2').not('hr');
var introFragments = introFragmentFirst.nextUntil('h2').not('hr');

introFragments.each((i, el) => {
introFragments.each(function(i, el) {
/* This annotates each sub element, e.g. `p` or `ul` among others, of the intro section of the post. E.g. `Hello Emberistas! This week we have for you....` */
$(el).attr('data-embertimes-intro-fragment', true);
});
Expand Down

0 comments on commit 016d1fa

Please sign in to comment.