We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1e090f8 commit 2030ba3Copy full SHA for 2030ba3
1 file changed
src/NuGetGallery/Scripts/gallery/common.js
@@ -789,4 +789,18 @@
789
$(document).on('mouseleave focusout', '.tooltip-target', function () {
790
$(this).find('.tooltip-wrapper').removeClass('show');
791
});
792
+
793
+ // allow users to escape out of tooltips (accessibility requirement)
794
+ // project has two different tooltip implementations, adding a fix for both
795
+ $(document).on('keydown', '.tooltip-target', function (event) {
796
+ if (event.key === 'Escape' || event.keyCode === 27) {
797
+ $(this).find('.tooltip-wrapper').removeClass('show');
798
+ }
799
+ });
800
801
+ $(document).on('keydown', '[data-toggle="tooltip"]', function (event) {
802
803
+ $(this).tooltip('hide');
804
805
806
}());
0 commit comments