Skip to main content

Function: assertAccessibleContract()

function assertAccessibleContract(
contract,
rendered,
opts?
): void;

Defined in: packages/testing/src/a11y.ts:104

Assert that every prop in the accessibility contract reached the rendered control.

const props = field.inputProps;
render(<BeneficiaryLookup field={field} element={el} />);
assertAccessibleContract(props, screen.getByRole('textbox'));

Parameters

ParameterType
contractAccessibleProps
renderedRenderedAttributes
optsAccessibleContractOptions

Returns

void