mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-17 12:25:14 +02:00
Several accessibility improvements
This commit is contained in:
parent
8bf3d6694a
commit
c978c8e027
20 changed files with 45 additions and 35 deletions
|
@ -356,6 +356,7 @@ class Page implements ArrayAccess
|
|||
$tpl = Renderer::getMarkupTemplate('footer.tpl');
|
||||
$this->page['footer'] = Renderer::replaceMacros($tpl, [
|
||||
'$footerScripts' => array_unique($this->footerScripts),
|
||||
'$close' => $l10n->t('Close'),
|
||||
]) . $this->page['footer'];
|
||||
}
|
||||
|
||||
|
|
|
@ -1583,7 +1583,7 @@ class BBCode
|
|||
// Check for headers
|
||||
|
||||
if ($simple_html == self::INTERNAL) {
|
||||
//Ensure to always start with <h4> if possible
|
||||
//Ensure to always start with <h3> if possible
|
||||
$heading_count = 0;
|
||||
for ($level = 6; $level > 0; $level--) {
|
||||
if (preg_match("(\[h$level\].*?\[\/h$level\])ism", $text)) {
|
||||
|
@ -1591,7 +1591,7 @@ class BBCode
|
|||
}
|
||||
}
|
||||
if ($heading_count > 0) {
|
||||
$heading = min($heading_count + 3, 6);
|
||||
$heading = min($heading_count + 2, 6);
|
||||
for ($level = 6; $level > 0; $level--) {
|
||||
if (preg_match("(\[h$level\].*?\[\/h$level\])ism", $text)) {
|
||||
$text = preg_replace("(\[h$level\](.*?)\[\/h$level\])ism", "</p><h$heading>$1</h$heading><p>", $text);
|
||||
|
|
|
@ -134,6 +134,6 @@ class BaseProfile extends BaseModule
|
|||
|
||||
$tpl = Renderer::getMarkupTemplate('common_tabs.tpl');
|
||||
|
||||
return Renderer::replaceMacros($tpl, ['$tabs' => $arr['tabs']]);
|
||||
return Renderer::replaceMacros($tpl, ['$tabs' => $arr['tabs'], '$more' => DI::l10n()->t('More')]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -119,6 +119,8 @@ class Show extends BaseModule
|
|||
'$week' => $this->t('week'),
|
||||
'$day' => $this->t('day'),
|
||||
'$list' => $this->t('list'),
|
||||
'$prev' => $this->t('prev'),
|
||||
'$next' => $this->t('next'),
|
||||
]);
|
||||
|
||||
return $o;
|
||||
|
|
|
@ -387,7 +387,7 @@ class Contact extends BaseModule
|
|||
];
|
||||
|
||||
$tabs_tpl = Renderer::getMarkupTemplate('common_tabs.tpl');
|
||||
$tabs_html = Renderer::replaceMacros($tabs_tpl, ['$tabs' => $tabs]);
|
||||
$tabs_html = Renderer::replaceMacros($tabs_tpl, ['$tabs' => $tabs, '$more' => DI::l10n()->t('More')]);
|
||||
|
||||
switch ($rel) {
|
||||
case 'followers':
|
||||
|
@ -534,7 +534,7 @@ class Contact extends BaseModule
|
|||
}
|
||||
|
||||
$tab_tpl = Renderer::getMarkupTemplate('common_tabs.tpl');
|
||||
$tab_str = Renderer::replaceMacros($tab_tpl, ['$tabs' => $tabs]);
|
||||
$tab_str = Renderer::replaceMacros($tab_tpl, ['$tabs' => $tabs, '$more' => DI::l10n()->t('More')]);
|
||||
|
||||
return $tab_str;
|
||||
}
|
||||
|
|
|
@ -95,7 +95,7 @@ class Channel extends Timeline
|
|||
$tabs = array_merge($tabs, $this->getTabArray($this->community->getTimelines(true), 'channel'));
|
||||
|
||||
$tab_tpl = Renderer::getMarkupTemplate('common_tabs.tpl');
|
||||
$o .= Renderer::replaceMacros($tab_tpl, ['$tabs' => $tabs]);
|
||||
$o .= Renderer::replaceMacros($tab_tpl, ['$tabs' => $tabs, '$more' => $this->l10n->t('More')]);
|
||||
|
||||
Nav::setSelected('channel');
|
||||
|
||||
|
|
|
@ -88,7 +88,7 @@ class Community extends Timeline
|
|||
if (!$this->raw) {
|
||||
$tabs = $this->getTabArray($this->community->getTimelines($this->session->isAuthenticated()), 'community');
|
||||
$tab_tpl = Renderer::getMarkupTemplate('common_tabs.tpl');
|
||||
$o .= Renderer::replaceMacros($tab_tpl, ['$tabs' => $tabs]);
|
||||
$o .= Renderer::replaceMacros($tab_tpl, ['$tabs' => $tabs, '$more' => $this->l10n->t('More')]);
|
||||
|
||||
Nav::setSelected('community');
|
||||
|
||||
|
|
|
@ -292,7 +292,7 @@ class Network extends Timeline
|
|||
|
||||
$tpl = Renderer::getMarkupTemplate('common_tabs.tpl');
|
||||
|
||||
return Renderer::replaceMacros($tpl, ['$tabs' => $tabs]);
|
||||
return Renderer::replaceMacros($tpl, ['$tabs' => $tabs, '$more' => $this->l10n->t('More')]);
|
||||
}
|
||||
|
||||
protected function parseRequest(array $request)
|
||||
|
|
|
@ -99,7 +99,7 @@ abstract class BaseUsers extends BaseModeration
|
|||
Hook::callAll('moderation_users_tabs', $tabs_arr);
|
||||
|
||||
$tpl = Renderer::getMarkupTemplate('common_tabs.tpl');
|
||||
return Renderer::replaceMacros($tpl, ['$tabs' => $tabs_arr['tabs']]);
|
||||
return Renderer::replaceMacros($tpl, ['$tabs' => $tabs_arr['tabs'], '$more' => $this->t('More')]);
|
||||
}
|
||||
|
||||
protected function setupUserCallback(): \Closure
|
||||
|
|
|
@ -498,8 +498,10 @@ class Post
|
|||
}
|
||||
|
||||
$languages = [];
|
||||
$language = '';
|
||||
if (!empty($item['language'])) {
|
||||
$languages = DI::l10n()->t('Languages');
|
||||
$language = array_key_first(json_decode($item['language'], true));
|
||||
}
|
||||
|
||||
if (in_array($item['private'], [Item::PUBLIC, Item::UNLISTED]) && in_array($item['network'], Protocol::FEDERATED)) {
|
||||
|
@ -579,6 +581,7 @@ class Post
|
|||
'tagger' => $tagger,
|
||||
'filer' => $filer,
|
||||
'language' => $languages,
|
||||
'lang' => $language,
|
||||
'searchtext' => DI::l10n()->t('Search Text'),
|
||||
'drop' => $drop,
|
||||
'block' => $block,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue