1
0
mirror of https://github.com/github/choosealicense.com synced 2024-12-21 20:30: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 # Exclude license elements in the legend
licenseLiElement = $(".license-#{ruletype} .#{rule["tag"]}").not("dd.license-#{ruletype} .#{rule["tag"]}") licenseLiElement = $(".license-#{ruletype} .#{rule["tag"]}").not("dd.license-#{ruletype} .#{rule["tag"]}")
tooltipAttr = @tooltipAttributesMapperByRuleType[ruletype] 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 licenseLiElement.addClass("hint--bottom
hint--large hint--large
hint--no-animate hint--no-animate