bito-code-review[bot] commented on code in PR #39245:
URL: https://github.com/apache/superset/pull/39245#discussion_r3232758403


##########
superset-frontend/src/explore/components/controls/TextControl/index.tsx:
##########
@@ -104,9 +104,15 @@ export default class TextControl<
       this.initialValue = this.props.value;
       value = safeStringify(this.props.value);
     }
+    const hasErrors =
+      this.props.validationErrors && this.props.validationErrors.length > 0;
+    const inputId = this.props.controlId || this.props.name;
+    // WCAG 3.3.1: share a single error container id with ControlHeader so
+    // the input's aria-describedby resolves to one live-region, not two.
+    const errorId = hasErrors && inputId ? `${inputId}-error` : undefined;
     return (
       <div>
-        <ControlHeader {...this.props} />
+        <ControlHeader {...this.props} errorId={errorId} />

Review Comment:
   <!-- Bito Reply -->
   The suggestion is valid — it fixes duplicate DOM ids by assigning a distinct 
suffix ('-input-error') to the visible error span's id, ensuring unique 
identifiers for both the hidden (ControlHeader) and visible (TextControl) error 
elements. This maintains both channels without breaking accessibility for 
screen readers or sighted users.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to