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

Make TH cells with tooltips accessible from the keyboard #890

Open
j-mnizhek opened this issue Nov 10, 2023 · 2 comments
Open

Make TH cells with tooltips accessible from the keyboard #890

j-mnizhek opened this issue Nov 10, 2023 · 2 comments

Comments

@j-mnizhek
Copy link
Contributor

j-mnizhek commented Nov 10, 2023

Is your feature request related to a problem? Please describe.
Can we make our TH cells accessible from the keyboard when they have tooltip?

Describe the solution you'd like
Let's look at one of our examples from the website. Now you can only access the cell with select:

image

Other TH cells aren't accessible. Other cells have tooltips that should be read when user access table with keyboard.

  1. Can we include TH cells with tooltips to the Tab sequence? (I've seen that it worked before the website migration, maybe something broke).
  2. Can we show Tooltip when user access the TH cell with Tooltip?
@ilyabrower
Copy link
Contributor

It is not a problem in a Table, but in a Tooltip.
Let's see an example:

<Tooltip title='Hello, stranger'>
    Trigger
</Tooltip>

By default, we don't add tabIndex to the div with Trigger. That's why, I think, all our examples looks like:

<Tooltip title='Hello, stranger'>
    <Link>Trigger</Link>
</Tooltip>

Because, Link has attribute tabIndex=0.

So, my suggestion is one of:

  • add tabIndex it in every Tooltips by default (and disable it if we have something like Link in children)
  • wrap children with some element with tabIndex every time

@j-mnizhek j-mnizhek removed their assignment Dec 15, 2023
@j-mnizhek j-mnizhek changed the title [DataTable] Make TH with tooltips accessible from the keyboard Make TH cells with tooltips accessible from the keyboard Dec 18, 2023
@j-mnizhek
Copy link
Contributor Author

@ilyabrower Thank you! ❤️ Sorry, I've missed your comment somehow.
I've just checked adding tabIndex to tooltips inside TH cells in sandbox, and it works good.
I guess, it's worth while to add tabIndex in our table examples.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants