diff --git a/src/modules/ngFormLib/controls/common/FormControlService.js b/src/modules/ngFormLib/controls/common/FormControlService.js index 8695b64..ae0d8b2 100644 --- a/src/modules/ngFormLib/controls/common/FormControlService.js +++ b/src/modules/ngFormLib/controls/common/FormControlService.js @@ -276,7 +276,6 @@ mod.provider('formControlService', function Provider() { } inputElem.attr('ng-required', required); - inputElem.attr('aria-required', '{{!!(' + required + ')}}'); // evaluates to true / false return inputElem; }, diff --git a/src/modules/ngFormLib/controls/common/docs/formControlsCommonProperties.docs.html b/src/modules/ngFormLib/controls/common/docs/formControlsCommonProperties.docs.html index 923ec86..0751518 100644 --- a/src/modules/ngFormLib/controls/common/docs/formControlsCommonProperties.docs.html +++ b/src/modules/ngFormLib/controls/common/docs/formControlsCommonProperties.docs.html @@ -24,7 +24,7 @@ required expression false - An expression that determines the value of ng-required, aria-required and the required indicator on the <label> + An expression that determines the value of ng-required and the required indicator on the <label> hide-required-indicator diff --git a/src/modules/ngFormLib/controls/common/unitTest/FormControlsService.spec.js b/src/modules/ngFormLib/controls/common/unitTest/FormControlsService.spec.js index abdf15d..38a2552 100644 --- a/src/modules/ngFormLib/controls/common/unitTest/FormControlsService.spec.js +++ b/src/modules/ngFormLib/controls/common/unitTest/FormControlsService.spec.js @@ -111,7 +111,7 @@ describe('Form controls common library', function() { formControlService.decorateInputField(elem, hostElem, attr, 'myId', 'myName', 'state === \'VIC\''); - expect(elem[0].outerHTML).toEqual(''); + expect(elem[0].outerHTML).toEqual(''); expect(hostElem[0].outerHTML).toEqual('
'); }); @@ -128,7 +128,7 @@ describe('Form controls common library', function() { formControlService.decorateInputField(elem, hostElem, attr, 'myId', 'myName', 'true'); - expect(elem[0].outerHTML).toEqual(''); + expect(elem[0].outerHTML).toEqual(''); expect(hostElem[0].outerHTML).toEqual('
'); }); }); diff --git a/src/modules/ngFormLib/controls/formCheckbox/unitTest/FormCheckbox.spec.js b/src/modules/ngFormLib/controls/formCheckbox/unitTest/FormCheckbox.spec.js index d9ced3f..2fd7487 100644 --- a/src/modules/ngFormLib/controls/formCheckbox/unitTest/FormCheckbox.spec.js +++ b/src/modules/ngFormLib/controls/formCheckbox/unitTest/FormCheckbox.spec.js @@ -23,7 +23,7 @@ describe('when I use the Form Checkbox button it', function() { it('should create a checkbox with the minimum markup', function() { elem = compileElement('My label'); - expect(elem.find('input')[0].outerHTML).toEqual(''); + expect(elem.find('input')[0].outerHTML).toEqual(''); expect(elem.find('label')[0].outerHTML).toEqual(''); }); @@ -33,7 +33,7 @@ describe('when I use the Form Checkbox button it', function() { // Little bit weird: The checkbox has a ng-checked=true initial state, but the model value 'state' does not exist! So the field looks checked, but it is invalid! // In practice, ng-checked should be an expression, or even better, just put a value into the model. - expect(elem.find('input')[0].outerHTML).toMatch(''); + expect(elem.find('input')[0].outerHTML).toMatch(''); // expect(elem.find('label')[0].outerHTML).toEqual(''); }); }); diff --git a/src/modules/ngFormLib/controls/formDate/unitTest/FormDateInput.spec.js b/src/modules/ngFormLib/controls/formDate/unitTest/FormDateInput.spec.js index 6d81721..375e000 100644 --- a/src/modules/ngFormLib/controls/formDate/unitTest/FormDateInput.spec.js +++ b/src/modules/ngFormLib/controls/formDate/unitTest/FormDateInput.spec.js @@ -140,7 +140,7 @@ describe('Date Directives spec,', function() { expect(elem.html()).toMatch('
' + '' + - '
' + + '
' + '
'); }); diff --git a/src/modules/ngFormLib/controls/formInput/unitTest/FormInput.spec.js b/src/modules/ngFormLib/controls/formInput/unitTest/FormInput.spec.js index 8195162..9ae0527 100644 --- a/src/modules/ngFormLib/controls/formInput/unitTest/FormInput.spec.js +++ b/src/modules/ngFormLib/controls/formInput/unitTest/FormInput.spec.js @@ -27,7 +27,7 @@ describe('Form Input Directive', function() { expect(elem.html()).toEqual('
' + '
' + - '' + + '' + '
'); }); @@ -40,14 +40,14 @@ describe('Form Input Directive', function() { // Initialy the required marker is not showing and the input is not required expect(elem.find('label')[0].outerHTML).toEqual(''); - expect(elem.find('input')[0].outerHTML).toEqual(''); + expect(elem.find('input')[0].outerHTML).toEqual(''); scope.some.value = 'something'; scope.$digest(); // The required marker is now showing and the input field has a required attribute expect(elem.find('label')[0].outerHTML).toEqual(''); - expect(elem.find('input')[0].outerHTML).toEqual(''); + expect(elem.find('input')[0].outerHTML).toEqual(''); // Now change it falsy again scope.some.value = 0; @@ -55,7 +55,7 @@ describe('Form Input Directive', function() { // The required marker is hidden again and the input field no longer has a required attribute expect(elem.find('label')[0].outerHTML).toEqual(''); - expect(elem.find('input')[0].outerHTML).toEqual(''); + expect(elem.find('input')[0].outerHTML).toEqual(''); }); @@ -67,13 +67,13 @@ describe('Form Input Directive', function() { it('should create a form input element and apply all ff- prefixed attributes to the '); - expect(elem.find('input')[0].outerHTML).toEqual(''); + expect(elem.find('input')[0].outerHTML).toEqual(''); }); it('should allow the placeholder attribute to be specified as "placeholder"', function() { elem = compileElement(''); - expect(elem.find('input')[0].outerHTML).toEqual(''); + expect(elem.find('input')[0].outerHTML).toEqual(''); }); @@ -86,34 +86,34 @@ describe('Form Input Directive', function() { it('should allow the placeholder attribute to be specified as "ff-placeholder" too', function() { // Now use ff-placeholder elem = compileElement(''); - expect(elem.find('input')[0].outerHTML).toEqual(''); + expect(elem.find('input')[0].outerHTML).toEqual(''); }); it('should support input-prefix to add a Bootstrap input group addon before the field', function() { elem = compileElement(''); - expect(elem.find('input').parent()[0].outerHTML).toEqual('
AUD
'); + expect(elem.find('input').parent()[0].outerHTML).toEqual('
AUD
'); }); it('should support input-suffix to add a Bootstrap input group addon after the field', function() { elem = compileElement(''); - expect(elem.find('input').parent()[0].outerHTML).toEqual('
per hour
'); + expect(elem.find('input').parent()[0].outerHTML).toEqual('
per hour
'); }); it('should support both input-prefix and input-suffix to add a Bootstrap input group addons before and after the field', function() { elem = compileElement(''); - expect(elem.find('input').parent()[0].outerHTML).toEqual('
$per hour
'); + expect(elem.find('input').parent()[0].outerHTML).toEqual('
$per hour
'); }); it('should support input-button-prefix to add a Bootstrap input group button addon before the field, without a click handler', function() { elem = compileElement(''); - expect(elem.find('input').parent()[0].outerHTML).toEqual('
'); + expect(elem.find('input').parent()[0].outerHTML).toEqual('
'); }); it('should support input-button-prefix to add a Bootstrap input group button addon before the field, with a click handler', function() { scope.foo = jasmine.createSpy('foo'); elem = compileElement(''); - expect(elem.find('input').parent()[0].outerHTML).toEqual('
'); + expect(elem.find('input').parent()[0].outerHTML).toEqual('
'); expect(scope.foo).not.toHaveBeenCalled(); elem.find('button').triggerHandler('click'); @@ -123,14 +123,14 @@ describe('Form Input Directive', function() { it('should support input-button-suffix to add a Bootstrap input group button addon after the field, without a click handler', function() { elem = compileElement(''); - expect(elem.find('input').parent()[0].outerHTML).toEqual('
'); + expect(elem.find('input').parent()[0].outerHTML).toEqual('
'); }); it('should support input-button-prefix and input-button-suffix with a click handlers', function() { scope.foo = jasmine.createSpy('foo'); scope.bar = jasmine.createSpy('bar'); elem = compileElement(''); - expect(elem.find('input').parent()[0].outerHTML).toEqual('
'); + expect(elem.find('input').parent()[0].outerHTML).toEqual('
'); expect(scope.foo).not.toHaveBeenCalled(); expect(scope.bar).not.toHaveBeenCalled(); @@ -176,7 +176,7 @@ describe('Form Input Directive', function() { // // Error block is produced, but is initially hidden // expect(elem.find('div').eq(2).html()).toEqual(''); - // expect(elem.find('input')[0].outerHTML).toEqual(''); + // expect(elem.find('input')[0].outerHTML).toEqual(''); // // Submit the form, then the error should appear diff --git a/src/modules/ngFormLib/controls/formRadioButton/unitTest/FormRadioButton.spec.js b/src/modules/ngFormLib/controls/formRadioButton/unitTest/FormRadioButton.spec.js index f6a9637..bc85de9 100644 --- a/src/modules/ngFormLib/controls/formRadioButton/unitTest/FormRadioButton.spec.js +++ b/src/modules/ngFormLib/controls/formRadioButton/unitTest/FormRadioButton.spec.js @@ -25,7 +25,7 @@ describe('when I use the Form Radio Button it', function() { elem = compileElement('My label'); // Added form directive bits HTML changes initially - expect(elem.find('input')[0].outerHTML).toEqual(''); + expect(elem.find('input')[0].outerHTML).toEqual(''); expect(elem.find('label')[0].outerHTML).toEqual(''); }); @@ -33,7 +33,7 @@ describe('when I use the Form Radio Button it', function() { it('should create a radio button with a uid + name + change() + required', function() { elem = compileElement(''); - expect(elem.find('input')[0].outerHTML).toMatch(''); + expect(elem.find('input')[0].outerHTML).toMatch(''); expect(elem.find('label')[0].outerHTML).toEqual(''); }); }); diff --git a/src/modules/ngFormLib/controls/formSelect/unitTest/FormSelect.spec.js b/src/modules/ngFormLib/controls/formSelect/unitTest/FormSelect.spec.js index 745d68a..93b61af 100644 --- a/src/modules/ngFormLib/controls/formSelect/unitTest/FormSelect.spec.js +++ b/src/modules/ngFormLib/controls/formSelect/unitTest/FormSelect.spec.js @@ -24,7 +24,7 @@ describe('Form Select directive', function() { it('should create a select dropdown with the minimum markup', function() { elem = compileElement(''); - expect(elem.find('select')[0].outerHTML).toEqual(''); + expect(elem.find('select')[0].outerHTML).toEqual(''); expect(elem.find('select').length).toEqual(1); });