|
1 | 1 | <div class="form-group schema-form-{{form.type}} {{form.htmlClass}}" |
2 | 2 | ng-class="{'has-error': hasError(), 'has-success': hasSuccess(), 'has-feedback': form.feedback !== false }"> |
3 | | - <label class="control-label" ng-show="showTitle()">{{form.title}}</label> |
| 3 | + <label class="control-label" ng-class="{'sr-only': !showTitle()}" for="{{form.key.slice(-1)[0]}}">{{form.title}}</label> |
4 | 4 |
|
5 | 5 | <input ng-show="form.key" |
6 | 6 | type="{{form.type}}" |
7 | 7 | step="any" |
8 | 8 | sf-changed="form" |
9 | 9 | placeholder="{{form.placeholder}}" |
10 | 10 | class="form-control {{form.fieldHtmlClass}}" |
| 11 | + id="{{form.key.slice(-1)[0]}}" |
11 | 12 | ng-model-options="form.ngModelOptions" |
12 | 13 | ng-model="$$value$$" |
13 | 14 | ng-disabled="form.readonly" |
14 | 15 | schema-validate="form" |
15 | | - name="{{form.key.slice(-1)[0]}}"> |
| 16 | + name="{{form.key.slice(-1)[0]}}" |
| 17 | + aria-describedby="{{form.key.slice(-1)[0] + 'Status'}}"> |
16 | 18 | <span ng-if="form.feedback !== false" |
17 | 19 | class="form-control-feedback" |
18 | | - ng-class="evalInScope(form.feedback) || {'glyphicon': true, 'glyphicon-ok': hasSuccess(), 'glyphicon-remove': hasError() }"></span> |
| 20 | + ng-class="evalInScope(form.feedback) || {'glyphicon': true, 'glyphicon-ok': hasSuccess(), 'glyphicon-remove': hasError() }" |
| 21 | + aria-hidden="true"></span> |
| 22 | + <span ng-if="hasError() || hasSuccess()" |
| 23 | + id="{{form.key.slice(-1)[0] + 'Status'}}" |
| 24 | + class="sr-only">{{ hasSuccess() ? '(success)' : '(error)' }}</span> |
19 | 25 | <div class="help-block" |
20 | 26 | ng-show="(hasError() && errorMessage(schemaError())) || form.description" |
21 | 27 | ng-bind-html="(hasError() && errorMessage(schemaError())) || form.description"></div> |
|
0 commit comments