diff --git a/pkg/spec/src/web-runtime.ts b/pkg/spec/src/web-runtime.ts index fbd609b..f03547e 100644 --- a/pkg/spec/src/web-runtime.ts +++ b/pkg/spec/src/web-runtime.ts @@ -129,9 +129,10 @@ const KNOWN_KEY_TO_CSS: Record string> = { // The name the ios sidecar writes the label under, and the canonical key // internal/hierarchy resolves the whole family through. accessibilityText: (v) => `[aria-label="${cssEscape(v)}"]`, + // The attribute the markup writes, which is what the hierarchy dump carries + // under this name too. It says nothing about the ladder hintText climbs: a + // field whose placeholder an aria-label outranks still answers here. placeholder: (v) => `[placeholder="${cssEscape(v)}"]`, - placeholderValue: (v) => `[placeholder="${cssEscape(v)}"]`, - hintText: (v) => `[placeholder="${cssEscape(v)}"]`, secure: secureSelector, }; @@ -179,8 +180,26 @@ const KNOWN_KEY_TO_STATE: Record< selected: stateMatcher(isSelected), editable: stateMatcher(isEditable), scrollable: scrollableMatcher, + hintText: hintMatcher, + placeholderValue: hintMatcher, }; +// hintText is the accessible-name ladder, derived from the live element, and +// compiling it to [placeholder="..."] made it name the wrong field or none: a +// field labelled by an aria-label or a bound