Skip to content

Commit

Permalink
Reformats all files using Prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
scalvert committed Aug 21, 2020
1 parent 28156b3 commit 7af2377
Show file tree
Hide file tree
Showing 70 changed files with 753 additions and 625 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ language: node_js
node_js:
# we recommend testing addons with the same minimum supported node version as Ember CLI
# so that your addon works for all apps
- "10"
- '10'

os: linux

Expand Down
93 changes: 46 additions & 47 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,94 +1,93 @@

# 3.0.1 / 2020-06-29

* Update dependency ember-cli-htmlbars to v5.2.0
* Update dependency eslint-plugin-ember to v8.9.0
* Update dependency sass to v1.26.9
* Update ember packages
* Update dependency axe-core to v3.5.5
* Update dependency eslint-plugin-ember to v8.7.0
- Update dependency ember-cli-htmlbars to v5.2.0
- Update dependency eslint-plugin-ember to v8.9.0
- Update dependency sass to v1.26.9
- Update ember packages
- Update dependency axe-core to v3.5.5
- Update dependency eslint-plugin-ember to v8.7.0

# 3.0.1 / 2020-05-18

* Update dependency ember-cli-version-checker to v5.1.1
* Update dependency eslint-plugin-ember to v8.5.1
* Update ember packages
- Update dependency ember-cli-version-checker to v5.1.1
- Update dependency eslint-plugin-ember to v8.5.1
- Update ember packages

# 3.0.0 / 2020-05-07

* Drops support for Ember 2.18 due to major dependencies
* Drops support for Node.js v8 due to EOL
* Update eslint
* Update dependency ember-cli-version-checker to v5
* Update dependency @ember/optional-features to v1
* Update ember packages
* Update sass
* Update dependency ember-cli-github-pages to v0.2.2
* Update dependency axe-core to v3.5.3
* Update dependency ember-radio-button to v2
- Drops support for Ember 2.18 due to major dependencies
- Drops support for Node.js v8 due to EOL
- Update eslint
- Update dependency ember-cli-version-checker to v5
- Update dependency @ember/optional-features to v1
- Update ember packages
- Update sass
- Update dependency ember-cli-github-pages to v0.2.2
- Update dependency axe-core to v3.5.3
- Update dependency ember-radio-button to v2

# 2.0.0 / 2019-11-21

