Sha256: 729c9825eb8a653be2f0dc8836024451cc56c12ab257615a9b1385a41f4f6f54
Contents?: true
Size: 697 Bytes
Versions: 271
Compression:
Stored size: 697 Bytes
Contents
/* global aria, dom */ /** * Get an element's owned elements * * @param {VirtualNode} element * @return {VirtualNode[]} Owned elements */ aria.getOwnedVirtual = function getOwned({ actualNode, children }) { if (!actualNode || !children) { throw new Error('getOwnedVirtual requires a virtual node'); } // TODO: Check that the element has a role // TODO: Descend into children with role=presentation|none // TODO: Exclude descendents owned by other elements return dom.idrefs(actualNode, 'aria-owns').reduce((ownedElms, element) => { if (element) { const virtualNode = axe.utils.getNodeFromTree(element); ownedElms.push(virtualNode); } return ownedElms; }, children); };
Version data entries
271 entries across 271 versions & 1 rubygems