Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

a11y-announcer

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

a11y-announcer - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

.jshintrc

15

addon/components/route-announcer.js

@@ -1,14 +0,17 @@

import Ember from 'ember';
import { alias } from '@ember/object/computed';
import { computed } from '@ember/object';
import { inject as service } from '@ember/service';
import Component from '@ember/component';
import layout from '../templates/components/route-announcer';
export default Ember.Component.extend({
announcer: Ember.inject.service('announcer'),
export default Component.extend({
announcer: service('announcer'),
layout: layout,
classNames: ['screen-reader'],
attributeBindings: ['ariaLive:aria-live'],
ariaLive: Ember.computed('tone', function() {
ariaLive: computed('tone', function() {
return this.get('announcer').getWithDefault('announceTone', 'polite');
}),
tone: Ember.computed.alias('announcer.announceTone'),
message: Ember.computed.alias('announcer.announceMessage')
tone: alias('announcer.announceTone'),
message: alias('announcer.announceMessage')
});

4

addon/services/announcer.js

@@ -1,4 +0,4 @@

import Ember from 'ember';
import Service from '@ember/service';
export default Ember.Service.extend({
export default Service.extend({
message: "has loaded",

@@ -5,0 +5,0 @@ announceMessage: null,

@@ -1,2 +0,4 @@

import Ember from 'ember';
import $ from 'jquery';
import { later, cancel } from '@ember/runloop';
import { inject as service } from '@ember/service';
import Router from '../router';

@@ -6,10 +8,12 @@

name: 'add-announcer-to-router',
initialize: function(app) {
initialize: function() {
Router.reopen({
announcer: Ember.inject.service('announcer'),
announcer: service('announcer'),
didTransition: function() {
this._super(...arguments);
Ember.run.later(this, () => {
let pageTitle = Ember.$('title').html().trim();
this._timerId = later(() => {
if (this.isDestroying || this.isDestroyed) { return; }
let pageTitle = $('title').html().trim();
let serviceMessage = this.get('announcer.message');

@@ -20,2 +24,7 @@ let message = `${pageTitle} ${serviceMessage}`;

}, 100);
},
willDestroy() {
cancel(this._timerId);
this._super();
}

@@ -22,0 +31,0 @@ });

@@ -1,2 +0,2 @@

/*jshint node:true*/
/* eslint-env node */
'use strict';

@@ -3,0 +3,0 @@

@@ -1,2 +0,2 @@

/* jshint node: true */
/* eslint-env node */
'use strict';

@@ -3,0 +3,0 @@

The MIT License (MIT)
Copyright (c) 2016
Copyright (c) 2017

@@ -5,0 +5,0 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

{
"name": "a11y-announcer",
"version": "1.0.2",
"version": "1.0.3",
"description": "An accessible ember route change announcer",
"keywords": [
"ember-addon",
"ember accessibility",
"ember router",
"a11y-announcer"
],
"license": "MIT",
"author": "Robert DeLuca",
"directories": {

@@ -9,43 +17,36 @@ "doc": "doc",

},
"repository": "https://github.com/ember-a11y/a11y-announcer",
"scripts": {
"build": "ember build",
"start": "ember server",
"start": "ember serve",
"test": "ember try:each"
},
"repository": "https://github.com/ember-a11y/a11y-announcer",
"engines": {
"node": ">= 0.10.0"
"dependencies": {
"ember-cli-babel": "^6.6.0",
"ember-cli-htmlbars": "^2.0.1"
},
"author": "Robert DeLuca",
"license": "MIT",
"devDependencies": {
"ember-cli-document-title": "0.2.0",
"ember-cli-github-pages": "0.0.6",
"broccoli-asset-rev": "^2.4.2",
"ember-ajax": "^2.0.1",
"ember-cli": "2.7.0",
"ember-cli-app-version": "^1.0.0",
"ember-cli-dependency-checker": "^1.2.0",
"ember-cli-htmlbars-inline-precompile": "^0.3.1",
"ember-cli-mocha": "0.10.4",
"ember-cli-inject-live-reload": "^1.4.0",
"ember-cli-jshint": "^1.0.0",
"broccoli-asset-rev": "^2.4.5",
"ember-ajax": "^3.0.0",
"ember-cli": "~2.17.0",
"ember-cli-chai": "^0.4.0",
"ember-cli-dependency-checker": "^2.0.0",
"ember-cli-document-title": "0.3.2",
"ember-cli-eslint": "^4.2.1",
"ember-cli-github-pages": "0.1.2",
"ember-cli-htmlbars-inline-precompile": "^1.0.0",
"ember-cli-inject-live-reload": "^1.4.1",
"ember-cli-mocha": "^0.14.4",
"ember-cli-release": "^0.2.9",
"ember-cli-test-loader": "^1.1.0",
"ember-cli-uglify": "^1.2.0",
"ember-disable-prototype-extensions": "^1.1.0",
"ember-export-application-global": "^1.0.5",
"ember-load-initializers": "^0.5.1",
"ember-resolver": "^2.0.3",
"loader.js": "^4.0.1"
"ember-cli-shims": "^1.2.0",
"ember-cli-uglify": "^2.0.0",
"ember-disable-prototype-extensions": "^1.1.2",
"ember-export-application-global": "^2.0.0",
"ember-load-initializers": "^1.0.0",
"ember-resolver": "^4.0.0",
"ember-source": "~2.17.0",
"loader.js": "^4.2.3"
},
"keywords": [
"ember-addon",
"ember accessibility",
"ember router",
"a11y-announcer"
],
"dependencies": {
"ember-cli-htmlbars": "^1.0.3",
"ember-cli-babel": "^5.1.6"
"engines": {
"node": "^4.5 || 6.* || >= 7.*"
},

@@ -52,0 +53,0 @@ "ember-addon": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc