
Security News
Risky Biz Podcast: Making Reachability Analysis Work in Real-World Codebases
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
jquery-accessible-simple-tooltip-aria
Advanced tools
This jQuery plugin will provide you an accessible and simple non-modal tooltip, using ARIA.
This jQuery plugin will provide you an accessible and simple non-modal tooltip, using ARIA.
You can download and install the plugin via:
$ npm i jquery-accessible-simple-tooltip-aria
$ bower install jquery-accessible-simple-tooltip-aria
The demo is here: https://a11y.nicolas-hoffmann.net/simple-tooltip/
aria-describedby
and id
s generated on the fly, you never loose any information;Basically, the scripts wraps each class="js-simple-tooltip"
into a span class="<your-prefix-class>-container"
and adds the content into a hidden content next to it. Once you focus or hover the element with class="js-simple-tooltip"
, it is displayed.
You can use it on the tag you want (input
, button
, a
…)
$('div').accessibleSimpleTooltipAria({
simpletooltipText: title
});
No license problem, it uses MIT license, so it’s free, open-source and you can do whatever you want with it, including commercial use (permission notice)
Use data-simpletooltip-text
or data-simpletooltip-content-id
attributes on an element to activate the tooltip.
class="js-simpletooltip"
on a button to activate the script.data-simpletooltip-prefix-class
(non mandatory): the prefix to all style classes of the tooltip (useful to set up different styles).data-simpletooltip-text
: the text of your tooltip.data-simpletooltip-content-id
: the id
of (hidden) content in your page that will be put into your tooltip.data-simpletooltip-wrapper-tag
: the tag used for wrapping your tooltip (span
by default).data-simpletooltip-tag
: the tag used for your tooltip (span
by default)./* it will work better with this box-sizing, you may adapt it to your needs */
/*html { box-sizing: border-box; }
*, *:before, *:after {
box-sizing: inherit;
}*/
/* Tooltip hidden by default */
.simpletooltip[aria-hidden="true"],
.minimalist-simpletooltip[aria-hidden="true"],
.minimalist-left-simpletooltip[aria-hidden="true"] {
display: none;
}
/* position relative for containers */
.simpletooltip_container,
.minimalist-simpletooltip_container,
.minimalist-left-simpletooltip_container {
position: relative;
display: inline;
}
/* tooltip styles */
.simpletooltip,
.minimalist-simpletooltip,
.minimalist-left-simpletooltip {
position: absolute;
display: inline-block;
z-index: 666;
width: 10em;
border-radius: .5em;
background: rgba( 0, 0, 0, .9 );
color: #eee;
padding: .5em;
text-align: left;
line-height: 1.3;
}
.simpletooltip,
.minimalist-simpletooltip {
right: auto;
left: 100%;
margin-left: .5em;
}
.minimalist-left-simpletooltip {
right: 100%;
left: auto;
margin-right: .5em;
}
/* used pseudo-element to make arrows */
.simpletooltip::before,
.minimalist-simpletooltip::before,
.minimalist-left-simpletooltip::before {
content: '';
speak: none;
position: absolute;
z-index: 666;
width: 10px;
height: 10px;
}
.simpletooltip::before,
.minimalist-simpletooltip::before {
top: .5em;
left: -10px;
margin-left: -10px;
border: 10px solid transparent;
border-right: 10px solid rgba( 0, 0, 0, .9 );
}
.minimalist-left-simpletooltip::before {
top: .5em;
right: -10px;
margin-right: -10px;
border: 10px solid transparent;
border-left: 10px solid rgba( 0, 0, 0, .9 )
}
/* it can be easily adapted in media-queries for tablets/mobile */
/* for this example: mobile */
@media (max-width: 44.375em) {
.simpletooltip,
.minimalist-simpletooltip,
.minimalist-left-simpletooltip {
top: 100%;
left: 50%;
right: 0;
margin: 0;
margin-top: .7em;
margin-left: -5em;
}
.simpletooltip::before,
.minimalist-simpletooltip::before,
.minimalist-left-simpletooltip::before {
top: -10px;
right: auto;
left: 50%;
margin-left: -5px;
margin-top: -10px;
border: 10px solid transparent;
border-bottom: 10px solid rgba( 0, 0, 0, .9 );
}
}
<button class="js-simple-tooltip"
data-simpletooltip-text="Cool, it works!">
Hover or focus me to show the tooltip
</button>
<button class="js-simple-tooltip"
data-simpletooltip-content-id="tooltip-case_1">
Show me another tooltip
</button>
<div id="tooltip-case_1" class="hidden">Woot, you can take the content of a hidden block.</div>
Enjoy.
FAQs
This jQuery plugin will provide you an accessible and simple non-modal tooltip, using ARIA.
The npm package jquery-accessible-simple-tooltip-aria receives a total of 0 weekly downloads. As such, jquery-accessible-simple-tooltip-aria popularity was classified as not popular.
We found that jquery-accessible-simple-tooltip-aria demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
Security News
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.