Harvester Dashboard and the Rancher UI Library: Backporting Accessible Comboboxes to React 17
0 reputation · 20 Feb 2020, 15:39 UTC
0 reputation · 20 Feb 2020, 15:39 UTC
Harvester's web dashboard is built on the Rancher Dashboard framework, so its form controls inherit the Rancher UI component library. In the 1.3.x series, the storage-class and network selectors in the VM-create wizard are custom dropdowns with reported keyboard and screen-reader gaps, while the library's newer accessible select/combobox primitives reportedly require React 18 — and Harvester's dashboard has stayed on React 17.
That frames an integration decision at the boundary between the two projects: backport the newer primitives into Harvester's React 17 codebase, or wait for the planned React 18 migration in a future Harvester release and accept the delay.
Constraints: Harvester tracks Rancher Dashboard releases closely, so a fork-level React bump risks upstream drift. Harvester's CI reportedly has no automated accessibility gate to catch regressions on either path, and theme overrides can reintroduce contrast failures that better primitives alone will not address.
Version assumptions here reflect the 1.3.x line and should be confirmed against the current dashboard repository before triage.
35275 reputation · 20 Feb 2020, 16:47 UTC
The newer Combobox and Select primitives in the Rancher UI library are likely incompatible with Harvester's React 17 codebase. These components typically rely on React 18 features, such as the useId hook for generating stable accessibility IDs and concurrent rendering APIs for managing focus and live-region updates. Attempting to import these into a React 17 environment will likely result in runtime errors or build-time type mismatches.
There are two primary paths to resolve the accessibility gaps in the VM-create wizard:
useId to allow the components to render, this approach is high-risk. A shim can approximate the HTML markup, but it cannot replicate the internal React 18 fiber logic that ensures precise focus management and screen-reader announcements. This may result in "half-working" accessibility that passes basic checks but fails in real-world usage.To confirm the compatibility status before making a architectural decision, perform the following scoped checks:
package.json of the @rancher/ui library. If react is listed as a peer dependency with a version requirement of ^18.0.0, the components will not function in React 17.Combobox component into a isolated test page:
import { Combobox } from '@rancher/ui';
Observe if the build fails or if the browser console reports TypeError: (0, _react.useId) is not a function.useId or useDeferredValue. If these are present without a version-based fallback, the components are strictly React 18+.This analysis assumes the 1.3.x series of Harvester remains on React 17. It is uncertain whether the Rancher UI library has implemented internal polyfills for these hooks; however, standard library patterns usually favor peer dependency requirements over internal shims to avoid bundle bloat. Furthermore, since there is no automated accessibility gate in CI, any manual backport would require extensive manual verification with screen readers (e.g., NVDA or VoiceOver) to ensure no regressions were introduced.
Required Diagnostic Detail: Are there specific accessibility failures (e.g., missing aria-expanded states or keyboard trap issues) in the current custom dropdowns that must be fixed immediately, or can they be mitigated with CSS/HTML patches while waiting for React 18?
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.