@@ -35,11 +35,12 @@ export default function getAriaValue(node, attrName, options = {}) {
3535 return null ;
3636 }
3737
38+ const { vNode, domNode } = nodeLookup ( node ) ;
3839 const { type } = attrStandard ;
3940 const { lowercase } = options ;
4041
4142 for ( const { source, getValue } of sources ) {
42- let value = getValue ( node , attrStandard , attrName ) ;
43+ let value = getValue ( vNode , domNode , attrStandard , attrName ) ;
4344 if ( value === null || value === undefined ) {
4445 continue ;
4546 }
@@ -68,8 +69,7 @@ export default function getAriaValue(node, attrName, options = {}) {
6869 return null ;
6970}
7071
71- function getAttributeValue ( node , attrStandard , attrName ) {
72- const { vNode, domNode } = nodeLookup ( node ) ;
72+ function getAttributeValue ( vNode , domNode , attrStandard , attrName ) {
7373 const { type } = attrStandard ;
7474 const value = vNode ? vNode . attr ( attrName ) : domNode . getAttribute ( attrName ) ;
7575
@@ -85,24 +85,28 @@ function getAttributeValue(node, attrStandard, attrName) {
8585 }
8686
8787 // return null for the attribute if the value is empty but the idref(s) prop is not
88- const propValue = getPropertyValue ( node , attrStandard ) ;
88+ const propValue = getPropertyValue ( vNode , domNode , attrStandard ) ;
8989 const propEmpty = Array . isArray ( propValue ) ? propValue . length : ! ! propValue ;
9090 return propEmpty ? null : value ;
9191}
9292
93- function getPropertyValue ( node , attrStandard ) {
94- const { domNode } = nodeLookup ( node ) ;
93+ function getPropertyValue ( vNode , domNode , attrStandard ) {
9594 const { prop } = attrStandard ;
9695 return prop && domNode ? domNode [ prop ] : null ;
9796}
9897
99- function getInternalValue ( node , attrStandard ) {
100- const { vNode, domNode } = nodeLookup ( node ) ;
98+ function getInternalValue ( vNode , domNode , attrStandard ) {
10199 const { prop } = attrStandard ;
102100 if ( ! prop ) {
103101 return null ;
104102 }
105103
104+ // feature flag to enable internals. uses globalThis.axe as it can be run outside of axe context
105+ // TODO: remove when feature is fully enabled
106+ if ( ! axe . _enableElementInternals ) {
107+ return null ;
108+ }
109+
106110 const internals = vNode
107111 ? vNode . elementInternals
108112 : getElementInternals ( domNode ) ;
0 commit comments