Skip to content

Conversation

@krasnoff
Copy link

@krasnoff krasnoff commented Jan 3, 2026

Previous Behavior

In the Dialog Scrolling Long Content example, the dialog content is not scrollable with keyboard.

New Behavior

Now the dialog conent is scrollable by keyboard when it is in focus.

Related Issue(s)

#35603

  • Fixes #

@krasnoff krasnoff requested a review from a team as a code owner January 3, 2026 14:22
@krasnoff
Copy link
Author

krasnoff commented Jan 3, 2026

@microsoft-github-policy-service agree

// `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`
// but since it would be a breaking change to fix it, we are casting ref to it's proper type
ref: ref as React.Ref<HTMLDivElement>,
tabIndex: 0,
Copy link
Contributor

Choose a reason for hiding this comment

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

pls follow https://storybooks.fluentui.dev/react/?path=/docs/concepts-developer-accessibility-focus-indicator--docs to add focus indicator.

in general - I am not sure if this is applicable in all cases.
It is certainly not needed for smaller dialogs.
For larger ones there can be a focusable element in the content which will allow users to scroll when after move focus.

Maybe an optional prop? @kolaps33 @smhigley @bsunderhus what do you think?

Copy link
Author

Choose a reason for hiding this comment

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

I added tabIndex: 0 in order to make the component focusable and thus to enable scrolling.
I dont quite understand why do we have to add focus indicator.

Copy link
Author

Choose a reason for hiding this comment

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

Screenshot from 2026-01-23 10-53-27

attach screenshot that proves that the component can be focusable without any neccessary addons.

Copy link
Author

Choose a reason for hiding this comment

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

I changed the element to HTMLDivElement

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