Skip to content

Commit

Permalink
Reformat accessibility helpers
Browse files Browse the repository at this point in the history
  • Loading branch information
sydneyjodon-wk committed Nov 15, 2023
1 parent afbcab2 commit a02b547
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions lib/src/dom/accessibility_helpers.dart
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,8 @@ import 'package:react_testing_library/src/util/console_log_utils.dart';
/// > Learn more: <https://testing-library.com/docs/dom-testing-library/api-accessibility/#getroles>
///
/// {@category Accessibility}
Map<String, List> getRoles(Node container, {bool hidden = false}) {
return Map.from(JsBackedMap.fromJs(_getRoles(container, jsifyAndAllowInterop({'hidden': hidden}) as JsMap)));
}
Map<String, List> getRoles(Node container, {bool hidden = false}) =>
Map.from(JsBackedMap.fromJs(_getRoles(container, jsifyAndAllowInterop({'hidden': hidden}) as JsMap)));

/// 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.
Expand All @@ -46,9 +45,8 @@ Map<String, List> getRoles(Node container, {bool hidden = false}) {
/// > Learn more: <https://testing-library.com/docs/dom-testing-library/api-accessibility/#logroles>
///
/// {@category Accessibility}
void logRoles(Node container, {bool hidden = false}) {
printConsoleLogs(() => _logRoles(container, jsifyAndAllowInterop({'hidden': hidden}) as JsMap));
}
void logRoles(Node container, {bool hidden = false}) =>
printConsoleLogs(() => _logRoles(container, jsifyAndAllowInterop({'hidden': hidden}) as JsMap));

@JS('rtl.getRoles')
external JsMap _getRoles(
Expand Down

0 comments on commit a02b547

Please sign in to comment.