intergalactic icon indicating copy to clipboard operation
intergalactic copied to clipboard

Make TH cells with tooltips accessible from the keyboard

Open j-mnizhek opened this issue 2 years ago • 2 comments

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?

j-mnizhek avatar Nov 10 '23 17:11 j-mnizhek

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

ilyabrower avatar Nov 24 '23 14:11 ilyabrower

@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.

j-mnizhek avatar Dec 18 '23 15:12 j-mnizhek