lib/commons/text/native-text-alternative.js
function findTextMethods(virtualNode) {
	const { nativeElementType, nativeTextMethods } = text;
	const nativeType = nativeElementType.find(({ matches }) => {
		return axe.commons.matches(virtualNode, matches);
	});

	// Use concat because namingMethods can be a string or an array of strings
	const methods = nativeType ? [].concat(nativeType.namingMethods) : [];

	return methods.map(methodName => nativeTextMethods[methodName]);
}
function findTextMethods(virtualNode) {
	const { nativeElementType, nativeTextMethods } = text;
	const nativeType = nativeElementType.find(({ matches }) => {
		return axe.commons.matches(virtualNode, matches);
	});

	// Use concat because namingMethods can be a string or an array of strings
	const methods = nativeType ? [].concat(nativeType.namingMethods) : [];

	return methods.map(methodName => nativeTextMethods[methodName]);
}
function findTextMethods ( virtualNode ) { const { nativeElementType , nativeTextMethods } = text ; const nativeType = nativeElementType . find ( ( { matches } ) => { return axe . commons . matches ( virtualNode , matches ) ; } ) ; // Use concat because namingMethods can be a string or an array of strings const methods = nativeType ? [ ] . concat ( nativeType . namingMethods ) : [ ] ; return methods . map ( methodName => nativeTextMethods [ methodName ] ) ; }
Get accessible text functions for a specific native HTML element
@private
@param {VirtualNode} element
@return {Function[]} Array of native accessible name computation methods
Get accessible text functions for a specific native HTML element