DashboardSettings: Link labels to inputs (#41680)

* TimePickerSettings: make label appropriately link to input when clicked

* DashboardSettings: link labels to input

* use loweercase instead for IDs

* fixes failing e2e test
This commit is contained in:
Uchechukwu Obasi
2021-11-16 16:58:33 +01:00
committed by GitHub
parent b233a7d8d2
commit ea113be251
5 changed files with 24 additions and 4 deletions

View File

@@ -98,7 +98,7 @@ export function GeneralSettingsUnconnected({ dashboard, updateTimeZone, updateWe
<Input id="description-input" name="description" onBlur={onBlur} defaultValue={dashboard.description} />
</Field>
<Field label="Tags">
<TagsInput tags={dashboard.tags} onChange={onTagsChange} />
<TagsInput id="tags-input" tags={dashboard.tags} onChange={onTagsChange} />
</Field>
<Field label="Folder">
<FolderPicker

View File

@@ -67,6 +67,7 @@ export class TimePickerSettings extends PureComponent<Props, State> {
<CollapsableSection label="Time options" isOpen={true}>
<Field label="Timezone" aria-label={selectors.components.TimeZonePicker.container}>
<TimeZonePicker
inputId="time-options-input"
includeInternal={true}
value={this.props.timezone}
onChange={this.onTimeZoneChange}
@@ -74,7 +75,12 @@ export class TimePickerSettings extends PureComponent<Props, State> {
/>
</Field>
<Field label="Week start" aria-label={selectors.components.WeekStartPicker.container}>
<WeekStartPicker width={40} value={this.props.weekStart} onChange={this.onWeekStartChange} />
<WeekStartPicker
inputId="week-start-input"
width={40}
value={this.props.weekStart}
onChange={this.onWeekStartChange}
/>
</Field>
<AutoRefreshIntervals
refreshIntervals={this.props.refreshIntervals}