* Upgrade Ember CLI to 3.12 LTS and drop Node.js 6 support ([#138](https://github.com/ember-a11y/ember-a11y-testing/pull/138))
- Upgrade Ember CLI to 3.12 LTS and drop Node.js 6 support ([#138](https://github.com/ember-a11y/ember-a11y-testing/pull/138))

# 1.1.1 / 2019-09-29

* Fixes code included in production builds [#108] ([#134](https://github.com/ember-a11y/ember-a11y-testing/pull/134))
- Fixes code included in production builds [#108](<[#134](https://github.com/ember-a11y/ember-a11y-testing/pull/134)>)

# 1.1.0 / 2019-09-09

* Bumps axe-core to v3.3
* Adds concurrent-axe strict check to counter next() 0 value
* Fixes [#124](https://github.com/ember-a11y/ember-a11y-testing/issues/124), allows a11yAudit to account for axe inlude/exclude context param
* Fixes [#127](https://github.com/ember-a11y/ember-a11y-testing/issues/127), removes use of Ember.Logger
* Fixes [#107](https://github.com/ember-a11y/ember-a11y-testing/issues/107) by adding app re-exports
- Bumps axe-core to v3.3
- Adds concurrent-axe strict check to counter next() 0 value
- Fixes [#124](https://github.com/ember-a11y/ember-a11y-testing/issues/124), allows a11yAudit to account for axe inlude/exclude context param
- Fixes [#127](https://github.com/ember-a11y/ember-a11y-testing/issues/127), removes use of Ember.Logger
- Fixes [#107](https://github.com/ember-a11y/ember-a11y-testing/issues/107) by adding app re-exports

# 0.5.7 / 2019-03-08

* Axe-core version bump to 3.2.2
- Axe-core version bump to 3.2.2

# 0.5.6 / 2018-11-22

* Adds user timing mechanism for performance profiling
* Use process.env.EMBER_ENV for env check
- Adds user timing mechanism for performance profiling
- Use process.env.EMBER_ENV for env check

# 0.5.5 / 2018-11-04

* Fixes #113: provides empty object if axeOptions are not defined to prevent axe.run from failing
- Fixes #113: provides empty object if axeOptions are not defined to prevent axe.run from failing

# 0.5.4 / 2018-10-22

* Fix services for engines, add option to exclude axe-core for component audits
- Fix services for engines, add option to exclude axe-core for component audits

# 0.5.3 / 2018-10-01

* Update axe-core to 3.1.2 ([#109](https://github.com/ember-a11y/ember-a11y-testing/pull/109))
* Make aXe v3 compatible with component audit
* Fix “Visual Noise Level” demo page
- Update axe-core to 3.1.2 ([#109](https://github.com/ember-a11y/ember-a11y-testing/pull/109))
- Make aXe v3 compatible with component audit
- Fix “Visual Noise Level” demo page

# 0.5.2 / 2018-06-05

* Improve Test Failure Messages ([#103](https://github.com/ember-a11y/ember-a11y-testing/pull/103))
* Update README with aXe Options and Scoped Auditing ([#104]((https://github.com/ember-a11y/ember-a11y-testing/pull/104)))
* Upgrade axe-core to 2.6.1 ([#98]((https://github.com/ember-a11y/ember-a11y-testing/pull/98)))
* Fix: `a11yAudit` not using default `axeOptions` ([#100]((https://github.com/ember-a11y/ember-a11y-testing/pull/100)))
- Improve Test Failure Messages ([#103](https://github.com/ember-a11y/ember-a11y-testing/pull/103))
- Update README with aXe Options and Scoped Auditing ([#104](<(https://github.com/ember-a11y/ember-a11y-testing/pull/104)>))
- Upgrade axe-core to 2.6.1 ([#98](<(https://github.com/ember-a11y/ember-a11y-testing/pull/98)>))
- Fix: `a11yAudit` not using default `axeOptions` ([#100](<(https://github.com/ember-a11y/ember-a11y-testing/pull/100)>))

# 0.5.1 / 2018-02-20

* Update Ember-CLI to 2.18.x ([#94]((https://github.com/ember-a11y/ember-a11y-testing/pull/94)))
* Add check of `isDestroyed` when running an audit ([#92]((https://github.com/ember-a11y/ember-a11y-testing/pull/92)))
- Update Ember-CLI to 2.18.x ([#94](<(https://github.com/ember-a11y/ember-a11y-testing/pull/94)>))
- Add check of `isDestroyed` when running an audit ([#92](<(https://github.com/ember-a11y/ember-a11y-testing/pull/92)>))

# 0.5.0 / 2017-10-19

* Update a couple more dependencies
* Update runtime dependencies
- Update a couple more dependencies
- Update runtime dependencies

# 0.4.4 / 2017-10-05

- Package upgrades and locking version of htmlbars-inline-precompile
- update README -change double-ticks to single-ticks
- update README to combine axeOptions examples
- README - example to disable color contrast scroll
- Package upgrades and locking version of htmlbars-inline-precompile
- update README -change double-ticks to single-ticks
- update README to combine axeOptions examples
- README - example to disable color contrast scroll

# 0.4.3 / 2017-06-21

Expand Down
90 changes: 44 additions & 46 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,13 @@ workflow by running during a component's `didRender` phase in non-production
environments. This gives you instant feedback on if your components are
accessible in any given state.

## Compatibility

Compatibility
------------------------------------------------------------------------------
- Ember.js v3.0.0 or above
- Ember CLI v3.0.0 or above
- Node.js v10 or above

* Ember.js v3.0.0 or above
* Ember CLI v3.0.0 or above
* Node.js v10 or above


Installation
------------------------------------------------------------------------------
## Installation

```bash
ember install ember-a11y-testing
Expand Down Expand Up @@ -57,7 +53,7 @@ import a11yAudit from 'ember-a11y-testing/test-support/audit';

// ...elided for brevity

test('Some test case', async function(assert) {
test('Some test case', async function (assert) {
await visit('/');
await a11yAudit();
assert.ok(true, 'no a11y errors found!');
Expand All @@ -71,7 +67,7 @@ import a11yAudit from 'ember-a11y-testing/test-support/audit';

// ...elided for brevity

test('Some test case', function(assert) {
test('Some test case', function (assert) {
visit('/');
a11yAudit();
andThen(() => assert.ok(true, 'no a11y errors found!'));
Expand All @@ -83,13 +79,13 @@ either a selector string or an HTML element. You can also provide a secondary
parameter to specify axe-core options:

```js
test('Some test case', async function(assert) {
test('Some test case', async function (assert) {
let axeOptions = {
rules: {
'button-name': {
enabled: false
}
}
enabled: false,
},
},
};

await visit('/');
Expand All @@ -101,13 +97,13 @@ test('Some test case', async function(assert) {
Or specify options as a single argument:

```js
test('Some test case', async function(assert) {
test('Some test case', async function (assert) {
let axeOptions = {
rules: {
'button-name': {
enabled: false
}
}
enabled: false,
},
},
};

await visit('/');
Expand All @@ -125,15 +121,15 @@ import a11yAudit from 'ember-a11y-testing/test-support/audit';

// ...elided for brevity

test('Some test case', function(assert) {
test('Some test case', function (assert) {
this.render(hbs`{{some-component}}`);

let axeOptions = {
rules: {
'button-name': {
enabled: false
}
}
enabled: false,
},
},
};
return a11yAudit(this.element, axeOptions).then(() => {
assert.ok(true, 'no a11y errors found!');
Expand Down Expand Up @@ -176,32 +172,34 @@ after state changes, and since the checks are scoped to a component's element,
it means that any state change propagated downwards is also caught.

#### Inspecting Violations

When a violation is detected for a component's element, Ember A11y Testing will
attempt to visually indicate the violation by updating the component's
element `className`.

The class used is determined as follows:

1) If a component's `axeViolationClassNames` property is set, these names will always be used. This provides a way for you to customize the styling of a violation to your own needs.
- `axeViolationClassNames` can be passed in your template, with each name as an element in a space-separated string:
1. If a component's `axeViolationClassNames` property is set, these names will always be used. This provides a way for you to customize the styling of a violation to your own needs.

- `axeViolationClassNames` can be passed in your template, with each name as an element in a space-separated string:

```hbs
{{x-button
id="violations__empty-button"
data-test-selector="empty-button"
axeViolationClassNames="outline outline--red"
}}
```
```hbs
{{x-button
id="violations__empty-button"
data-test-selector="empty-button"
axeViolationClassNames="outline outline--red"
}}
```

- they can also be defined as an array of names within your component:
- they can also be defined as an array of names within your component:

```javascript
axeViolationClassNames: ['outline', 'outline--red']
```
```javascript
axeViolationClassNames: ['outline', 'outline--red'];
```

2) By forgoing custom styling, you can rely on Ember A11y Testing's own set of
default styles. These are set according to a series of configurable
`visualNoiseLevel`s spanning from 1 to 3, and a special styling is applied to element's whose default appearance would require a different set of rules for visibility.
2. By forgoing custom styling, you can rely on Ember A11y Testing's own set of
default styles. These are set according to a series of configurable
`visualNoiseLevel`s spanning from 1 to 3, and a special styling is applied to element's whose default appearance would require a different set of rules for visibility.

```hbs
{{x-button
Expand Down Expand Up @@ -230,7 +228,6 @@ At the same time, a violation error message will be logged to the console with e

![](docs/assets/violation-log-output.png)


##### Special Styling for Background-replaced elements

As mentioned, some HTML elements are considered to be
Expand All @@ -248,7 +245,6 @@ of the component's current noise level:

![](docs/assets/violation-replaced-bg-element.png)


#### Component Hooks

Since development is not a uniform experience, Ember A11y Testing provides
Expand All @@ -275,7 +271,9 @@ As with testing, if you need to set custom auditing options for a component, you
can do so easily. Simply set a value for the `axeOptions` property value:

```javascript
axeOptions: { /* a11yCheck options */ }
axeOptions: {
/* a11yCheck options */
}
```

##### Turning the audit off
Expand All @@ -284,7 +282,7 @@ Lastly, if you really find the audits to be cramping development, you can turn
them off via a simple boolean switch:

```javascript
turnAuditOff: true
turnAuditOff: true;
```

#### Environment Options
Expand All @@ -298,9 +296,9 @@ ENV['ember-a11y-testing'] = {
axeCallback: defaultAxeCallback,
axeOptions: defaultAxeOptions,
visualNoiseLevel: 2,
axeViolationClassNames: ['alert-box', 'alert-box--a11y']
}
}
axeViolationClassNames: ['alert-box', 'alert-box--a11y'],
},
};
```

By example, to enable a specific rule and to set options for a specific check, you can:
Expand Down
18 changes: 8 additions & 10 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ Releases are mostly automated using
[release-it](https://github.com/release-it/release-it/) and
[lerna-changelog](https://github.com/lerna/lerna-changelog/).


## Preparation

Since the majority of the actual release process is automated, the primary
Expand All @@ -18,25 +17,24 @@ guiding principle here is that changelogs are for humans, not machines.

When reviewing merged PR's the labels to be used are:

* breaking - Used when the PR is considered a breaking change.
* enhancement - Used when the PR adds a new feature or enhancement.
* bug - Used when the PR fixes a bug included in a previous release.
* documentation - Used when the PR adds or updates documentation.
* internal - Used for internal changes that still require a mention in the
- breaking - Used when the PR is considered a breaking change.
- enhancement - Used when the PR adds a new feature or enhancement.
- bug - Used when the PR fixes a bug included in a previous release.
- documentation - Used when the PR adds or updates documentation.
- internal - Used for internal changes that still require a mention in the
changelog/release notes.


## Release

Once the prep work is completed, the release itself is straightforward:

* First, ensure that you have installed your projects dependencies:
- First, ensure that you have installed your projects dependencies:

```
yarn install
```

* Second, ensure that you have obtained a
- Second, ensure that you have obtained a
[GitHub personal access token][generate-token] with the `repo` scope (no
other permissions are needed). Make sure the token is available as the
`GITHUB_AUTH` environment variable.
Expand All @@ -49,7 +47,7 @@ yarn install

[generate-token]: https://github.com/settings/tokens/new?scopes=repo&description=GITHUB_AUTH+env+variable

* And last (but not least 😁) do your release.
- And last (but not least 😁) do your release.

```
npx release-it
Expand Down
Loading

0 comments on commit 7af2377

Please sign in to comment.