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

@wezz/ariatabmanager

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wezz/ariatabmanager - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

29

dist/ariatabmanager.js

@@ -47,3 +47,3 @@ var h = Object.defineProperty;

const e = t.getAttribute("id") + "";
return e ? (console.log("this.controlelements", this.controlelements), this.controlelements.filter((a) => (a.getAttribute("aria-controls") + "").split(" ").indexOf(e) !== -1)) : [];
return e ? this.controlelements.filter((a) => (a.getAttribute("aria-controls") + "").split(" ").indexOf(e) !== -1) : [];
}

@@ -97,4 +97,3 @@ GetARIAControlTargets(t) {

updateButtonState(t, e) {
console.log("updateButtonState(elm", t);
const a = (s, l) => s.hasAttribute(l) ? s.getAttribute(l) : null, i = e.detail.target, n = a(i, "aria-hidden");
const a = (s, d) => s.hasAttribute(d) ? s.getAttribute(d) : null, i = e.detail.target, n = a(i, "aria-hidden");
t.hasAttribute("aria-pressed") && t.setAttribute("aria-pressed", (n === "false") + ""), t.hasAttribute("aria-expanded") && t.setAttribute("aria-expanded", (n === "false") + "");

@@ -109,3 +108,3 @@ }

})
), console.log("relatedControls", e, i), i.forEach((n) => {
), i.forEach((n) => {
n.dispatchEvent(

@@ -162,6 +161,6 @@ this.customEvent("updateButtonState", {

}
class d {
class l {
}
o(d, "AllowNone", "allownone"), o(d, "TabletAccordion", "tabletaccordion"), o(d, "Default", "");
class m {
o(l, "AllowNone", "allownone"), o(l, "TabletAccordion", "tabletaccordion"), o(l, "Default", "");
class A {
constructor(t) {

@@ -220,12 +219,12 @@ o(this, "controlelements", []);

const a = await this.ariaManager.GetARIAControlTargets(e), i = t.getAttribute(this.tabModeAttributeName), n = a[0].id;
if (i === d.TabletAccordion) {
const l = t.hasAttribute(this.tabMediaQueryAttributeName) ? t.getAttribute(this.tabMediaQueryAttributeName) + "" : "only screen and (min-width: 768px)";
if (typeof (window == null ? void 0 : window.matchMedia) < "u" && !window.matchMedia(l).matches)
if (i === l.TabletAccordion) {
const d = t.hasAttribute(this.tabMediaQueryAttributeName) ? t.getAttribute(this.tabMediaQueryAttributeName) + "" : "only screen and (min-width: 768px)";
if (typeof (window == null ? void 0 : window.matchMedia) < "u" && !window.matchMedia(d).matches)
return;
}
this.getTargets(t).filter(
(l) => l.id !== n
).forEach((l) => {
this.ariaManager.AriaHidden(l, !0), this.ariaManager.AriaExpand(l, !1);
}), this.setPageHash(e), this.setContentHeight(t), i !== d.AllowNone && this.displayTarget(a[0], t);
(d) => d.id !== n
).forEach((d) => {
this.ariaManager.AriaHidden(d, !0), this.ariaManager.AriaExpand(d, !1);
}), this.setPageHash(e), this.setContentHeight(t), i !== l.AllowNone && this.displayTarget(a[0], t);
}

@@ -288,3 +287,3 @@ setPageHash(t) {

export {
m as default
A as default
};
{
"name": "@wezz/ariatabmanager",
"version": "1.0.4",
"version": "1.0.5",
"type": "module",

@@ -46,4 +46,4 @@ "main": "./dist/ariatabmanager.umd.cjs",

"dependencies": {
"@wezz/ariamanager": "^1.0.5"
"@wezz/ariamanager": "^1.0.6"
}
}

@@ -51,3 +51,18 @@ # ARIA Tab Manager

## More examples
See [the example html page](https://github.com/wezz/ARIATabManager/blob/main/index.html) for more examples on how to implement the ARIATabManager
## Related packages
### ARIAManager
[ARIAManager](https://github.com/wezz/ARIAManager) is the engine that drives the ARIATabManager. It handles the relationship between ```aria-controls``` elements and their targets.
### [MatchMedia Attribute Manager](https://github.com/wezz/MatchMediaAttributeManager)
Adding a ```aria-hidden``` attribute and not using it for it's intended use is bad for accessibility.<br>
Elements can be visually visible but hidden for users using screenreaders and more.
The MatchMedia Attribute Manager makes it possible to remove or add ```aria-hidden``` depending on a media query.
Use cases can be that you want to show a navigation in desktop, but in mobile it's supposed to be hidden by default and toggled by a button.
## Development & Demo

@@ -54,0 +69,0 @@ Clone this repo

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