Skip to content

feat: fix keyboard nav for minimap#2730

Merged
maribethb merged 2 commits into
RaspberryPiFoundation:v13from
maribethb:minimap-nav
Jun 26, 2026
Merged

feat: fix keyboard nav for minimap#2730
maribethb merged 2 commits into
RaspberryPiFoundation:v13from
maribethb:minimap-nav

Conversation

@maribethb

Copy link
Copy Markdown
Contributor

The basics

The details

Resolves

Fixes buggy minimap keyboard nav where you could keyboard nav into that tiny workspace

Proposed Changes

  • Prevents navigating into the mini workspace
  • Adds the ability to use arrow keys to pan the workspace while you're focused on the minimap
  • Adds appropriate aria label and role
  • Adds tests for new functionality

Reason for Changes

accessibility!

Test Coverage

added and manually tested

Documentation

updated readme

Additional Information

@maribethb maribethb requested a review from a team as a code owner June 25, 2026 18:42
@maribethb maribethb requested review from lizschwab and removed request for a team June 25, 2026 18:42
this.primaryScroll(event);
}

private onWrapperFocus(): void {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't onFocusWrapper and onBlurWrapper be wrappers for onFocus and onBlur, rather than for onWrapperFocus and onWrapperBlur? These names imply we're focusing/blurring a wrapper, not wrapping a function.

Either way, I'm not going to gate check-in on naming, just found it a bit confusing.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

haha it's actually both. the container we're putting this event on is minimapWrapper. the actual focus handler is called onWrapperFocus which is accurate (it's what happens when you focus the wrapper). the thing we pass to Events.bind is called onFocusWrapper which matches what the other handlers are called, because they are a wrapper around the onFocus event.

i'm going to rename onWrapperFocus to onMinimapFocus and leave the other one alone to match the existing pattern

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(the reason I didn't just do onFocus and onBlur is because those are names in the FocusableTree interface and i wanted to not imply that that's how those events worked)

@maribethb maribethb merged commit 3b7726e into RaspberryPiFoundation:v13 Jun 26, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants