Physikerwelt has uploaded a new change for review.
https://gerrit.wikimedia.org/r/292952
Change subject: Add alt tag for SVG image
......................................................................
Add alt tag for SVG image
We use the checked version of the TeX string and
not the original user input string to ensure that
the layout is the same and no mediawiki specific
macros such as \reals is needed to render the alt
text with a regular LaTeX installation.
Bug: T136915
Change-Id: I40cdf4ec49a4d071773af6943dbe101b8d41ed87
---
M MathMathML.php
1 file changed, 2 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Math
refs/changes/52/292952/1
diff --git a/MathMathML.php b/MathMathML.php
index 722dfc9..40bc77c 100644
--- a/MathMathML.php
+++ b/MathMathML.php
@@ -403,7 +403,8 @@
return Xml::element( 'img', $this->getAttributes( 'span',
$attribs, [
'aria-hidden' => 'true',
- 'style' => $this->mathoidStyle
+ 'style' => $this->mathoidStyle,
+ 'alt' => $this->tex
] ) );
}
--
To view, visit https://gerrit.wikimedia.org/r/292952
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I40cdf4ec49a4d071773af6943dbe101b8d41ed87
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Math
Gerrit-Branch: master
Gerrit-Owner: Physikerwelt <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits