1
0
mirror of https://github.com/e107inc/e107.git synced 2025-04-21 21:21:54 +02:00

- Add labels for screenreaders only to BS3 login menu

This commit is contained in:
Tijn Kuyper 2019-01-27 14:14:10 +01:00
parent 877349ebb0
commit 600ebad5a4

@ -10,22 +10,9 @@
| Released under the terms and conditions of the
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_plugins/login_menu/login_menu_shortcodes.php,v $
| $Revision$
| $Date$
| $Author$
+----------------------------------------------------------------------------+
*/
/**
* e107 Login menu plugin
*
* Shortcodes for login menu
*
* @package e107_plugins
* @subpackage login
*
*/
if (!defined('e107_INIT')) { exit(); }
global $tp;
@ -114,7 +101,9 @@ e107::getLanguage()->bcDefs($bcDefs);
// If logging in with email address - ignore pref and increase to 100 chars.
$maxLength = ($this->allowEmailLogin == 1 || $this->allowEmailLogin) ? 100 : varset($pref['loginname_maxlength'],30);
return "<input class='form-control tbox login user' type='text' name='username' placeholder='".$this->usernameLabel."' required='required' id='".vartrue( $parm['idprefix'] )."username' size='15' value='' maxlength='".$maxLength."' />\n";
return "
<label class='sr-only' for='".vartrue( $parm['idprefix'] )."username'>".$this->usernameLabel."</label>
<input class='form-control tbox login user' type='text' name='username' placeholder='".$this->usernameLabel."' required='required' id='".vartrue( $parm['idprefix'] )."username' size='15' value='' maxlength='".$maxLength."' />\n";
}
@ -127,8 +116,13 @@ e107::getLanguage()->bcDefs($bcDefs);
function sc_lm_password_input($parm='')
{
$pref = e107::getPref();
$t_password = "<input class='form-control tbox login pass' type='password' placeholder='".LAN_PASSWORD."' required='required' name='userpass' id='".vartrue( $parm['idprefix'] )."userpass' size='15' value='' maxlength='30' />\n";
if (!USER && e107::getSession()->is('challenge') && varset($pref['password_CHAP'],0)) $t_password .= "<input type='hidden' name='hashchallenge' id='hashchallenge' value='".e107::getSession()->get('challenge')."' />\n\n";
$t_password = "
<label class='sr-only' for='".vartrue( $parm['idprefix'] )."userpass'>".LAN_PASSWORD."</label>
<input class='form-control tbox login pass' type='password' placeholder='".LAN_PASSWORD."' required='required' name='userpass' id='".vartrue( $parm['idprefix'] )."userpass' size='15' value='' maxlength='30' />\n";
if (!USER && e107::getSession()->is('challenge') && varset($pref['password_CHAP'],0))
$t_password .= "<input type='hidden' name='hashchallenge' id='hashchallenge' value='".e107::getSession()->get('challenge')."' />\n\n";
return $t_password;
}
@ -499,15 +493,8 @@ e107::getLanguage()->bcDefs($bcDefs);
}
}
}
$login_menu_shortcodes = e107::getScBatch('login_menu',TRUE);
?>