No such column error lacks accessibility context for screen reader users
0 reputation · 09 Oct 2023, 13:12 UTC
0 reputation · 09 Oct 2023, 13:12 UTC
ClickHouse returns a 'No such column' error when column names contain mixed case and default case sensitivity is enabled, requiring exact identifier matching. This error message does not provide sufficient context for users relying on screen readers, as it lacks descriptive guidance about the specific nature of the accessibility barrier encountered.
The default query parser does not provide detailed accessibility context in error messages for screen reader users. When a column reference fails due to case sensitivity mismatches, the error output contains minimal information about why the lookup failed or how to correct the identifier format.
Additionally, column aliases with special characters require explicit quoting which may not be intuitive for all users, compounding the accessibility challenges when constructing queries with complex identifiers.
code, message, and stack_trace fields — no ARIA labels, remediation hints, or screen-reader annotations.send_logs_level and log_level settings, but these control logging volume, not error-message structure. They cannot add accessibility metadata to the error payload returned to the client.Exception::create() with ErrorCodes::NO_SUCH_COLUMN_IN_TABLE (code 47). Error formatting is centralized in formatErrorMessage(). An extension would require modifying this function to accept an optional accessibility context object and propagating it through the protocol layer — a non-trivial change affecting all client interfaces.\"MixedCase\" must be referenced with double quotes or it resolves to mixedcase, triggering "No such column".case_insensitive_identifiers=1 setting (added in 23.8) changes parser behavior globally but does not enrich error output.default_format=JSON returns {\"code\":47,\"message\":\"DB::Exception: No such column: ColumnName\",...} — no accessibility fields.ClickHouse's error system was designed for programmatic consumption (code + message) and operational logging. Screen-reader compatibility depends on the client application (clickhouse-client, JDBC driver, HTTP wrapper) announcing the error text. Server-side changes alone are insufficient — the client must expose the structured data to assistive technology. The project has prioritized parser correctness and performance over error-message richness.
SET log_queries = 1;Then query system.query_log for the failed statement and error.try { client.execute(query); }\ncatch (ClickHouseException e) {\n if (e.code == 47) {\n announce(\"Column not found. Check case sensitivity: \" +\n \"unquoted identifiers are lowercased. \" +\n \"Use double quotes for mixed-case names.\");\n }\n}SET case_insensitive_identifiers = 1;This avoids the error class entirely but changes query semantics — not recommended for production without testing.Which client interface are your screen-reader users employing? (clickhouse-client CLI, JDBC/ODBC driver, HTTP API wrapper, or a custom application?) The answer determines whether a client-side wrapper can inject accessibility context or whether a server-side protocol change is the only path.
Use comments to ask for clarification. Post a solution as an answer.
35,775 reputation · 09 Oct 2023, 14:52 UTC
ClickHouse returns the same ErrorCodes::NO_SUCH_COLUMN_IN_TABLE (code 47) whether a column is genuinely absent or only mismatches in case, so the server payload alone cannot tell a screen reader which barrier occurred. The case_insensitive_identifiers setting, if your server exposes it (23.8+), can prevent the failure for mixed-case unquoted identifiers, but it does not add descriptive guidance to the error message. A practical check is to run the failing query over HTTP with default_format=JSON and compare the message string against a query for a column that does not exist at all; if the text is identical, any remediation hint must come from the client UI rather than the server error object.