dom-accessibility-api
Advanced tools
Comparing version 0.5.13 to 0.5.14
# dom-accessibility-api changelog | ||
## 0.5.14 | ||
### Patch Changes | ||
- [#827](https://github.com/eps1lon/dom-accessibility-api/pull/827) [`a1daca5`](https://github.com/eps1lon/dom-accessibility-api/commit/a1daca5576553faddd147742829338ee348b804c) Thanks [@nolanlawson](https://github.com/nolanlawson)! - Follow aria-labelledby and aria-describedby if they point to elements in the same shadow root. | ||
## 0.5.13 | ||
@@ -4,0 +10,0 @@ |
@@ -104,5 +104,7 @@ "use strict"; | ||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- safe due to hasAttribute check | ||
var ids = node.getAttribute(attributeName).split(" "); | ||
var ids = node.getAttribute(attributeName).split(" "); // Browsers that don't support shadow DOM won't have getRootNode | ||
var root = node.getRootNode ? node.getRootNode() : node.ownerDocument; | ||
return ids.map(function (id) { | ||
return node.ownerDocument.getElementById(id); | ||
return root.getElementById(id); | ||
}).filter(function (element) { | ||
@@ -109,0 +111,0 @@ return element !== null; |
{ | ||
"name": "dom-accessibility-api", | ||
"description": "Implements https://w3c.github.io/accname/", | ||
"version": "0.5.13", | ||
"version": "0.5.14", | ||
"main": "dist/index.js", | ||
@@ -66,3 +66,3 @@ "module": "dist/index.mjs", | ||
"jsdom": "^19.0.0", | ||
"minimatch": "^3.0.4", | ||
"minimatch": "^5.0.0", | ||
"mocha": "^9.0.0", | ||
@@ -69,0 +69,0 @@ "mocha-sugar-free": "^1.4.0", |
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
269038
2127