New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

makeup-roving-tabindex

Package Overview
Dependencies
Maintainers
5
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

makeup-roving-tabindex - npm Package Compare versions

Comparing version 0.2.3 to 0.3.0

30

index.js

@@ -43,4 +43,3 @@ 'use strict';

var modelIndex = this._navigationEmitter.model.index;
this._items.forEach(function (el, index) {
this.filteredItems.forEach(function (el, index) {
return el.setAttribute('tabindex', index !== modelIndex ? '-1' : '0');

@@ -51,5 +50,3 @@ });

function onModelInit(e) {
this._index = e.detail.toIndex; // seems unused internally. scheduled for deletion.
var items = this._items;
var items = e.detail.items;
nodeListToArray(items).filter(function (el, i) {

@@ -66,3 +63,3 @@ return i !== e.detail.toIndex;

var items = this._items;
var items = this.filteredItems;
nodeListToArray(items).filter(function (el, i) {

@@ -77,3 +74,3 @@ return i !== e.detail.toIndex;

function onModelChange(e) {
var items = this._items;
var items = this.filteredItems;
var fromItem = items[e.detail.fromIndex];

@@ -159,2 +156,7 @@ var toItem = items[e.detail.toIndex];

_createClass(LinearRovingTabindex, [{
key: "reset",
value: function reset() {
this._navigationEmitter.model.reset();
}
}, {
key: "destroy",

@@ -176,3 +178,13 @@ value: function destroy() {

this._navigationEmitter.model.options.wrap = newWrap;
} // we cannot use a cached version of the items in question since the DOM may change without notice
}
}, {
key: "filteredItems",
get: function get() {
return this._navigationEmitter.model.filteredItems;
}
}, {
key: "items",
get: function get() {
return this._navigationEmitter.model.items;
} // backwards compat

@@ -182,3 +194,3 @@ }, {

get: function get() {
return this._el.querySelectorAll(this._itemSelector);
return this.items;
}

@@ -185,0 +197,0 @@ }]);

{
"name": "makeup-roving-tabindex",
"description": "Implements a roving tab index on given collection of elements",
"version": "0.2.3",
"version": "0.3.0",
"main": "index.js",

@@ -41,7 +41,7 @@ "repository": "https://github.com/makeup-js/makeup-roving-tabindex.git",

"coveralls": "^3",
"eslint": "^5",
"eslint": "^6",
"eslint-config-ebay": "^1",
"jasmine-core": "^3",
"karma": "^4",
"karma-chrome-launcher": "^2",
"karma-chrome-launcher": "^3",
"karma-coverage": "^1",

@@ -51,3 +51,3 @@ "karma-html-reporter": "~0.2",

"lasso-cli": "^2",
"onchange": "^5",
"onchange": "^6",
"parallelshell": "^3",

@@ -59,3 +59,3 @@ "puppeteer": "^1",

"custom-event-polyfill": "^1",
"makeup-navigation-emitter": "~0.2.2",
"makeup-navigation-emitter": "~0.3.0",
"nodelist-foreach-polyfill": "^1"

@@ -62,0 +62,0 @@ },

@@ -79,6 +79,9 @@ # makeup-roving-tabindex

* `filteredItems`: returns filtered items (e.g. non-hidden items)
* `index`: the index position of the roving tabindex (i.e. the element with tabindex="0")
* `items`: returns all items that match item selector
## Methods
* `reset`: will force a reset to the value specified by `autoReset`
* `destroy`: destroys all event listeners

@@ -85,0 +88,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