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

WIP A11y updates #87

Closed
wants to merge 15 commits into from
Closed
Show file tree
Hide file tree
Changes from all 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 app/templates/components/list-filter.hbs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<label for="filterByCity" class="screen-reader">Filter By City</label>
{{input
value=this.value
key-up=(action "handleFilterEntry")
Expand Down
2 changes: 1 addition & 1 deletion app/templates/components/location-map.hbs
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{{yield}}
<div class="map-container" aria-hidden="true" tabindex="-1"></div>
8 changes: 2 additions & 6 deletions app/templates/components/rental-listing.hbs
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
<article class="listing">
<a
onclick={{action "toggleImageSize"}}
class="image {{if this.isWide "wide"}}"
role="button"
>
<img src={{this.rental.image}} alt="">
<a onclick={{action "toggleImageSize"}} class="image {{if isWide "wide"}}">
<img src="{{rental.image}}" alt={{rental.title}}>
<small>View Larger</small>
</a>
<div class="details">
Expand Down
6 changes: 6 additions & 0 deletions config/environment.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ module.exports = function(environment) {
}
};

ENV['ember-a11y-testing'] = {
componentOptions: {
turnAuditOff: true, // Change to run a11y audit on all dev build and serves
}
};

if (environment === 'development') {
// ENV.APP.LOG_RESOLVER = true;
// ENV.APP.LOG_ACTIVE_GENERATION = true;
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"@ember/jquery": "^0.5.2",
"@ember/optional-features": "^0.6.3",
"broccoli-asset-rev": "^2.7.0",
"ember-a11y-testing": "^0.5.0",
"ember-ajax": "^4.0.1",
"ember-cli": "~3.8.1",
"ember-cli-app-version": "^3.2.0",
Expand Down
19 changes: 19 additions & 0 deletions tests/acceptance/list-rentals-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { module, test } from 'qunit';
import { setupApplicationTest } from 'ember-qunit';
import setupMirage from 'ember-cli-mirage/test-support/setup-mirage';
import { resolve } from 'rsvp';
import a11yAudit from 'ember-a11y-testing/test-support/audit';
import {
click,
currentURL,
Expand Down Expand Up @@ -63,3 +64,21 @@ module('Acceptance | list rentals', function(hooks) {
assert.ok(this.element.querySelector('.show-listing .description'), 'should list a description of the property');
});
});

/*
a11yAudit is a special feature of the ember-a11y-testing addon. It helps identify
accessibility issues in an app and recommends solutions. For more information,
visit https://github.com/ember-a11y/ember-a11y-testing
*/

test('accessibility check of rentals route', function (assert) {
visit('/rentals');
a11yAudit();
andThen(() => assert.ok(true, 'no a11y errors found!'));
});

test('accessibility check of rentals/:id route', function (assert) {
visit('/rentals/grand-old-mansion');
a11yAudit();
andThen(() => assert.ok(true, 'no a11y errors found!'));
});
60 changes: 35 additions & 25 deletions vendor/ember-tutorial.css
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ body {
}

a {
color: #2185D0;
text-decoration: none;
color: #016aba;
text-decoration: none;
}

p {
Expand All @@ -41,14 +41,15 @@ p {
*/

.button {
padding: 12px 30px 13px;
text-decoration: none;
color: #fff;
background: #2185D0;
border-radius: 5px;
border: none;
font-size: 16px;
opacity: 0.9;
padding: 10px 30px 10px;
text-decoration: none;
color: #fff;
background: #016aba;
border-radius: 5px;
border: none;
font-size: 20px;
font-weight: bold;
opacity: 0.9;
}

.button:hover {
Expand Down Expand Up @@ -76,9 +77,9 @@ p {
}

.menu h1 {
padding: 7px 0 0 20px;
color: #f9f9f9;
font-size: 2.1em;
padding: 7px 0 0 20px;
color: #f9f9f9;
font-size: 1.8em;
}

.menu h1 em {
Expand All @@ -92,11 +93,11 @@ p {
}

.menu a {
text-decoration: none;
line-height: 1;
padding: 0 15px;
color: #f9f9f9;
opacity: 0.85;
text-decoration: none;
padding: 0 15px;
color: #fff;
font-size: 20px;
font-weight: bold;
}

.menu a:hover,
Expand Down Expand Up @@ -366,11 +367,20 @@ p {
}

.tomster {
background: url(../assets/images/teaching.png);
background-size: contain;
background-repeat: no-repeat;
height: 200px;
width: 200px;
position: relative;
top: -50px;
background: url(../assets/images/teaching.png);
background-size: contain;
background-repeat: no-repeat;
height: 200px;
width: 200px;

position: relative;
top: -50px;
}

.screen-reader{
position: absolute;
overflow: hidden;
clip: rect(0 0 0 0);
height: 1px; width: 1px;
margin: -1px; padding: 0; border: 0;
}
50 changes: 42 additions & 8 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1233,9 +1233,9 @@ aws4@^1.2.1:
version "1.6.0"
resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.6.0.tgz#83ef5ca860b2b32e4a0deedee8c771b9db57471e"

aws4@^1.8.0:
version "1.8.0"
resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.8.0.tgz#f0e003d9ca9e7f59c7a508945d7b2ef9a04a542f"
axe-core@^2.4.2:
version "2.5.0"
resolved "https://registry.yarnpkg.com/axe-core/-/axe-core-2.5.0.tgz#2f7c662c4d7d07cc8dc81f2f1d3d8288d8628039"

babel-code-frame@^6.22.0, babel-code-frame@^6.26.0:
version "6.26.0"
Expand Down Expand Up @@ -2242,7 +2242,7 @@ broccoli-funnel-reducer@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/broccoli-funnel-reducer/-/broccoli-funnel-reducer-1.0.0.tgz#11365b2a785aec9b17972a36df87eef24c5cc0ea"

broccoli-funnel@^1.0.0, broccoli-funnel@^1.0.1, broccoli-funnel@^1.0.2:
broccoli-funnel@^1.0.0, broccoli-funnel@^1.0.1, broccoli-funnel@^1.0.2, broccoli-funnel@^1.0.7, broccoli-funnel@^1.1.0, broccoli-funnel@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/broccoli-funnel/-/broccoli-funnel-1.2.0.tgz#cddc3afc5ff1685a8023488fff74ce6fb5a51296"
dependencies:
Expand Down Expand Up @@ -2324,7 +2324,7 @@ broccoli-lint-eslint@^4.2.1:
lodash.defaultsdeep "^4.6.0"
md5-hex "^2.0.0"

broccoli-merge-trees@^1.0.0, broccoli-merge-trees@^1.1.0, broccoli-merge-trees@^1.1.1:
broccoli-merge-trees@^1.0.0, broccoli-merge-trees@^1.1.0, broccoli-merge-trees@^1.1.1, broccoli-merge-trees@^1.1.4:
version "1.2.4"
resolved "https://registry.yarnpkg.com/broccoli-merge-trees/-/broccoli-merge-trees-1.2.4.tgz#a001519bb5067f06589d91afa2942445a2d0fdb5"
dependencies:
Expand Down Expand Up @@ -3564,6 +3564,25 @@ electron-to-chromium@^1.3.47:
version "1.3.82"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.82.tgz#7d13ae4437d2a783de3f4efba96b186c540b67b1"

ember-a11y-testing@^0.5.0:
version "0.5.0"
resolved "https://registry.yarnpkg.com/ember-a11y-testing/-/ember-a11y-testing-0.5.0.tgz#d8cacf5f7a0743da5a3bae26228878ec304f5251"
dependencies:
axe-core "^2.4.2"
broccoli-funnel "^2.0.1"
ember-cli-babel "^6.8.2"
ember-cli-version-checker "^2.1.0"

ember-a11y@^0.1.15:
version "0.1.15"
resolved "https://registry.yarnpkg.com/ember-a11y/-/ember-a11y-0.1.15.tgz#10729ec8ebc6183470cf460d9919863f4d499856"
dependencies:
broccoli-funnel "^1.0.7"
broccoli-merge-trees "^1.1.4"
broccoli-string-replace "^0.1.1"
ember-cli-babel "^6.0.0"
ember-cli-version-checker "^1.1.7"
ember-getowner-polyfill "^1.0.1"
ember-ajax@^4.0.1:
version "4.0.2"
resolved "https://registry.yarnpkg.com/ember-ajax/-/ember-ajax-4.0.2.tgz#ce86d52c24289657e0a230140b06a52fe453d655"
Expand All @@ -3579,9 +3598,9 @@ ember-assign-polyfill@~2.4.0:
ember-cli-babel "^6.6.0"
ember-cli-version-checker "^2.0.0"

ember-cli-app-version@^3.2.0:
version "3.2.0"
resolved "https://registry.yarnpkg.com/ember-cli-app-version/-/ember-cli-app-version-3.2.0.tgz#7b9ad0e1b63ae0518648356ee24c703e922bc26e"
ember-cli-babel@^5.1.5, ember-cli-babel@^5.1.6:
version "5.2.4"
resolved "https://registry.yarnpkg.com/ember-cli-babel/-/ember-cli-babel-5.2.4.tgz#5ce4f46b08ed6f6d21e878619fb689719d6e8e13"
dependencies:
ember-cli-babel "^6.12.0"
git-repo-version "^1.0.2"
Expand Down Expand Up @@ -3859,6 +3878,7 @@ ember-cli-uglify@^2.1.0:
broccoli-uglify-sourcemap "^2.1.1"
lodash.defaultsdeep "^4.6.0"


ember-cli-update@^0.32.4:
version "0.32.4"
resolved "https://registry.yarnpkg.com/ember-cli-update/-/ember-cli-update-0.32.4.tgz#fa4f4a7176422801e7d70e429d783c7a364c48ec"
Expand Down Expand Up @@ -4039,13 +4059,27 @@ ember-export-application-global@^2.0.0:
dependencies:
ember-cli-babel "^6.0.0-beta.7"

ember-factory-for-polyfill@^1.1.0:
version "1.3.1"
resolved "https://registry.yarnpkg.com/ember-factory-for-polyfill/-/ember-factory-for-polyfill-1.3.1.tgz#b446ed64916d293c847a4955240eb2c993b86eae"
dependencies:
ember-cli-version-checker "^2.1.0"

ember-get-config@^0.2.2:
version "0.2.4"
resolved "https://registry.yarnpkg.com/ember-get-config/-/ember-get-config-0.2.4.tgz#118492a2a03d73e46004ed777928942021fe1ecd"
dependencies:
broccoli-file-creator "^1.1.1"
ember-cli-babel "^6.3.0"

ember-getowner-polyfill@^1.0.1:
version "1.2.5"
resolved "https://registry.yarnpkg.com/ember-getowner-polyfill/-/ember-getowner-polyfill-1.2.5.tgz#ceff8a09897d0d7e05c821bb71666a95eb26dc92"
dependencies:
ember-cli-babel "^5.1.6"
ember-cli-version-checker "^1.2.0"
ember-factory-for-polyfill "^1.1.0"

ember-inflector@^2.0.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/ember-inflector/-/ember-inflector-2.1.0.tgz#afcb92d022a4eab58f08ff4578eafc3a1de2d09b"
Expand Down