Fixed accessibility aria-hidden modal issue

This commit is contained in:
buddh4 2017-06-01 17:51:43 +02:00
parent 2ec9f6c93f
commit b87af4d18f
5 changed files with 10 additions and 10 deletions

View File

@ -2,7 +2,7 @@
/**
* This file is generated by the "yii asset" command.
* DO NOT MODIFY THIS FILE DIRECTLY.
* @version 2017-05-10 23:36:35
* @version 2017-06-01 17:50:41
*/
return [
'all' => [
@ -10,7 +10,7 @@ return [
'basePath' => '@webroot-static',
'baseUrl' => '@web-static',
'js' => [
'js/all-c926aeb5b9f596dc2753c4b0fd951cf9.js',
'js/all-fedc7c1969a43dcc4dc6c01d275ef574.js',
],
'css' => [
'css/all-f3df348618e1b371f6a5c7414de1ac08.css',

View File

@ -158,7 +158,7 @@ abstract class ContentContainerActiveRecord extends ActiveRecord
* Returns the related ContentContainer model (e.g. Space or User)
*
* @see ContentContainer
* @return \yii\db\ActiveQuery
* @return ContentContainer
*/
public function getContentContainerRecord()
{

View File

@ -14,7 +14,7 @@ use \yii\helpers\Url;
<?php else: ?>
<ul class="nav">
<li class="dropdown account">
<a href="#" id="account-dropdown-link" class="dropdown-toggle" data-toggle="dropdown">
<a href="#" id="account-dropdown-link" class="dropdown-toggle" data-toggle="dropdown" aria-label="<?= Yii::t('base', 'Profile dropdown')?>">
<?php if ($this->context->showUserName): ?>
<div class="user-title pull-left hidden-xs">
@ -24,7 +24,7 @@ use \yii\helpers\Url;
<img id="user-account-image" class="img-rounded"
src="<?= Yii::$app->user->getIdentity()->getProfileImage()->getUrl(); ?>"
height="32" width="32" alt="32x32" data-src="holder.js/32x32"
height="32" width="32" alt="<?= Yii::t('base', 'My profile image')?>" data-src="holder.js/32x32"
style="width: 32px; height: 32px;"/>
<b class="caret"></b>

View File

@ -294,6 +294,7 @@ humhub.module('ui.modal', function (module, require, $) {
} else {
this.$.modal('show');
}
}
};
@ -501,15 +502,13 @@ humhub.module('ui.modal', function (module, require, $) {
});
module.globalConfirm = ConfirmModal.instance('#globalModalConfirm');
/*module.confirm = function(cfg) {
return module.globalConfirm.open(cfg);
};*/
_setModalEnforceFocus();
_setGlobalModalTargetHandler();
$(document).on('show.bs.modal', '.modal', function (event) {
$(this).appendTo($('body'));
$(this).attr('aria-hidden', 'false');
});
$(document).on('shown.bs.modal', '.modal.in', function (event) {
@ -518,6 +517,7 @@ humhub.module('ui.modal', function (module, require, $) {
$(document).on('hidden.bs.modal', '.modal', function (event) {
_setModalsAndBackdropsOrder();
$(this).attr('aria-hidden', 'true');
});
};