[UI] Remove Template Lint A11y Overrides (#12236) (#12276)

* removes require-input-label ember-template-lint override

* adds aria-label to textarea in MaskedInput component

* more a11y fixes for missing labels

* adds aria-label back to lookup-input

* adds aria-label back to select component

* ensures aria-label has value in select component

* removes duplicate onchange handler from lookup-input component

Co-authored-by: Jordan Reimer <zofskeez@gmail.com>
This commit is contained in:
Vault Automation 2026-02-10 12:22:23 -05:00 committed by GitHub
parent 7b433e64ba
commit 93aa30f3b6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 31 additions and 22 deletions

View file

@ -10,7 +10,6 @@ module.exports = {
rules: {
'no-action': 'off',
'require-input-label': 'off',
'no-array-prototype-extensions': 'off',
// from bump to ember-template-lint@6.0.0
'no-builtin-form-components': 'off',

View file

@ -10,13 +10,11 @@
<Chevron />
{{/if}}
<input
aria-label="web R.E.P.L."
aria-describedby="namespace-reminder"
aria-label="Web R.E.P.L."
onkeyup={{action "handleKeyUp"}}
value={{this.value}}
autocomplete="off"
spellcheck="false"
id="console-input"
/>
<Hds::Button
class="hds-side-nav__icon-button"

View file

@ -238,6 +238,7 @@
{{#if this.showPasswordField}}
<Input
{{on "change" (fn this.updatePassword attr.name)}}
aria-label="New password"
@type="password"
@value={{get @model attr.name}}
name={{attr.name}}

View file

@ -9,9 +9,8 @@
<div class="select is-fullwidth">
<select
name="param"
id="param"
onchange={{action (mut this.param) value="target.value"}}
aria-label="lookup by alias name"
aria-label="Lookup parameter"
{{on "change" (action (mut this.param) value="target.value")}}
data-test-select="lookup-param-select"
>
{{#each (array "alias name" "name" "id" "alias id") as |paramOption|}}
@ -29,7 +28,13 @@
{{/if}}
</div>
<div class="control is-expanded">
<Input class="input" @value={{this.paramValue}} placeholder={{capitalize this.param}} data-test-input="param-value" />
<Input
aria-label="Lookup value"
class="input"
@value={{this.paramValue}}
placeholder={{capitalize this.param}}
data-test-input="param-value"
/>
</div>
<div class="control">
<Hds::Button @text="Lookup" @color="secondary" class="is-hidden" type="submit" data-test-submit />

View file

@ -26,7 +26,6 @@
<select
aria-label={{or @label "Select a mount accessor"}}
name={{@name}}
id={{@name}}
{{on "change" this.change}}
data-test-mount-accessor-select
>
@ -55,7 +54,7 @@
{{else}}
<input
name={{@name}}
id={{@name}}
aria-label={{@name}}
class="input"
value={{@value}}
placeholder="Mount accessor"

View file

@ -68,6 +68,7 @@
<div class="column is-one-quarter info-table-row-edit">
<Input
data-test-secret-key="create"
aria-label="Key"
@value={{secret.name}}
placeholder="key"
{{on "change" this.handleChange}}
@ -159,6 +160,7 @@
<div class="column is-one-quarter">
<Input
data-test-secret-key="edit"
aria-label="Key"
@value={{secret.name}}
placeholder="key"
{{on "change" this.handleChange}}

View file

@ -33,7 +33,14 @@
Accessor
</label>
<div class="control">
<Input class="input" autocomplete="off" spellcheck="false" name="accessor" @value={{this.model.id}} />
<Input
aria-label="Accessor"
class="input"
autocomplete="off"
spellcheck="false"
name="accessor"
@value={{this.model.id}}
/>
</div>
</div>
<div class="field is-grouped box is-fullwidth is-bottomless">

View file

@ -132,6 +132,7 @@
</label>
<div class="control">
<Input
aria-label="Key shares"
data-test-key-shares="true"
class="input"
autocomplete="off"
@ -154,6 +155,7 @@
</label>
<div class="control">
<Input
aria-label="Key threshold"
data-test-key-threshold="true"
class="input"
autocomplete="off"

View file

@ -21,6 +21,7 @@
<div class="columns is-variable" data-test-kv-row>
<div class="column is-one-quarter">
<Input
aria-label="Key"
data-test-kv-key={{index}}
@value={{row.name}}
placeholder={{this.placeholders.key}}
@ -40,6 +41,7 @@
/>
{{else}}
<Textarea
aria-label="Value"
data-test-kv-value={{index}}
name={{row.name}}
class="input {{if @validationError 'has-error-border'}}"

View file

@ -22,7 +22,6 @@
{{/if}}
{{else}}
<Textarea
id={{this.textareaId}}
name={{@name}}
@value={{@value}}
class="input masked-value {{unless this.showValue 'masked-font'}}"
@ -32,6 +31,7 @@
aria-label={{or @name "masked input"}}
{{on "change" this.onChange}}
{{on "keyup" (fn this.handleKeyUp @name)}}
{{did-insert this.updateSize}}
data-test-input={{or @name ""}}
/>
{{/if}}

View file

@ -5,7 +5,6 @@
import { debug } from '@ember/debug';
import { action } from '@ember/object';
import { guidFor } from '@ember/object/internals';
import Component from '@glimmer/component';
import { tracked } from '@glimmer/tracking';
import autosize from 'autosize';
@ -26,7 +25,6 @@ import autosize from 'autosize';
*
*/
export default class MaskedInputComponent extends Component {
textareaId = 'textarea-' + guidFor(this);
@tracked showValue = false;
@tracked modalOpen = false;
@tracked stringifyDownload = false;
@ -36,11 +34,10 @@ export default class MaskedInputComponent extends Component {
if (!this.args.onChange && !this.args.displayOnly) {
debug('onChange is required for editable Masked Input!');
}
this.updateSize();
}
updateSize() {
autosize(document.getElementById(this.textareaId));
updateSize(element) {
autosize(element);
}
@action onChange(evt) {

View file

@ -22,7 +22,6 @@
@type="text"
@value={{value}}
name={{field.key}}
id="{{field.key}}-{{index}}"
{{on "input" (fn this.handleInput index)}}
/>
{{#if (and (not inputError.isValid) inputError.errors)}}

View file

@ -12,11 +12,9 @@
<div class="select {{if this.isFullwidth 'is-fullwidth'}}">
<select
class="select"
{{! TODO: when 2 TtlPickers are on the same view this becomes two of the same ids. Shows up as dom warning. JIRA 29298}}
id="select-{{this.name}}"
onchange={{action this.onChange value="target.value"}}
data-test-select={{this.name}}
aria-label={{this.ariaLabel}}
aria-label={{or this.ariaLabel this.name}}
>
{{#if this.noDefault}}
<option value="">

View file

@ -65,7 +65,7 @@
@isFullscreen={{this.consoleFullscreen}}
{{focus-trap
focusTrapOptions=(hash
initialFocus="#console-input"
initialFocus="[aria-label='Web R.E.P.L.']"
escapeDeactivates=true
clickOutsideDeactivates=true
onDeactivate=this.closeConsole