test: CollectionPreferences visible-content toggle resolves column label (blocked on toolkit#228)#4711
Draft
gethinwebster wants to merge 1 commit into
Draft
test: CollectionPreferences visible-content toggle resolves column label (blocked on toolkit#228)#4711gethinwebster wants to merge 1 commit into
gethinwebster wants to merge 1 commit into
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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>, andAbstractSwitchpointsdetail.labelat 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
getLabelFromElementto 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 undercomponent innerContexts.