From 9326e7459b32b133d54f6899361b21a34d4088b4 Mon Sep 17 00:00:00 2001 From: Moritz Schubotz Date: Mon, 6 Jun 2016 18:03:24 +0200 Subject: [PATCH] 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 --- MathMathML.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/MathMathML.php b/MathMathML.php index 722dfc9..40bc77c 100644 --- a/MathMathML.php +++ b/MathMathML.php @@ -403,7 +403,8 @@ class MathMathML extends MathRenderer { return Xml::element( 'img', $this->getAttributes( 'span', $attribs, [ 'aria-hidden' => 'true', - 'style' => $this->mathoidStyle + 'style' => $this->mathoidStyle, + 'alt' => $this->tex ] ) ); }