-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Management] Improve accessibility within management #13364
Changes from 3 commits
7430a3d
e7f6e36
14b8e23
43a664b
e99955d
21ea3ac
1fe2f2d
ad0575f
0bf778a
04f9f7f
dbc6e38
124c3af
d031b93
fa8d64c
ca0cccd
f6f82ab
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,10 @@ | ||
<div class="form-group"> | ||
<label>Field Length</label> | ||
<input ng-model="editor.formatParams.fieldLength" class="form-control"> | ||
<label for="scriptFieldTruncateLength">Field Length</label> | ||
<input | ||
id="scriptFieldTruncateLength" | ||
ng-model="editor.formatParams.fieldLength" | ||
class="form-control" | ||
> | ||
</div> | ||
|
||
<field-format-editor-samples inputs="cntrl.sampleInputs"></field-format-editor-samples> |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,10 @@ uiModules | |
|
||
$scope.$bind('inputs', attrs.inputs); | ||
$scope.$bind('placeholder', attrs.placeholder); | ||
// The id attribute is not always an angular expression but nearly always | ||
// just a string passed in | ||
$scope.id = attrs.id; | ||
attrs.$observe('id', () => $scope.id = attrs.id); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this directive needs Also, I think you can define this a little more simply via the scope: {
id: '@',
}, Did you already give that a shot? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You might also want to double check my assertion about the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You're absolutely right. Good call out |
||
|
||
// bind our local model with the outside ngModel | ||
$scope.$watch('model', ngModelCntrl.$setViewValue); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any requirement for a label here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It corresponds to labels used outside of the directive: https://github.com/elastic/kibana/pull/13364/files#diff-cdc9adaaaf6e3096b1edb04fc611d045
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gotcha 👍