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

@polymer/iron-a11y-keys-behavior

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@polymer/iron-a11y-keys-behavior - npm Package Compare versions

Comparing version 3.0.0-pre.4 to 3.0.0-pre.6

9

demo/x-key-aware.js

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

import { html } from '../../polymer/polymer.js';
import { IronA11yKeysBehavior } from '../iron-a11y-keys-behavior.js';
import { Polymer } from '../../polymer/lib/legacy/polymer-fn.js';
import '../../polymer/polymer.js';
import '../iron-a11y-keys-behavior.js';
/**

@@ -14,3 +13,3 @@ @license

Polymer({
_template: html`
_template: Polymer.html`
<style>

@@ -52,3 +51,3 @@ :host {

behaviors: [
IronA11yKeysBehavior
Polymer.IronA11yKeysBehavior
],

@@ -55,0 +54,0 @@

@@ -222,3 +222,39 @@ import '../polymer/polymer.js';

export const IronA11yKeysBehavior = {
/**
* `Polymer.IronA11yKeysBehavior` provides a normalized interface for processing
* keyboard commands that pertain to [WAI-ARIA best practices](http://www.w3.org/TR/wai-aria-practices/#kbd_general_binding).
* The element takes care of browser differences with respect to Keyboard events
* and uses an expressive syntax to filter key presses.
*
* Use the `keyBindings` prototype property to express what combination of keys
* will trigger the callback. A key binding has the format
* `"KEY+MODIFIER:EVENT": "callback"` (`"KEY": "callback"` or
* `"KEY:EVENT": "callback"` are valid as well). Some examples:
*
* keyBindings: {
* 'space': '_onKeydown', // same as 'space:keydown'
* 'shift+tab': '_onKeydown',
* 'enter:keypress': '_onKeypress',
* 'esc:keyup': '_onKeyup'
* }
*
* The callback will receive with an event containing the following information in `event.detail`:
*
* _onKeydown: function(event) {
* console.log(event.detail.combo); // KEY+MODIFIER, e.g. "shift+tab"
* console.log(event.detail.key); // KEY only, e.g. "tab"
* console.log(event.detail.event); // EVENT, e.g. "keydown"
* console.log(event.detail.keyboardEvent); // the original KeyboardEvent
* }
*
* Use the `keyEventTarget` attribute to set up event handlers on a specific
* node.
*
* See the [demo source code](https://github.com/PolymerElements/iron-a11y-keys-behavior/blob/master/demo/x-key-aware.html)
* for an example.
*
* @demo demo/index.html
* @polymerBehavior
*/
Polymer.IronA11yKeysBehavior = {
properties: {

@@ -225,0 +261,0 @@ /**

{
"name": "@polymer/iron-a11y-keys-behavior",
"flat": true,
"version": "3.0.0-pre.4",
"version": "3.0.0-pre.6",
"description": "A behavior that enables keybindings for greater a11y.",

@@ -23,10 +23,10 @@ "contributors": [

"dependencies": {
"@polymer/polymer": "^3.0.0-pre.4"
"@polymer/polymer": "^3.0.0-pre.6"
},
"devDependencies": {
"@polymer/iron-demo-helpers": "^3.0.0-pre.4",
"@polymer/iron-component-page": "^3.0.0-pre.4",
"@polymer/iron-test-helpers": "^3.0.0-pre.4",
"@polymer/test-fixture": "^3.0.0-pre.4",
"wct-browser-legacy": "0.0.1-pre.10",
"@polymer/iron-demo-helpers": "^3.0.0-pre.6",
"@polymer/iron-component-page": "^3.0.0-pre.6",
"@polymer/iron-test-helpers": "^3.0.0-pre.6",
"@polymer/test-fixture": "^3.0.0-pre.6",
"wct-browser-legacy": "0.0.1-pre.11",
"@webcomponents/webcomponentsjs": "^1.0.0"

@@ -33,0 +33,0 @@ },

Sorry, the diff of this file is not supported yet

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