logRoles function Null safety Accessibility

void logRoles(
  1. Node container,
  2. {bool hidden = false}
)

Prints a list of all the implicit ARIA roles within container, each role containing a list of all of the nodes which match that role.

This can be helpful for finding ways to query the DOM under test with ByRole queries.

Set hidden to true to include elements that are normally excluded from the accessibility tree.

Learn more: testing-library.com/docs/dom-testing-library/api-accessibility/#logroles

Implementation

void logRoles(Node container, {bool hidden = false}) =>
    printConsoleLogs(() => _logRoles(container, jsifyAndAllowInterop({'hidden': hidden}) as JsMap));