Sha256: f3329eb2da9e58f2fbfac864cd115c0bb8d6b0b111268f200ee03fecfe34f3b7
Contents?: true
Size: 711 Bytes
Versions: 104
Compression:
Stored size: 711 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(axe._tree[0], element); ownedElms.push(virtualNode); } return ownedElms; }, children); };
Version data entries
104 entries across 104 versions & 1 rubygems