All Projects → coyote-labs → Ember Accessibility

coyote-labs / Ember Accessibility

Licence: mit
An EmberJS addon to help identify accessibility violations during development

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Ember Accessibility

ember-foxy-forms
Ember Addon for Making Foxy Forms
Stars: ✭ 27 (-6.9%)
Mutual labels:  ember, emberjs, ember-addon
ember-changeset-conditional-validations
Conditional validations for ember-changeset-validations
Stars: ✭ 26 (-10.34%)
Mutual labels:  ember, emberjs, ember-addon
ember-link
Link primitive to pass around self-contained route references. It's {{link-to}}, but better!
Stars: ✭ 50 (+72.41%)
Mutual labels:  ember, emberjs, ember-addon
ember-on-modifier
Implements the `{{on eventName this.someAction}}` element modifier from https://github.com/emberjs/rfcs/blob/master/text/0471-on-modifier.md
Stars: ✭ 37 (+27.59%)
Mutual labels:  ember, emberjs, ember-addon
ember-deep-tracked
Deep auto-tracking for when you just don't care, and want things to work (at the cost of performance in some situtations)
Stars: ✭ 20 (-31.03%)
Mutual labels:  ember, emberjs, ember-addon
ember-cli-g-maps
Deprecated Google Maps Addon
Stars: ✭ 58 (+100%)
Mutual labels:  ember, emberjs, ember-addon
ember-shadow-dom
Write templates for your components inside of a Shadow DOM root.
Stars: ✭ 26 (-10.34%)
Mutual labels:  ember, emberjs, ember-addon
Ember Styleguide
This is a UI addon that intends to help standardize the Ember family of websites and make it easier to make the Ember website an Ember app.
Stars: ✭ 69 (+137.93%)
Mutual labels:  ember, ember-addon, emberjs
ember-credit-card
"make your credit card form dreamy in one line of code"
Stars: ✭ 89 (+206.9%)
Mutual labels:  ember, emberjs, ember-addon
ember-headlessui
gavinjoyce.github.io/ember-headlessui/
Stars: ✭ 76 (+162.07%)
Mutual labels:  ember, emberjs, ember-addon
ember-cli-string-helpers
Set of the String helpers extracted from DockYard's ember-composable-helpers.
Stars: ✭ 73 (+151.72%)
Mutual labels:  ember, emberjs, ember-addon
ember-render-helpers
Complimentary render template helpers to the render modifiers
Stars: ✭ 19 (-34.48%)
Mutual labels:  ember, emberjs, ember-addon
Ember Cli Addon Docs
Easy, beautiful docs for your OSS Ember addons
Stars: ✭ 162 (+458.62%)
Mutual labels:  ember, ember-addon, emberjs
ember-best-language
🏳 A FastBoot-enabled addon to detect the best language for your user.
Stars: ✭ 18 (-37.93%)
Mutual labels:  ember, emberjs, ember-addon
Ember Cli Bundle Analyzer
Analyze the size and contents of your Ember app's bundles
Stars: ✭ 78 (+168.97%)
Mutual labels:  ember, ember-addon, emberjs
ember-event-helpers
Complimentary event template helpers to the {{on}} modifier
Stars: ✭ 33 (+13.79%)
Mutual labels:  ember, emberjs, ember-addon
Docfy
Build fully personalized documentation sites; write content and demos in Markdown.
Stars: ✭ 48 (+65.52%)
Mutual labels:  ember, ember-addon, emberjs
Ember Cli Foundation 6 Sass
Stars: ✭ 65 (+124.14%)
Mutual labels:  ember, ember-addon, emberjs
glimmer-apollo
Ember and Glimmer integration for Apollo Client.
Stars: ✭ 32 (+10.34%)
Mutual labels:  ember, emberjs, ember-addon
ember-gridstack
Ember components to build drag-and-drop multi-column grids powered by gridstack.js
Stars: ✭ 31 (+6.9%)
Mutual labels:  ember, emberjs, ember-addon

ember-accessibility

Latest npm release TravisCI Build Status

An EmberJS addon to help identify accessibility violations.

This addon uses the axe-core library to audit your apps.

DEMO

Compatibility

  • Ember.js v2.18 or above
  • Ember CLI v2.13 or above
  • Node.js v8 or above

Installation

ember install @coyote-labs/ember-accessibility

Usage

  • In your application template, include the AccessibilityTester component. For example,

    <h1>Welcome to my app!</h1>
    <AccessibilityTester />
    
  • In your config/environment.js, provide an ember-accessibility object that has the following fields.

    isEnabled: Defaults to false. You can set it to environment === 'development'. This addon's code will be stripped unless this is set to true.

    axe: Allows configuring axe-core. Refer axe-core's documentation.

    // config/environment.js
    let ENV = {
      'ember-accessibility': {
        isEnabled: environment === 'development',
        axe: {
          restoreScroll: true
        }
      }
    };
    
  • Click on the Check Accessiblity button that appears when you visit the app.

  • If you want to change the default position of the toggle, pass top and left position values to the AccessibilityTester component.

    Note: Values are in pixels.

    For example,

    <h1>Welcome to my app!</h1>
    <AccessibilityTester @top="25" @left="750"/>
    
  • Fix the errors that are displayed and make your app accessible!

    Using Accessibility Tester

Using in engines

  • Make sure you add ember-accessibility to the engine's dependencies.
  • Add the accessibility-test service to your engine's dependencies in app.js.

Using in test

  • Import the auditAccessibility() helper from '@coyote-labs/ember-accessibility/test-support/audit'; and then invoke it where needed.

Note: The config passed in config/environment.js will be applied here as well.

Acceptance Tests
import auditAccessibility from '@coyote-labs/ember-accessibility/test-support/audit';

test('Checks accessibility violations', function(assert) {
  visit('/');
  assert.notOk(await auditAccessibility());
});

Or, you can pass any selector or element from the visited page.

import auditAccessibility from '@coyote-labs/ember-accessibility/test-support/audit';

test('Checks accessibility violations', function(assert) {
  visit('/');
  assert.notOk(await auditAccessibility('#someID'));
});
Integration / Unit Tests
import auditAccessibility from '@coyote-labs/ember-accessibility/test-support/audit';

test('Checks accessibility violations in component', function(assert) {
  await render(hbs`<AccessibilityTester />`);  
  assert.notOk(await auditAccessibility(this.element));
});

How is this different from ember-a11y-testing?

ember-a11y-testing is primarily geared towards testing as of now. While this will most definitely change, we wanted something that will provide contextual and meaningful feedback to developers during the development phase itself.

For example, here is how ember-a11y-testing looks in development currently.

ember-a11y-testing screenshot

Notice how all the errors are present on the console. This addon on the other hand will make it easier to comprehend those errors.

ember-accessibility screenshot

Another major reason that we wrote this addon is because our tests became extremely slow when using ember-a11y-testing. This is a major pain point when using it on large projects. By doing a11y testing in development and review phases, we were able to avoid that.

Contributing

See the Contributing guide for details.

License

This project is licensed under the MIT License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].