diff options
| author | Philipp Schüttlöffel <schuettloeffel@zqs.uni-hannover.de> | 2024-09-24 10:53:31 +0200 |
|---|---|---|
| committer | Philipp Schüttlöffel <schuettloeffel@zqs.uni-hannover.de> | 2024-09-24 10:53:31 +0200 |
| commit | 4459dd7917f4d1c34f40bb68f0e991e9c3d53e4c (patch) | |
| tree | 5c07151ae61276d334e88f6309c30d439a85c12e /templates/shared | |
| parent | da0022e5c1abbf9825ae76debaabdff7e8623bb4 (diff) | |
| parent | 97a188592c679890a25c37ab78463add76a52ff7 (diff) | |
Merge branch 'main' into issue-3911issue-3911
Diffstat (limited to 'templates/shared')
| -rw-r--r-- | templates/shared/message_box.php | 22 | ||||
| -rw-r--r-- | templates/shared/opengraphinfo_wide.php | 4 | ||||
| -rw-r--r-- | templates/shared/question-box.php | 11 | ||||
| -rw-r--r-- | templates/shared/tooltip.php | 14 |
4 files changed, 32 insertions, 19 deletions
diff --git a/templates/shared/message_box.php b/templates/shared/message_box.php index 657563b..447763d 100644 --- a/templates/shared/message_box.php +++ b/templates/shared/message_box.php @@ -1,4 +1,4 @@ -<div class="messagebox messagebox_<?= $class ?> <? if (count($details) > 0 && $close_details): ?>details_hidden<? endif; ?>"> +<div role="region" aria-label="<?= $label ?>" aria-describedby="messagebox-<?= $counter ?>" class="messagebox messagebox_<?= $class ?> <? if (count($details) > 0 && $close_details): ?>details_hidden<? endif; ?>"> <div class="messagebox_buttons"> <? if (count($details) > 0 && $close_details) : ?> <a class="details" href="#" title="<?=_('Detailanzeige umschalten')?>"> @@ -6,19 +6,21 @@ </a> <? endif ?> <? if (!$hide_close): ?> - <a class="close" href="#" title="<?= _('Nachrichtenbox schließen') ?>"> + <a class="close" role="button" href="#" title="<?= _('Nachrichtenbox schließen') ?>"> <span><?= _('Nachrichtenbox schließen') ?></span> </a> <? endif; ?> </div> + <div role="status" id="messagebox-<?= $counter ?>"> <?= $message ?> -<? if (count($details) > 0) : ?> - <div class="messagebox_details"> - <ul> - <? foreach ($details as $li) : ?> - <li><?= $li ?></li> - <? endforeach ?> - </ul> + <? if (count($details) > 0) : ?> + <div class="messagebox_details"> + <ul> + <? foreach ($details as $li) : ?> + <li><?= $li ?></li> + <? endforeach ?> + </ul> + </div> + <? endif ?> </div> -<? endif ?> </div> diff --git a/templates/shared/opengraphinfo_wide.php b/templates/shared/opengraphinfo_wide.php index ddcd19c..44ce918 100644 --- a/templates/shared/opengraphinfo_wide.php +++ b/templates/shared/opengraphinfo_wide.php @@ -18,12 +18,12 @@ if (Config::get()->LOAD_EXTERNAL_MEDIA === "proxy" && Seminar_Session::is_curren ?> <div class="opengraph <? if (count($videofiles) > 0) echo 'video'; ?> <? if (count($audiofiles) > 0) echo 'audio'; ?>"> <? if ($og['image'] && count($videofiles) === 0): ?> - <a href="<?= URLHelper::getLink($og['url'], [], false) ?>" class="image" + <a href="<?= URLHelper::getLink($og['url'], [], true) ?>" class="image" target="_blank" rel="noopener noreferrer" style="background-image:url(<?= htmlReady($media_url_func($og['image'])) ?>)"> </a> <? endif; ?> - <a href="<?= URLHelper::getLink($og['url'], [], false) ?>" class="info" + <a href="<?= URLHelper::getLink($og['url'], [], true) ?>" class="info" target="_blank" rel="noopener noreferrer"> <strong><?= htmlReady($og['title']) ?></strong> <? if (!count($videofiles)) : ?> diff --git a/templates/shared/question-box.php b/templates/shared/question-box.php index 40535c5..5bf1dcd 100644 --- a/templates/shared/question-box.php +++ b/templates/shared/question-box.php @@ -1,5 +1,7 @@ <div class="modaloverlay"> - <div class="ui-dialog ui-corner-all ui-widget ui-widget-content ui-front ui-dialog-buttons studip-confirmation"> + <div class="ui-dialog ui-corner-all ui-widget ui-widget-content ui-front ui-dialog-buttons studip-confirmation" + role="alertdialog" aria-labelledBy="studip-confirmation-title-1" aria-describedby="studip-confirmation-desc-1" + modal="true"> <form action="<?= URLHelper::getLink($accept_url) ?>" method="post"> <?= CSRFProtection::tokenTag() ?> <? foreach ($accept_parameters as $key => $value): ?> @@ -7,13 +9,16 @@ <? endforeach; ?> <div class="ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix"> - <span class="ui-dialog-title"><?= _('Bitte bestätigen Sie die Aktion') ?></span> + <span class="ui-dialog-title" id="studip-confirmation-title-1"> + <?= _('Bitte bestätigen Sie die Aktion') ?> + </span> <a href="<?= URLHelper::getLink($decline_url, $decline_parameters) ?>" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-icon-only ui-dialog-titlebar-close"> <span class="ui-button-icon-primary ui-icon ui-icon-closethick"></span> <span class="ui-button-text"><?= _('Schliessen') ?></span> </a> </div> - <div class="content ui-widget-content ui-dialog-content studip-confirmation"> + <div class="content ui-widget-content ui-dialog-content studip-confirmation" + id="studip-confirmation-desc-1" role="heading" aria-level="2"> <?= $question ?> </div> <div class="buttons ui-widget-content ui-dialog-buttonpane"> diff --git a/templates/shared/tooltip.php b/templates/shared/tooltip.php index a97c73f..513700f 100644 --- a/templates/shared/tooltip.php +++ b/templates/shared/tooltip.php @@ -1,5 +1,11 @@ -<span class="tooltip tooltip-icon <? if ($important) echo 'tooltip-important'; ?>" data-tooltip <? if (!$html) printf('title="%s"', htmlReady($text)) ?> tabindex="0"> -<? if ($html): ?> - <span class="tooltip-content"><?= $text ?></span> -<? endif; ?> +<?php +/** + * @var bool $important + * @var bool $html + * @var string $text + */ +?> +<span class="tooltip tooltip-icon <? if ($important) echo 'tooltip-important'; ?>" + tabindex="0" aria-label="<?= $html ? htmlReady(strip_tags($text)) : htmlReady($text) ?>"> + <span class="tooltip-content"><?= $html ? $text : htmlReady($text) ?></span> </span> |
