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

@krautzource/sre-to-tree

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@krautzource/sre-to-tree - npm Package Compare versions

Comparing version 2.0.1 to 2.0.2

test/blank.js

8

CHANGELOG.md

@@ -5,2 +5,10 @@ # Changelog

### [2.0.2](https://github.com/krautzource/sre-to-tree/compare/v2.0.1...v2.0.2) (2021-11-11)
### Bug Fixes
* add aria-hidden to all treeitems ([5ef4cb5](https://github.com/krautzource/sre-to-tree/commit/5ef4cb554e9fc4a9317a132ec90a2901b739c033)), closes [#27](https://github.com/krautzource/sre-to-tree/issues/27)
* prevent empty aria-label ([f4f1182](https://github.com/krautzource/sre-to-tree/commit/f4f11821d7d56f7b4746434d9de2254e93e910d1)), closes [#26](https://github.com/krautzource/sre-to-tree/issues/26)
### [2.0.1](https://github.com/krautzource/sre-to-tree/compare/v2.0.0...v2.0.1) (2021-04-12)

@@ -7,0 +15,0 @@

3

lib.js

@@ -14,2 +14,3 @@ /**

speech += node.getAttribute('data-semantic-speech');
if (speech === '') speech = 'blank';
node.setAttribute('aria-label', speech);

@@ -22,2 +23,3 @@ if (node.getAttribute('data-semantic-braille'))

node.setAttribute('role', 'treeitem');
node.setAttribute('aria-hidden', 'true');
};

@@ -132,2 +134,3 @@

moveAttribute(skeletonNode, node, 'aria-level');
skeletonNode.removeAttribute('aria-hidden');
skeletonNode.setAttribute('role', 'presentation');

@@ -134,0 +137,0 @@ }

12

package.json
{
"name": "@krautzource/sre-to-tree",
"version": "2.0.1",
"version": "2.0.2",
"description": "Rewritig speech-rule-engine enriched DOM nodes to a labeled WAI ARIA tree",

@@ -28,7 +28,7 @@ "main": "lib.js",

"devDependencies": {
"jsdom": "^16.4.0",
"mathjax-full": "^3.1.2",
"speech-rule-engine": "^3.2.0-beta.4",
"standard-version": "^9.1.1",
"tape": "^5.2.0"
"jsdom": "^18.0.1",
"mathjax-full": "^3.2.0",
"speech-rule-engine": "^4.0.0-beta.2",
"standard-version": "^9.3.2",
"tape": "^5.3.1"
},

@@ -35,0 +35,0 @@ "publishConfig": {

@@ -6,3 +6,3 @@ const test = require('tape');

test('a first few tests', (t) => {
t.plan(5);
t.plan(6);
const out = tex2svg('f(x) = y');

@@ -17,2 +17,3 @@ const svg = out.firstElementChild;

t.ok(svg.getAttribute('aria-label'), 'Root gets non-emtpy data-owns');
t.deepEqual(svg.querySelectorAll('[role="treeitem"]'), svg.querySelectorAll('[aria-hidden="true"]') , 'All treeitems are aria-hidden');
});

@@ -9,3 +9,3 @@ const test = require('tape');

const dom = new JSDOM(
`<!DOCTYPE html><p>Hello world</p><div> <span data-semantic-speech="" data-semantic-owns="2"></span</div>`
`<!DOCTYPE html><p>Hello world</p><div> <span data-semantic-speech="bla" data-semantic-owns="2"></span</div>`
);

@@ -17,3 +17,3 @@ const p = dom.window.document.querySelector('p');

t.equal(processedDiv.getAttribute('data-owns'), '', 'Graceful failure with unexpected markup: cut off tree');
t.equal(processedDiv.getAttribute('aria-label'), '', 'Graceful failure with unexpected markup: label intact');
t.equal(processedDiv.getAttribute('aria-label'), 'bla', 'Graceful failure with unexpected markup: label intact');
});
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