Commit Graph

9559 Commits

Author SHA1 Message Date
Christopher Allen 0ac56616a5 fix(build): Rename chunk exporter's dir + filenames to "exporters"
For consistency with code and docs, call the files that contain code
which retrieves the chunks' export objects "chunk exporters", since
"chunk exports" better describes the objects being exported.
2026-06-08 17:10:59 +01:00
Christopher Allen c916c8f1ac cleanup(build): Reorder new chunk-exporters-related code
Reorder the new code that generates the chunk exporters, to put
it together with (but before) the code that generates the chunk
wrappers, since the two are closely coupled.
2026-06-08 16:16:29 +01:00
Christopher Allen e91613d909 docs(build): Improve JSDocs + inline comments
Note that some comments have been deleted without replacement;
these made statements which are no longer true.
2026-06-08 16:09:49 +01:00
Christopher Allen fa278a84d4 cleanup(build): Minor naming improvements 2026-06-08 16:07:48 +01:00
Christopher Allen 52bc27a3f3 refactor(build): Use a separate property for each chunk's exports
The existing code results in each chunk overwriting the same
well-known property ($.__chunkExports__).  Since these properties
are only expected to be read once, in the same chunk's wrapper's
factory function, this isn't strictly wrong - but it made
understanding the minified bundles produced by PR #9912 a bit
confusing.
2026-06-08 16:05:21 +01:00
Christopher Allen 4afab1d054 refactor(build): Separate chunk exporter creation from compilation
Since the chunk export files are source files to Closure Compiler,
separate the creation of the former from the invocation of the
latter.  Specifically:

- Rename writeChunkExportFiles to buildChunkExporters.
- Invoked as a separate task in the minify series, instead of
  calling it directly from buildCompiled.
- Revert the changes to buildCompiled that made it an async
  function just so it could call writeChunkExportFiles.
2026-06-08 15:41:54 +01:00
Aaron Dodson cfa3dfd961 feat: Enable assume_function_wrapper build flag 2026-05-21 14:12:42 -07:00
Aaron Dodson a04da67bc9 chore: Format build_tasks.mjs 2026-05-21 13:36:16 -07:00
Aaron Dodson f054cb95da fix: Correctly position blocks dragged by the mouse from the flyout (#9919)
* fix: Correctly position blocks dragged by the mouse from the flyout

* fix: Fix incidental test breakage
2026-05-21 12:00:53 -07:00
Aaron Dodson 715e119d2d feat: Announce usage hints to screenreaders on initial workspace focus (#9871)
* feat: Announce usage hints to screenreaders on initial workspace focus

* fix: Improve robustness of tests

* fix: Fix merge

* fix: Don't announce screenreader usage on first focus of every workspace

* fix: Fix test
2026-05-21 10:01:20 -07:00
Aaron Dodson e66dac5ffd fix: Improve initial block placement (#9903)
* fix: Improve initial block placement

* chore: Remove unused arg

* chore: Clarify variable names
2026-05-21 09:03:31 -07:00
Aaron Dodson 372af5e7b0 fix: Fix resolution of parent toolbox category for block descriptions (#9891)
* fix: Fix resolution of parent toolbox category for block descriptions

* fix: Fix tests
2026-05-21 08:10:39 -07:00
Aaron Dodson 86d634cc7f fix: Fix bug that caused blocks to skip valid destinations when moving with looping disabled (#9894)
* fix: Fix bug that caused blocks to skip valid destinations when moving with looping disabled

* chore: Remove errant logging
2026-05-21 08:10:20 -07:00
Michael Harvey 2b793a8784 feat: Add custom input labels to built in blocks (#9902)
* feat: Add custom input labels to built in blocks

* feat: Add custom input labels to built in list blocks

* fix: replace 'command' with 'statement' in new translation docs

* fix: remove some labels
2026-05-21 09:55:51 -04:00
Robert Knight d03f848671 fix: Block labels should not use custom input labels (nested inputs) (#9916)
* fix: Block labels should not use custom input labels (nested inputs)

* Join inputs with comma
2026-05-21 09:27:31 -04:00
Michael Harvey d4930b4540 feat: allow chaining with setAriaLabelProvider (#9913) 2026-05-20 19:27:41 -04:00
Robert Knight d7172452e2 fix: Don't prepend "begin stack" to blocks inserted from the flyout (#9911)
* fix: Don't prepend "begin stack" to blocks inserted from the flyout

* Switch block.workspace.isDragging for block.isDragging
2026-05-20 16:36:17 -04:00
Maribeth Moffatt b996259a0d fix: replace 'command' with 'statement' for block descriptions (#9912) 2026-05-20 16:31:38 -04:00
Matt Hillsdon 6a6871ea54 fix: CSS back to <style> for Safari/cascade reasons (#9908)
Reverts the storage mechanism introduced in #9611 (constructable
stylesheets via `adoptedStyleSheets`) while keeping the per-root
injection-site tracking that #9611 added for shadow-DOM support.

Motivations:

- Safari 15.4 compatibility. `new CSSStyleSheet()` and
  `adoptedStyleSheets` require Safari 16.4+
- Cascade order. `adoptedStyleSheets` apply after `<style>`/`<link>`
  elements in the document, so Blockly's defaults silently overrode
  host stylesheets. Prepending a `<style>` to the head (or to the
  shadow root) restores the pre-#9611 behavior where any author
  stylesheet declared later wins on specificity ties.

Trade-offs:

- Per-shadow-root CSS text is duplicated rather than shared via a
  single adopted sheet object. Negligible for typical use.
- `Css.register()` calls made after the first `inject()` no longer
  reach already-injected roots (same as #9611's behavior); subsequent
  `inject()` calls into other roots still pick them up. Web-component
  consumers can legitimately register late, so this is preferred to
  reinstating the pre-#9611 throw.

Fixes #9876
2026-05-20 14:54:09 -04:00
Robert Knight 8bf2e1ed12 fix: Reinstate "moving on workspace" announcements (#9904) 2026-05-20 07:47:37 -07:00
Aaron Dodson a34d95d9a5 fix: Fix visual glitch when dragging blocks (#9901) 2026-05-19 13:34:07 -07:00
Sheita 2f1acb3ef1 fix(blocks): use static tooltip for controls_ifelse block (#9897)
The controls_ifelse block was using the controls_if_tooltip dynamic
extension, which reads this.elseifCount_ and this.elseCount_ set by
the controls_if_mutator. Since controls_ifelse has no mutator, both
counts are undefined and the extension always returned TOOLTIP_1 (for
a simple if), instead of TOOLTIP_2 (for if/else).

The static tooltip already declared on the block was unreachable
because of a typo (BKYCONTROLS_IF_TOOLTIP_2 was missing the underscore
after BKY) and would have been overridden by the extension anyway.

Fix the message key typo and drop the extension so the static
TOOLTIP_2 string is displayed instead.

Fixes #9813

Signed-off-by: sheitabrk <44614193+sheitabrk@users.noreply.github.com>
2026-05-19 08:11:16 -07:00
github-actions[bot] b6d8ed6317 release: v13.0.0-beta.5 blockly-v13.0.0-beta.5 2026-05-18 21:03:36 +00:00
Aaron Dodson 6066f5a61e fix: Don't open the devtools in Firefox when toggling screenreader mode (#9892) 2026-05-18 13:54:45 -07:00
Rachel Fenichel a36187e617 Keyboard shortcuts doc (#9895)
* chore(docs): update keyboard shortcut page for v13

* chore(docs): update nesting on keyboard nav documentation

* chore(docs): remove references to META keycode in favor of CTRL_CMD
2026-05-18 13:18:12 -07:00
Rachel Fenichel f13729b34d chore(docs): add documentation about keyboard shortcut hints in context menus (#9893)
* chore(docs): add documentation about keyboard shortcuts in context menus

* chore(docs): add note about page zoom
2026-05-18 12:24:08 -07:00
Aaron Dodson c1e8d85d99 fix: Fix undefined message references (#9888) 2026-05-18 10:02:58 -07:00
Aaron Dodson 82fbcd6663 fix: Beep when attempting to move past a dead end (#9890) 2026-05-18 09:58:56 -07:00
lizschwab 8f4f832c1a feat: Adjacent label fields are combined when composing ARIA labels (#9873)
* feat: Adjacent label fields are combined when composing ARIA labels

* removed unneacessary else block
2026-05-18 09:36:33 -07:00
Michael Harvey dd91830d72 fix: Block labels should not use custom input labels (#9886) 2026-05-18 11:14:46 -04:00
Michael Harvey 4771cd473b feat: Add custom ARIA labels to built-in block dropdown field options (#9880) 2026-05-15 14:48:47 -04:00
Maribeth Moffatt 3c79e6cc49 feat!: add shortcuts to navigate between headings in the flyout (#9874)
* feat!: add shortcuts to jump between headings in the flyout

* feat: show a hint if user presses enter on flyout label
2026-05-15 14:29:51 -04:00
Maribeth Moffatt 3d18026767 chore: fix playground loading and formatting (#9879)
* chore: fix playground loading and formatting

* chore: update eslint rules for new rule
2026-05-15 14:13:03 -04:00
Aaron Dodson 6541bb019d fix: Fix package-lock.json for CI (#9875)
* fix: Maybe fix package-lock.json

* fix: Try to fix package-lock.json again

* chore: Fix format/lint
2026-05-15 12:50:56 -04:00
github-actions[bot] b003ab9bd8 release: v13.0.0-beta.4 blockly-v13.0.0-beta.4 2026-05-14 20:17:42 +00:00
Aaron Dodson 591779becc chore: Update all deps to latest (#9872)
* chore: Update all deps to latest

* fix: Possibly fix closure compiler
2026-05-14 13:06:46 -07:00
Aaron Dodson 799965fa22 feat!: Add keyboard shortcut to toggle screenreader mode (#9869)
* feat!: Add keyboard shortcut to toggle screenreader mode

* chore: Run formatter

* chore: Fix lint

* fix: Announce screenreader mode changes via toast

* chore: Adjust naming
2026-05-14 09:41:39 -07:00
Maribeth Moffatt 53b75a99a8 fix!: update default media location (#9870)
* fix!: update default media location

* chore: update docs
2026-05-14 12:18:14 -04:00
Michael Harvey 463f95eaac fix: labels for multi-statement blocks (#9868)
* fix: labels for multi-statement blocks

* chore: re-add message after merge conflict
2026-05-14 09:11:31 -04:00
Rachel Fenichel 6513d08aeb chore(docs): Update explanation of keyboard navigation (#9833)
* chore(docs): Update explanation of keyboard navigation

* chore(docs): add compliance info for keyboard nav

* chore(docs): refer to command and control instead of meta
2026-05-13 21:27:07 +00:00
Maribeth Moffatt 5a63e9961b feat: add aria labels for connections (#9862)
* feat: add aria labels for connections

* chore: add tests

* chore: fix tests

* chore: typo
2026-05-13 20:57:43 +00:00
Maribeth Moffatt c8e0700fcd feat: use custom labels for block parent input labels (#9867) 2026-05-13 16:46:17 -04:00
Aaron Dodson 057356fe10 feat!: Improve context announcement keyboard shortcuts (#9863)
* fix: Improve context announcement keyboard shortcuts

* test: Add tests

* fix: Don't use custom input labels

* fix: Use messages

* chore: Run formatter

* refactor: Improve organization of information announcement shortcut
2026-05-13 11:33:18 -07:00
lizschwab e32ef656bd fix: Block-level ARIA labels no longer include clickable image descri… (#9844)
* fix: Block-level ARIA labels no longer include clickable image descriptions

* fixed merge conflicts, added/updated tests
2026-05-12 13:38:31 -07:00
Aaron Dodson 83f2c9be36 fix: Improve display of focus rings on workspace controls (#9860)
* fix: Improve display of focus rings on workspace controls

* fix: Supress default outlines
2026-05-12 13:34:12 -07:00
Michael Harvey ae055a460d fix!: Flyout follows toolbox in DOM (#9849) 2026-05-11 19:40:04 -04:00
Michael Harvey aa1ec1ede2 fix: skip empty label fields and dummy/end row inputs for move announcements (#9847)
* fix: insert custom input label before children

* fix: do not add empty field labels to block label

* fix: revert ariaLabelProvider changes

* fix: add override designation

* fix: update test after merge conflict
2026-05-11 19:39:33 -04:00
Michael Harvey 5b9dd54850 fix: always store initial drag connections (#9851) 2026-05-11 19:38:12 -04:00
Aaron Dodson 9e1aecc068 fix: Fix bug that could cause blocks to be inadvertently deleted (#9859) 2026-05-11 15:30:15 -07:00
Aaron Dodson 7bbfc69ec6 fix: Fix positioning of keyboard-driven workspace context menu in RTL (#9858) 2026-05-11 15:29:57 -07:00