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

[A11y] Actions component navigation for '@fluentui-contrib/react-chat' #272

Open
vhuseinova-msft opened this issue Dec 16, 2024 · 1 comment

Comments

@vhuseinova-msft
Copy link

Currently, the body of the message components in '@fluentui-contrib/react-chat' are considered tabbable elements. However, when the actions component is specified for my message FluentUI component, it is added at the same level as the body component. This breaks the keyboard navigation hierarchy, as both the actions and message body are on the same level. As a result, actions are accessible with the Tab key instead of the Enter key.

Steps to Reproduce:

  • Use '@fluentui-contrib/react-chat' to create a chat interface.
  • Add actions buttons list
  • Specify an actions component at the same level as the message body.
  • Attempt to navigate using the keyboard.

Expected Behavior: The actions component should be accessible with the Enter key, maintaining a proper keyboard navigation hierarchy.

Actual Behavior: The actions component is accessible with the Tab key, disrupting the expected navigation flow

@vhuseinova-msft
Copy link
Author

vhuseinova-msft commented Dec 17, 2024

It looks like this can be updated by using ...useFocusableGroup({ tabBehavior: 'unlimited' }) and handling Enter key locally. But please let me know if there is a better solution for this.

UPD: it looks like it's not a very good approach to add additional keyboard handlers as it changes the browsers keyboard navigation too much

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

No branches or pull requests

1 participant