diff --git a/sphinx_fasvg/__init__.py b/sphinx_fasvg/__init__.py index a5fb1b9..0ff24b1 100644 --- a/sphinx_fasvg/__init__.py +++ b/sphinx_fasvg/__init__.py @@ -46,11 +46,13 @@ def html_visit_fa(self: HTMLTranslator, node: fa) -> None: label_uid = uuid.uuid4() title = None options = 'role="img"' + options += ' xmlns="http://www.w3.org/2000/svg"' + options += ' xmlns:xlink="http://www.w3.org/1999/xlink"' if node.get('alt', None): options += ' aria-labelledby="fa_%s"' % label_uid title = '%s' % (label_uid, node['alt']) else: - options += ' aria-hidden="true"' + options += ' aria-hidden="true" xlink:title=""' if node.get('html_id', None): options += ' id="%s"' % node['html_id'] @@ -119,7 +121,10 @@ def html_visit_falink(self: HTMLTranslator, node: fa) -> None: '' % (node['icon'], node['url'])) self.body.append( - '