Compare commits

..

1 Commits

Author SHA1 Message Date
Franck Nijhof 87bdaee056 Group the time and duration input fields for screen readers
The day, hour, minute, second, and millisecond inputs were rendered as
separate fields with a label that was not associated with them, so screen
readers announced them as unrelated inputs.

Wrap the fields in a role=group and label that group with the visible label,
so they are announced together as one labeled control.
2026-06-19 15:28:47 +00:00
5 changed files with 18 additions and 28 deletions
+1 -1
View File
@@ -36,7 +36,7 @@
"@codemirror/lang-yaml": "6.1.3",
"@codemirror/language": "6.12.3",
"@codemirror/lint": "6.9.7",
"@codemirror/search": "6.7.1",
"@codemirror/search": "6.7.0",
"@codemirror/state": "6.6.0",
"@codemirror/view": "6.43.1",
"@date-fns/tz": "1.5.0",
+4 -6
View File
@@ -400,12 +400,10 @@ ${JSON.stringify(toolCall.result, null, 2)}</pre
private _handleToggleThinking(ev: Event) {
const index = (ev.currentTarget as any).index;
// Mutate the message in place rather than replacing it. The streaming
// processor keeps a reference to this same object and mutates it as deltas
// arrive; swapping in a new object would detach the in-flight message from
// the processor and freeze the chat (see #52501).
const message = this._conversation[index];
message.thinking_expanded = !message.thinking_expanded;
this._conversation[index] = {
...this._conversation[index],
thinking_expanded: !this._conversation[index].thinking_expanded,
};
this.requestUpdate("_conversation");
}
+8 -2
View File
@@ -153,10 +153,16 @@ export class HaBaseTimeInput extends LitElement {
protected render(): TemplateResult {
return html`
${this.label
? html`<label>${this.label}${this.required ? " *" : ""}</label>`
? html`<label id="label"
>${this.label}${this.required ? " *" : ""}</label
>`
: nothing}
<div class="time-input-wrap-wrap">
<div class="time-input-wrap">
<div
class="time-input-wrap"
role="group"
aria-labelledby=${ifDefined(this.label ? "label" : undefined)}
>
${this.enableDay
? html`
<ha-input
@@ -64,10 +64,6 @@ class HaPanelDevTemplate extends LitElement {
private _inited = false;
// Bumped on every (re)subscribe so a superseded render can be detected and
// its late-arriving results discarded.
private _subscribeRequestId = 0;
private _tipResizeObserver?: ResizeObserver;
public connectedCallback() {
@@ -506,14 +502,8 @@ ${type === "object"
}
private async _subscribeTemplate() {
const requestId = ++this._subscribeRequestId;
this._rendering = true;
await this._unsubscribeTemplate();
// A newer render started while we were unsubscribing; let it win so we do
// not leave a stale subscription running that overwrites the result.
if (requestId !== this._subscribeRequestId) {
return;
}
this._error = undefined;
this._errorLevel = undefined;
this._templateResult = undefined;
@@ -521,10 +511,6 @@ ${type === "object"
this._unsubRenderTemplate = subscribeRenderTemplate(
this.hass.connection,
(result) => {
// Ignore results from a render that has since been superseded.
if (requestId !== this._subscribeRequestId) {
return;
}
if ("error" in result) {
// We show the latest error, or a warning if there are no errors
if (result.level === "ERROR" || this._errorLevel !== "ERROR") {
+5 -5
View File
@@ -1363,14 +1363,14 @@ __metadata:
languageName: node
linkType: hard
"@codemirror/search@npm:6.7.1":
version: 6.7.1
resolution: "@codemirror/search@npm:6.7.1"
"@codemirror/search@npm:6.7.0":
version: 6.7.0
resolution: "@codemirror/search@npm:6.7.0"
dependencies:
"@codemirror/state": "npm:^6.0.0"
"@codemirror/view": "npm:^6.37.0"
crelt: "npm:^1.0.5"
checksum: 10/97b6be5397a332d0882ef3967d6ffb518606c95b7157f7120c47013f223cdd0e8d6aa2ff412ac870d60828dd9f871b67733bde8bf517564cf84f40d5c0fb7537
checksum: 10/29b7d8adeb5317ea45bf3c03c6c5ab18210efe800ebc89dd11b4a77827966a8ef85dda082517fe278e470b5ead21e6b29e590d3060775a41d3179bbd74711279
languageName: node
linkType: hard
@@ -8531,7 +8531,7 @@ __metadata:
"@codemirror/lang-yaml": "npm:6.1.3"
"@codemirror/language": "npm:6.12.3"
"@codemirror/lint": "npm:6.9.7"
"@codemirror/search": "npm:6.7.1"
"@codemirror/search": "npm:6.7.0"
"@codemirror/state": "npm:6.6.0"
"@codemirror/view": "npm:6.43.1"
"@date-fns/tz": "npm:1.5.0"