mirror of
https://github.com/moodle/moodle.git
synced 2025-08-08 10:26:40 +02:00
MDL-67970 course: More informative aria-label for 'more help'
This commit is contained in:
parent
99cac46162
commit
f064e11579
3 changed files with 8 additions and 6 deletions
|
@ -2135,16 +2135,15 @@ class core_renderer extends renderer_base {
|
|||
* @param string $path The page link after doc root and language, no leading slash.
|
||||
* @param string $text The text to be displayed for the link
|
||||
* @param boolean $forcepopup Whether to force a popup regardless of the value of $CFG->doctonewwindow
|
||||
* @param array $attributes htm attributes
|
||||
* @return string
|
||||
*/
|
||||
public function doc_link($path, $text = '', $forcepopup = false) {
|
||||
public function doc_link($path, $text = '', $forcepopup = false, array $attributes = []) {
|
||||
global $CFG;
|
||||
|
||||
$icon = $this->pix_icon('docs', '', 'moodle', array('class'=>'iconhelp icon-pre', 'role'=>'presentation'));
|
||||
|
||||
$url = new moodle_url(get_docs_url($path));
|
||||
|
||||
$attributes = array('href'=>$url);
|
||||
$attributes['href'] = new moodle_url(get_docs_url($path));
|
||||
if (!empty($CFG->doctonewwindow) || $forcepopup) {
|
||||
$attributes['class'] = 'helplinkpopup';
|
||||
}
|
||||
|
@ -2161,7 +2160,7 @@ class core_renderer extends renderer_base {
|
|||
* @param string $pix short pix name
|
||||
* @param string $alt mandatory alt attribute
|
||||
* @param string $component standard compoennt name like 'moodle', 'mod_forum', etc.
|
||||
* @param array $attributes htm lattributes
|
||||
* @param array $attributes htm attributes
|
||||
* @return string HTML fragment
|
||||
*/
|
||||
public function image_icon($pix, $alt, $component='moodle', array $attributes = null) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue