Skip to content

Conversation

@kbangelov
Copy link
Contributor

@kbangelov kbangelov commented Jan 27, 2026

Resolves

https://scratchfoundation.atlassian.net/browse/UEPR-462

Proposed Changes

Adds some better keyboard accessibility

  • Improved aria-labels and such for most focusable components
  • Restricts user from focusing on other elements outside the modal when in full screen mode via modal-focus-context.jsx
  • Makes the popover on direction input disappear on unfocus via changes in useFocusOutside.js

Does not include

  • Popover navigation with arrows for direction input
  • "Choose a Sprite/Backdrop" menu navigation with keyboard.

Reason for Changes

Part of accessibility initiative for Scratch.

@kbangelov kbangelov requested a review from a team as a code owner January 27, 2026 14:00
* }}
*/
export default function useFocusOutside (onClose) {
const containerRef = useRef(null);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am actually leaning more towards replacing this with inputRef or more generically openingElementRef that we apply to the input or whatever element activates the popover instead of the container including them both.

@redspacecat
Copy link

redspacecat commented Jan 31, 2026

keep in mind that it seems some of the recent changes relating to navigation are causing issues

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