From 4fe25d9071d97dcdb8de24155b529bffb39b4e59 Mon Sep 17 00:00:00 2001 From: Aaron Dodson Date: Fri, 1 May 2026 10:45:07 -0700 Subject: [PATCH] chore: Improve docs on positionables (#9781) * chore: Improve docs on positionables * fix: Fix docs --- packages/docs/docs/guides/configure/web/focus.mdx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/packages/docs/docs/guides/configure/web/focus.mdx b/packages/docs/docs/guides/configure/web/focus.mdx index f4290cfc1..cdd618b91 100644 --- a/packages/docs/docs/guides/configure/web/focus.mdx +++ b/packages/docs/docs/guides/configure/web/focus.mdx @@ -370,4 +370,14 @@ implement [`IPositionable`](/reference/blockly.ipositionable). Examples are the trashcan and the backpack in the [backpack plugin](https://www.npmjs.com/package/@blockly/workspace-backpack). -Positionables are not yet integrated into the focus system. +Built-in positionables are integrated with the focus system, but if you create +your own you should ensure that they work well with it. The built-in ones follow +this pattern: + +* Implement `IFocusableNode` +* Ensure that the focusable DOM element (the one returned from + `getFocusableElement()`) has `tabindex="0"` + +Depending on the purpose of your positionable, you should also consider +registering a keyboard shortcut to perform its action (e.g. zoom in) or to +directly focus it (e.g. a workspace search field).