Keyboard support for datatable

Keyboard support for datatable

TavishiTavishi Posts: 15Questions: 4Answers: 0

I was referring this link :https://datatables.net/extensions/buttons/examples/styling/icons.html
So on mouse hover I am able to see the title, but my requirement is to show the title using keyboard.

Is this possible?

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 61,697Questions: 1Answers: 10,102 Site admin

    Not as far as I am aware. That example uses the title attribute for the button (which is the standard for tooltips in browsers), and I'm not aware of a way that it can be made visible via the keyboard.

    Allan

  • TavishiTavishi Posts: 15Questions: 4Answers: 0

    Dnt know If you got my question , trying to elaborate my question again.
    Please have a look.

    I want to show tooltip on keyboard focus.
    I tried is using title attribute for button. And then to show the tooltip on focus i have used a javascript function as shown below:

    function showTooltip(){
    $(".dt-button").tooltip({
    disabled: true
    }).on("focusin", function () {
    $(this)
    .tooltip("enable")
    .tooltip("open");
    }).on("focusout", function () {
    $(this)
    .tooltip("close")
    .tooltip("disable");
    }).on("mouseover", function () {
    $(this)
    .tooltip("enable")
    .tooltip("open");
    }).on("mouseout", function () {
    $(this)
    .tooltip("close")
    .tooltip("disable");
    });
    }

    Is this correct way for showing ? Or datatable button have any such property for displaying tooltip on keyboard focus.

  • allanallan Posts: 61,697Questions: 1Answers: 10,102 Site admin
    Answer ✓

    Or datatable button have any such property for displaying tooltip on keyboard focus.

    No, it doesn't.

    You'd need to use an external library as you have done.

    Regards,
    Allan

  • TavishiTavishi Posts: 15Questions: 4Answers: 0

    ok Thanks

This discussion has been closed.