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
This commit is contained in:
Moritz Schubotz 2016-06-06 18:03:24 +02:00 committed by Physikerwelt
parent 14ec229cf9
commit 9326e7459b
1 changed files with 2 additions and 1 deletions

View File

@ -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
] ) );
}