The vast majority of icon usage is decorative, such as arrows at the end
of link buttons. For the cases where it's not, I'm sending follow-up
patches to the specific services which add appropriate aria-label to
the parent element.
---
srht/flask.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/srht/flask.py b/srht/flask.py
index e7367d6..8188d4d 100644
--- a/srht/flask.py+++ b/srht/flask.py
@@ -96,7 +96,7 @@ icon_cache = {}
def icon(i, cls=""):
if i in icon_cache:
svg = icon_cache[i]
- return Markup(f'<span class="icon icon-{i} {cls}">{svg}</span>')+ return Markup(f'<span class="icon icon-{i} {cls}" aria-hidden="true">{svg}</span>') fa_license = """<!--
Font Awesome Free 5.3.1 by @fontawesome - https://fontawesome.com
License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
@@ -108,7 +108,7 @@ def icon(i, cls=""):
if g and "fa_license" not in g:
svg += fa_license
g.fa_license = True
- return Markup(f'<span class="icon icon-{i} {cls}">{svg}</span>')+ return Markup(f'<span class="icon icon-{i} {cls}" aria-hidden="true">{svg}</span>')@contextfunction
def coalesce_search_terms(context):
--
2.32.0