Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for centrally managing and changing DOM focus #8770

Open
1 task done
BenHenning opened this issue Feb 14, 2025 · 1 comment
Open
1 task done

Add support for centrally managing and changing DOM focus #8770

BenHenning opened this issue Feb 14, 2025 · 1 comment
Assignees
Labels
issue: feature request Describes a new feature and why it should be added

Comments

@BenHenning
Copy link
Contributor

BenHenning commented Feb 14, 2025

Check for duplicates

  • I have searched for similar issues before opening a new one.

Problem

Core Blockly doesn't currently have a good way to handle the following user flows:

  • Ensuring element selection/navigation via the keyboard navigation plugin ties back to DOM focus (which is necessary screenreader support).
  • Ensuring that currently focused elements have clear visual indicators (this sort of works today for elements that are selectable, but otherwise we rely on browser focus visual indicators which are very subtle or outright may not work in certain SVG contexts).
  • Ensuring that distinct focus 'domains' (e.g. the workspace and toolbox) can represent 'passive' focus (that is, the last element within that logical context that held DOM focus but doesn't currently). This is especially useful for communicating which visual element will receive focus when returning to that context (such as navigating from the toolbox back to the workspace).
  • Ensuring cases when focus context needs to be taken temporarily (such as for drop-downs) can be done in a clean way.

Request

google/blockly-keyboard-experimentation#142 (comment) describes the high-level solution for this, but specifically this issue is meant to track adding (see also the sub-issues):

Alternatives considered

The technical design above has a lot of context on alternative considerations.

Additional context

The technical design above should have all important additional context. #8771 tracks more specific components that need to be updated in order for the system introduced with this issue to be useful. google/blockly-keyboard-experimentation#142 tracks the work to integrate the new focus system within the keyboard navigation plugin.

@BenHenning BenHenning added issue: feature request Describes a new feature and why it should be added issue: triage Issues awaiting triage by a Blockly team member labels Feb 14, 2025
@BenHenning BenHenning self-assigned this Feb 14, 2025
@BenHenning
Copy link
Contributor Author

NB: The current plan is to introduce this functionality in 2 PRs:

  • The first for introducing the actual interfaces.
  • The second for introducing the FocusManager (which has logic and tests that require much more time to build than just the interfaces).

This approach enables parallel development with #8771, though some of that issue may need to be done practically as part of PR (2) above in order to verify that it actually works (though may not necessarily be checked in or created as a proper PR).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue: feature request Describes a new feature and why it should be added
Projects
Status: No status
Development

No branches or pull requests

2 participants