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

[data grid] Tooltips are cut off below the last column of the table #14669

Closed
lukask-proxora opened this issue Sep 19, 2024 · 8 comments
Closed
Labels
accessibility a11y bug 🐛 Something doesn't work component: data grid This is the name of the generic UI component, not the React module!

Comments

@lukask-proxora
Copy link

lukask-proxora commented Sep 19, 2024

Steps to reproduce

Link to live example: codesandbox.io

Steps:

  1. add a tooltip in renderCell
  2. add disablePortal=true to the PopperProps (this is necessary for us because the tooltips contain links - further info below)
    (3. add whiteSpace: "wrap" to the surrounding element of the title property of the tooltip - otherwise the text of the tooltip does not wrap inside the tooltip)

Current behavior

The tooltip is cut off below the last column:
Screenshot_2024-07-01_16-58-58

Expected behavior

The full tooltip is shown (this is possible if we remove disablePortal=true):
Screenshot_2024-07-01_17-03-27

Context

Our tooltips may contain links and the user has to be able to navigate to these links with the keyboard (as one of the requirements for WCAG).
Therefore, while the tooltip is focused, the containing link should get the focus by pressing the Tab key.
This is currently only the case if we set disablePortal=true, but then we have this issue with the cut of tooltip.

So the solution proposed in #11708 does not work for us.

Your environment

Same behavior in Firefox and Chrome

Search keywords: tooltip data grid

@lukask-proxora lukask-proxora added bug 🐛 Something doesn't work status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Sep 19, 2024
@github-actions github-actions bot added the component: data grid This is the name of the generic UI component, not the React module! label Sep 19, 2024
@michelengelen
Copy link
Member

Hey @lukask-proxora ... could you make that codesandbox public? We cannot view it atm.

@michelengelen michelengelen added accessibility a11y status: waiting for author Issue with insufficient information and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Sep 19, 2024
@lukask-proxora
Copy link
Author

Hi @michelengelen,
Sorry, I just changed the Permission settings to public

@github-actions github-actions bot added status: waiting for maintainer These issues haven't been looked at yet by a maintainer and removed status: waiting for author Issue with insufficient information labels Sep 19, 2024
@michelengelen
Copy link
Member

Ok, this makes sense.
The reason this is not within the tab sequence is that the tooltip renders outside of the flow when portal is active. Is there another way of doing this @siriwatknp?

@siriwatknp
Copy link
Member

I think the Tooltip should work with keyboard to move the focus inside if there are focusable elements regardless of portal. Is this achievable/practical in terms of a11y? cc @michaldudak @mui/base-ui

@michaldudak
Copy link
Member

Tooltips must not contain interactive elements. The Base UI Tooltip component doesn't support such a scenario. If interactive content is needed, a Popover that opens on hover can be used. The Base UI implementation manages focus regardless of portals being used.

@michelengelen
Copy link
Member

Ok, as interactive elements are not supported this should be made into a Popover. Thanks @michaldudak and @siriwatknp! 👍🏼

@michelengelen michelengelen added status: waiting for author Issue with insufficient information and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Oct 9, 2024
@github-actions github-actions bot added status: waiting for maintainer These issues haven't been looked at yet by a maintainer and removed status: waiting for author Issue with insufficient information labels Oct 15, 2024
@lukask-proxora
Copy link
Author

Thanks for the clarification! We will use Popovers for our use case.

Copy link

This issue has been closed. If you have a similar problem but not exactly the same, please open a new issue.
Now, if you have additional information related to this issue or things that could help future readers, feel free to leave a comment.

Note

@lukask-proxora How did we do? Your experience with our support team matters to us. If you have a moment, please share your thoughts in this short Support Satisfaction survey.

@github-actions github-actions bot removed the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accessibility a11y bug 🐛 Something doesn't work component: data grid This is the name of the generic UI component, not the React module!
Projects
None yet
Development

No branches or pull requests

4 participants