Skip to content

1.9.1

Choose a tag to compare

@github-actions github-actions released this 18 Oct 04:06
· 17 commits to master since this release
d12b603

Fixed

  • Every WButton is a button to assistive technology, including one with no callback, and it is not enabled while disabled, loading or without a callback. A button with no onTap, onLongPress or onDoubleTap (the common disabled: !canSubmit, onTap: canSubmit ? submit : null, or onTap: null alone) gave WAnchor nothing to gesture on, and a gestureless anchor publishes no node, so its label read as plain text. It now publishes one button node of its own with enabled: false, labelled by its child text or its semanticLabel, and no tap action; a semanticLabel on such a button used to publish an enabled button. An enabled button keeps the single node WAnchor gives it, and a gestureless WAnchor used for styling still publishes nothing. (lib/src/widgets/w_button.dart, test/widgets/w_button_test.dart)
  • A disabled or loading WButton is still a button, announced as disabled. It handed WAnchor no callbacks while inert, and a gestureless anchor is a styling wrapper that publishes no button node, so screen readers lost the control and Playwright's getByRole('button') found nothing. Visible to dusk: a disabled or loading button now appears in a snapshot as a button with enabled: false and its label (the loadingText while loading), where it used to be absent. The callbacks now reach WAnchor with isDisabled set for loading as well as disabled, so WAnchor's own guard keeps tap, long press, double tap, the activation key and the lifted semantics actions from firing; loading still activates only loading:, not disabled:. A loading button is no longer a Tab stop and no longer lights hover: or focus:, as Material's buttons behave with a null callback. (lib/src/widgets/w_button.dart, test/widgets/w_button_test.dart)
  • A WPopover trigger is one button. The trigger's Semantics now merges its subtree, so the documented WButton(onTap: null) trigger (which now publishes its own disabled button node) folds into the popover's single enabled button named by its label instead of nesting a second one. (lib/src/widgets/w_popover.dart, test/widgets/w_popover_test.dart)
  • A WSelect shows keyboard focus, and a disabled one is skipped by Tab. The trigger lit focus: only while its menu was open, so a keyboard user tabbing through a form saw nothing on the select they had landed on. It now also lights while the trigger holds focus in the traditional (keyboard) highlight mode, so a tap does not ring it. Its Focus node takes canRequestFocus: !disabled, and focus is never active on a disabled select. The trigger publishes its state through WindAnchorStateProvider, as WPopover does, so the WAnchor a focus: class wraps around the trigger div inherits instead of being a second Tab stop that a disabled select kept. (lib/src/widgets/w_select.dart, test/widgets/w_select_test.dart)