public function extractPDFArea($file, $page, $rect, $to=null, $options = array(), $cache = null);
public function addMask($layer, $page, $area);
+
+ public function getLinkAlternativeText($link);
}
{
// TODO: Implement addMask() method.
}
+
+ public function getLinkAlternativeText($link)
+ {
+ // TODO: Implement getLinkAlternativeText() method.
+ }
}
$w = $this->width;
$h = $this->height;
$this->copyExternalFile($this->to);
- $alt = '<img class="multimediaimage" data-scroll="' . $this->scroll . '" data-width="' . $w . '" data-height="' . $h . '" src="' . Link::getUniversalLocation($this->to) . '" width="' . $w . '" height="' . $h . '" />';
- return $alt;
+ $res = '<img class="multimediaimage" data-scroll="' . $this->scroll . '" data-width="' . $w . '" data-height="' . $h . '" src="' . Link::getUniversalLocation($this->to) . '" width="' . $w . '" height="' . $h . '" aria-hidden="1" />';
+ $alt=$this->getAlternativeText();
+ if($alt) {
+ $res .= '<div class="accessible" aria-live="polite">' . $alt . '</div>';
+ }
+ return $res;
}
public function getAdditionnalContent()
{
return parent::getAdditionnalContent() . ' aria-hidden="true" data-scroll="' . $this->scroll . '" ';
}
-
}
{
return $this->animation_type == '1' || $this->display_area === 'default' ? $this->compiler->getSetting('linksDisplayArea', 'fill') : $this->display_area;
}
+
+ public function getAlternativeText()
+ {
+ return $this->alt ?: $this->compiler->getLinkAlternativeText($this);
+ }
}