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

dom-accessibility-api

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dom-accessibility-api - npm Package Compare versions

Comparing version 0.5.12 to 0.5.13

17

CHANGELOG.md
# dom-accessibility-api changelog
## 0.5.13
### Patch Changes
- [#811](https://github.com/eps1lon/dom-accessibility-api/pull/811) [`5b0f48e`](https://github.com/eps1lon/dom-accessibility-api/commit/5b0f48e0668f77458396723751db498ba74d5686) Thanks [@eps1lon](https://github.com/eps1lon)! - Prefer button subtree over `title` attribute.
```diff
const name = computeAccessibleName(<button title="from-title">from-content</button>);
-'from-title' === name
+'from-content' === name
```
`<button title="from-title">from-content</button>` would previously compute the accessible name "from-title".
This is correct in ACCNAME 1.2 but is changed in the latest editors draft.
The latest editors draft specifically refers to HTML-AAM which says that the subtree should take precedent over the `title` attribute.
`computeAccessibleName` now calculates "from-content" as the accessible name.
## 0.5.12

@@ -4,0 +21,0 @@

16

dist/accessible-name-and-description.js

@@ -312,3 +312,3 @@ "use strict";

return accumulatedText;
return accumulatedText.trim();
}

@@ -457,2 +457,16 @@

if ((0, _util.hasAnyConcreteRoles)(node, ["button"])) {
// https://www.w3.org/TR/html-aam-1.0/#button-element
var nameFromSubTree = computeMiscTextAlternative(node, {
isEmbeddedInLabel: false,
isReferenced: false
});
if (nameFromSubTree !== "") {
return nameFromSubTree;
}
return useAttribute(node, "title");
}
return useAttribute(node, "title");

@@ -459,0 +473,0 @@ }

2

package.json
{
"name": "dom-accessibility-api",
"description": "Implements https://w3c.github.io/accname/",
"version": "0.5.12",
"version": "0.5.13",
"main": "dist/index.js",

@@ -6,0 +6,0 @@ "module": "dist/index.mjs",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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