lib/commons/text/accessible-text-virtual.js
function prepareContext(virtualNode, context) {
	const { actualNode } = virtualNode;
	if (!context.startNode) {
		context = { startNode: virtualNode, ...context };
	}
	/**
	 * When `aria-labelledby` directly references a `hidden` element
	 * the element needs to be included in the accessible name.
	 *
	 * When a descendent of the `aria-labelledby` reference is `hidden`
	 * the element should not be included in the accessible name.
	 *
	 * This is done by setting `includeHidden` for the `aria-labelledby` reference.
	 */
	if (
		actualNode.nodeType === 1 &&
		context.inLabelledByContext &&
		context.includeHidden === undefined
	) {
		context = {
			includeHidden: !dom.isVisible(actualNode, true),
			...context
		};
	}
	return context;
}
function prepareContext(virtualNode, context) {
	const { actualNode } = virtualNode;
	if (!context.startNode) {
		context = { startNode: virtualNode, ...context };
	}
	/**
	 * When `aria-labelledby` directly references a `hidden` element
	 * the element needs to be included in the accessible name.
	 *
	 * When a descendent of the `aria-labelledby` reference is `hidden`
	 * the element should not be included in the accessible name.
	 *
	 * This is done by setting `includeHidden` for the `aria-labelledby` reference.
	 */
	if (
		actualNode.nodeType === 1 &&
		context.inLabelledByContext &&
		context.includeHidden === undefined
	) {
		context = {
			includeHidden: !dom.isVisible(actualNode, true),
			...context
		};
	}
	return context;
}
function prepareContext ( virtualNode , context ) { const { actualNode } = virtualNode ; if ( ! context . startNode ) { context = { startNode : virtualNode , ... context } ; } /**
	 * When `aria-labelledby` directly references a `hidden` element
	 * the element needs to be included in the accessible name.
	 *
	 * When a descendent of the `aria-labelledby` reference is `hidden`
	 * the element should not be included in the accessible name.
	 *
	 * This is done by setting `includeHidden` for the `aria-labelledby` reference.
	 */ if ( actualNode . nodeType === 1 && context . inLabelledByContext && context . includeHidden === undefined ) { context = { includeHidden : ! dom . isVisible ( actualNode , true ) , ... context } ; } return context ; }
Apply defaults to the context
@param {VirtualNode} element
@param {Object} context
@return {Object} context object with defaults applied
Apply defaults to the context