Improved icon accessibility.
h3rald h3rald@h3rald.com
Sat, 17 Feb 2024 15:57:07 +0100
1 files changed,
8 insertions(+),
2 deletions(-)
jump to
M
rules.min
→
rules.min
@@ -113,7 +113,14 @@ match 1 get :icon
"assets/images/entypo/$#.svg" (icon) =% :path (path file?) ( - path fread from-xml "svg" xquery to-xml :svg + path fread from-xml "svg" xquery :svgx + ; Add title tag + "<title>$#</title>" (icon) =% from-xml :svg-title + svgx dup /children svg-title swap prepend %children @svgx + ; Add role="img" + svgx /attributes :svg-attrs + svgx svg-attrs "img" %role %attributes @svgx + svgx to-xml :svg "<span class=\"icon\">$#</span>" (svg) =% @content ) (@@ -214,7 +221,6 @@ "" puts!
; Create aggregator pages create-projects-page -create-archives-page create-articles-page ; Generate home page