Giter VIP home page Giter VIP logo

ember-a11y-landmarks's Introduction

ember-a11y

Build Status npm version Ember Observer Score Code Climate

This Ember addon provides a {{focusing-outlet}} component which you can use in place of normal {{outlet}}s.

The current implementation of this addon will immediately apply focus to the most relevant piece of content based on actions users take (clicking buttons, links, etc). This allows screen readers to catch changes and read the right information, thus providing a much better experience for screen reader users.

Usage

ember install ember-a11y

In your templates you would then swap in {{focusing-outlet}} for {{outlet}} wherever it may occur.

You also need to ensure that your application's router is not set to use locationType: 'hash'. Set ENV.locationType appropriately inside of config/environment.js.

Note about ember-getowner-polyfill

If you are using Ember 2.3.0-beta+ you should add ember-getowner-polyfill to your blacklist in ember-cli-build.js:

var app = new EmberAddon(defaults, {
  addons: {
    blacklist: ['ember-getowner-polyfill']
  }
});

Demo Application

Included in this addon is a demo application for testing ember-a11y.

You can access it through Github Pages or build it from source files with the following steps:

Using a Screen Reader

Many of the examples in the demo app are meant to be used alongside a screen reader. A few of our suggestions:

Commands

  • npm run test - Run all tests.
  • npm run demo - Publish an updated demo app.

ember-a11y-landmarks's People

Contributors

dependabot-preview[bot] avatar ember-tomster avatar endangeredmassa avatar jenweber avatar kamikillerto avatar kmillns avatar melsumner avatar rajasegar avatar rwjblue avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ember-a11y-landmarks's Issues

Add integration tests, documentation, github page

Heya @MelSumner. Lovely addon. Just thought I'd leave an issue here to remind myself to add some stuff this weekend when I circle back. Let me know if I'm overlapping with anything you were going to do.

  • integration tests
  • update documentation
  • github page with dummy app and code snippets

Handle complexities for footer/contentinfo landmark

The HTML5 footer element is not considered a contentinfo landmark when it is descendant of any of following elements:

  • article

  • aside

  • main

  • nav

  • section

  • To make this better for Ember applications, we should ensure that the contentinfo landmark is used appropriately. There may be some conversation/thought needed around how opinionated this addon wants to be regarding footer HTML element use.

Add support for aria-label

Since an aria-label can be added to a landmark role, support should be provided to provide that value with the component.

Post Octane migration cleanup

These are some the things identified for post migration to Octane version:

  • Update Readme for Angle brackets syntax
  • Update tests for Angle brackets syntax
  • Remove .travis.yml since we already have Github Actions, it will be redundant
  • Setup automated release process using create-rwjblue-release-it-setup

Address failing tests in CI

The component unit tests are failing in Travis due to this error

/home/travis/build/ember-a11y/ember-a11y-landmarks/tests/unit/components/a11y-landmark-test.js

  70:51  error  Unnecessary escape character: \"  no-useless-escape

  70:76  error  Unnecessary escape character: \"  no-useless-escape

The fix would be to remove the quotes in this line

const expectedErrorMessage = 'Invalid tagName \"someInvalidLandmarkRole\". Must be one of application, banner, complementary, contentinfo, document, main, navigation, region, search.';

if role=search, only allow tagName=form

Expected:
an error should be thrown if the role=search and the tagName is not form.

Actual:
no error is thrown and the item renders.

Screenshots
code:
image
rendered:
image

Handle role="documentation"

the documentation and application roles should be handled correctly:

  • add documentation as a valid landmark role
  • role="documentation" should have a check for it's placement with role="application"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.