app/models/blacklight/icon.rb in blacklight-7.9.0 vs app/models/blacklight/icon.rb in blacklight-7.10.0
- old
+ new
@@ -23,10 +23,11 @@
##
# Returns an updated version of the svg source
# @return [String]
def svg
svg = ng_xml.at_xpath('svg')
+ svg['aria-label'] = icon_label if label
svg['role'] = role
svg.prepend_child("<title>#{icon_label}</title>") if label
ng_xml.to_xml
end
@@ -37,11 +38,10 @@
##
# @return [Hash]
def options
{
class: classes,
- "aria-hidden": (true if aria_hidden),
- "aria-label": (icon_label if label)
+ "aria-hidden": (true if aria_hidden)
}
end
##
# @return [String]