Skip to content

test: CollectionPreferences visible-content toggle resolves column label (blocked on toolkit#228)#4711

Draft
gethinwebster wants to merge 1 commit into
mainfrom
dev-v3-gethinw-cp-label-analytics-test
Draft

test: CollectionPreferences visible-content toggle resolves column label (blocked on toolkit#228)#4711
gethinwebster wants to merge 1 commit into
mainfrom
dev-v3-gethinw-cp-label-analytics-test

Conversation

@gethinwebster

@gethinwebster gethinwebster commented Jul 10, 2026

Copy link
Copy Markdown
Member

Description

Adds an analytics-metadata test asserting that a CollectionPreferences visible-content column toggle emits its column label in the generated metadata (action: select, detail.label: 'Domain name').

Today these toggles emit an empty label: their accessible name is bound via an external <label for>, and AbstractSwitch points detail.label at the native <input> (which has no aria/text of its own), so the toolkit resolves ''.

⛔ Blocked on cloudscape-design/component-toolkit#228

That PR teaches the toolkit's getLabelFromElement to follow the <label for> reverse association.

This test stays red until #228 merges AND the change is published to NPM by the AwsUi-v3-dev pipeline (https://pipelines.amazon.dev/pipelines-wip/AwsUi-v3-dev) — merging #228 alone is not enough; the toolkit commit must flow through the pipeline and publish before components consumes it. No dep bump is needed in this PR.

Validated locally against a patched toolkit: unpatched → label: '' (fail), patched → label: 'Domain name' (pass).

Testing

src/collection-preferences/__tests__/analytics-metadata.test.tsx — new case under component innerContexts.

…s column label

Adds an analytics-metadata test that a visible-content column toggle emits its column label (via the associated <label for>). Blocked on component-toolkit#228 (adds <label for> resolution to getLabelFromElement); CI is red until that merges to toolkit mainline.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant