1
0
mirror of https://github.com/github/choosealicense.com synced 2024-12-21 12:20:10 +01:00

Add rule label to tooltip

This commit is contained in:
Matthias Schoettle 2024-11-25 22:52:13 +00:00
parent 7d687a2298
commit 909cf833ee

View File

@ -43,7 +43,7 @@ class Choosealicense
# Exclude license elements in the legend
licenseLiElement = $(".license-#{ruletype} .#{rule["tag"]}").not("dd.license-#{ruletype} .#{rule["tag"]}")
tooltipAttr = @tooltipAttributesMapperByRuleType[ruletype]
licenseLiElement.attr "aria-label", "#{tooltipAttr.heading}: #{rule.description}"
licenseLiElement.attr "aria-label", "#{rule.label} #{tooltipAttr.heading.toLowerCase()}: #{rule.description}"
licenseLiElement.addClass("hint--bottom
hint--large
hint--no-animate