defaultCssSelectorAllowlist constant

List<String> const defaultCssSelectorAllowlist

Default cssSelectorAllowlist used when one is not supplied.

Flutter web renders interactive widgets into the accessibility semantics tree as <flt-semantics> nodes carrying ARIA roles rather than native HTML tags, so the Browser SDK's tag-based defaults (a, button, input, …) never match Flutter UI and nothing is captured. This list mirrors the common interactive tags and adds the semantic-role selectors Flutter emits so opting in captures Flutter widgets out of the box. Override cssSelectorAllowlist to tune it (pass cssSelectorAllowlist: null to fall back to the Browser SDK's own default instead).

Implementation

static const List<String> defaultCssSelectorAllowlist = [
  // Standard interactive HTML elements (Browser SDK defaults).
  'a',
  'button',
  'input',
  'select',
  'textarea',
  'label',
  // Flutter accessibility-tree roles.
  '[role="button"]',
  '[role="link"]',
  '[role="checkbox"]',
  '[role="radio"]',
  '[role="switch"]',
  '[role="tab"]',
  '[role="menuitem"]',
  '[role="textbox"]',
];