drozhzhin-n-e / ng2-tooltip-directive

The tooltip is a pop-up tip that appears when you hover over an item or click on it.
http://ivylab.space/tooltip
MIT License
101 stars 76 forks source link

Accesibility : option to add role tooltip and id #168

Open monir-a-khan opened 2 years ago

monir-a-khan commented 2 years ago

According to w3c, the tooltip should have role="tooltip". Also an id, the triggering element should have aria-describedby which will refer to this id.

Example scenario which should be achieved is

<button class="notifications" aria-labelledby="notifications-label"> Show tooltip
</button>  
<div role="tooltip" id="notifications-label">A tooltip text</div>