Git Product home page Git Product logo

jquery-accessible-dialog-tooltip-aria's People

Contributors

nico3333fr avatar samrichca avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

jquery-accessible-dialog-tooltip-aria's Issues

Additional tips (maybe to be included in documentation)

Many thanks for this solution! It works perfectly for us (cannot share the URL yet, as we are still working on the site).

We are using not a real button but an SVG image for the tooltip. Thus I had to look around for how to keep accessibility. I ended up with this code:

<img src="/img/info.svg" 
class="js-tooltip" data-tooltip-prefix-class="simple-tooltip" data-tooltip-content-id="info_waterHeater" data-tooltip-close-text="X" 
role="button" 
tabindex="0" 
onkeydown="if(event.keyCode==13||event.keyCode==32){event.preventDefault();$(this).click();}">

This clearly is nothing specific to your code, but maybe others would like to use an image as button as well. The last three lines are needed to keep accessibility:
role="button" signals its clickability (including different cursor on hover)
tabindex="0" lets you tab to the clickable icon
onkeydown=... ensures that a click is triggered on pressing either the ENTER or SPACE key.
I found the needed info mostly on this page https://www.deque.com/blog/accessible-aria-buttons/

Chrome makes some sh...

Chrome is executing
if ( !$target.is('.js-dialogtooltip') && !$target.is('.js-tooltip') && !$target.parents(".js-dialogtooltip").is(".js-dialogtooltip")) { $('.js-dialogtooltip').remove(); }

After having opened a tooltip (yes, it is stupid, IE/Firefox are not doing it). Only way to solve, add a timeout on opening.

Chrome, you suck.
68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f323537383332312f3237353536342f31316132633538302d393039312d313165322d396637352d6139613435393736343434622e676966

Survol ?

Bonjour Nicolas,

Est-ce que ton plugin pourrait marcher avec un tooltip qui s'afficherait au survol plutôt qu'au clic ? et est-ce que ça serait toujours accessible ?

Merci !

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.