SIGN IN SIGN UP

fix(a11y): give every canvas node a unique accessible name (#14683)

#14673 gave flow-canvas nodes `role="application"`, which makes each node a
composite widget that assistive tech announces by name. `getNodeAriaLabel`
names a node purely from its component display name ("Chat Input node"), so
the moment a flow holds two nodes of the same type they share one accessible
name — screen-reader users hear "Chat Input node" twice with nothing to tell
them apart, and IBM Equal Access flags `aria_application_label_unique`
(WCAG 4.1.2, Level 1 violation). A plain 6-node flow with two same-type pairs
scans with two violations.

Labels are now computed from the whole node list at once
(`getNodeAriaLabels`) so collisions are visible: a label that appears only
once is emitted verbatim — the vast majority of nodes keep exactly the name
they have today — and only members of a colliding group get a trailing
ordinal ("Chat Input node 1" / "Chat Input node 2"). Ordinals follow the
order of the node list, so the same list always yields the same names, and
duplicate note nodes are disambiguated the same way.

The ordinal suffix goes through a new `flow.nodeAriaLabelOrdinal` key added
to all seven locales, so translators can reorder or re-punctuate it.
V
Viktor Avelino committed
bb1ccf7354b6352e01d5150b7f3ade5ad066bb14
Parent: 770fc29
Committed by GitHub <noreply@github.com> on 8/20/2026, 6:48:57 PM