Commit 65d43bad authored by bastardijke's avatar bastardijke Committed by Alexander Makarov

Fixes #196: Remove `role="form"` from `yii\bootstrap\ActiveForm` according to...

Fixes #196: Remove `role="form"` from `yii\bootstrap\ActiveForm` according to new aria specification
parent f0fb0093
...@@ -70,9 +70,9 @@ class ActiveForm extends \yii\widgets\ActiveForm ...@@ -70,9 +70,9 @@ class ActiveForm extends \yii\widgets\ActiveForm
*/ */
public $fieldClass = 'yii\bootstrap\ActiveField'; public $fieldClass = 'yii\bootstrap\ActiveField';
/** /**
* @var array HTML attributes for the form tag. Default is `['role' => 'form']`. * @var array HTML attributes for the form tag. Default is `[]`.
*/ */
public $options = ['role' => 'form']; public $options = [];
/** /**
* @var string the form layout. Either 'default', 'horizontal' or 'inline'. * @var string the form layout. Either 'default', 'horizontal' or 'inline'.
* By choosing a layout, an appropriate default field configuration is applied. This will * By choosing a layout, an appropriate default field configuration is applied. This will
......
...@@ -12,6 +12,7 @@ Yii Framework 2 bootstrap extension Change Log ...@@ -12,6 +12,7 @@ Yii Framework 2 bootstrap extension Change Log
- Bug #143: Fixed `yii\bootstrap\Nav` to use tags according to bootstrap docs (PowerGamer1) - Bug #143: Fixed `yii\bootstrap\Nav` to use tags according to bootstrap docs (PowerGamer1)
- Bug #162: Fixed `yii\bootstrap\Nav` not taking explicit `active` into account when `activateItems` is off (samdark) - Bug #162: Fixed `yii\bootstrap\Nav` not taking explicit `active` into account when `activateItems` is off (samdark)
- Enh #174: Added `yii\bootstrap\Tabs::renderPanes()` to allow extending the class to manipulate the content between the tabs and the content (thiagotalma) - Enh #174: Added `yii\bootstrap\Tabs::renderPanes()` to allow extending the class to manipulate the content between the tabs and the content (thiagotalma)
- Bug #196: Remove `role="form"` from `yii\bootstrap\ActiveForm` according to new aria specification (bastardijke)
2.0.6 March 17, 2016 2.0.6 March 17, 2016
-------------------- --------------------
......
<?php
namespace yiiunit\extensions\bootstrap;
use yii\bootstrap\ActiveForm;
/**
* Tests for ActiveForm widget
*
* @group bootstrap
*/
class ActiveFormTest extends TestCase
{
protected function setUp()
{
// dirty way to have Request object not throwing exception when running testFormNoRoleAttribute()
$_SERVER['REQUEST_URI'] = "index.php";
parent::setUp();
}
/**
* Fixes #196
*/
public function testFormNoRoleAttribute()
{
$form = ActiveForm::widget();
$this->assertNotContains('role="form"', $form);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment