feat: Extract available options/items for selection components in page scanner#219
Open
gethinwebster wants to merge 1 commit into
Open
feat: Extract available options/items for selection components in page scanner#219gethinwebster wants to merge 1 commit into
gethinwebster wants to merge 1 commit into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #219 +/- ##
==========================================
+ Coverage 98.90% 98.97% +0.07%
==========================================
Files 44 44
Lines 1190 1272 +82
Branches 320 348 +28
==========================================
+ Hits 1177 1259 +82
Misses 12 12
Partials 1 1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
ba3a78f to
8ac882e
Compare
…abs, and Table
Add DOM-based extraction of available items to the page scanner for
selection-style components. This enables consumers to see all available
choices, not just the currently selected one.
Components affected:
- RadioGroup/Tiles: options array with {value, label, description?}
- Cards: items array with {value, label, description?}
- Tabs: tabs array with {value, label, position}
- Table: rows array (opt-in via includeTableData option)
The getComponentsTree function now accepts an optional second parameter
GetComponentsTreeOptions to control opt-in features like table data.
8ac882e to
9cf66dc
Compare
Member
Author
|
"Components unit tests" are expected to fail, as those are snapshot tests that use/verify this scanner output. To merge we will temporarily disable checks then update snapshot & re-enable. |
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
Add DOM-based extraction of available options/items to the page scanner for selection-style components. This enables page scanner consumers to see all available choices on a page, not just the currently selected ones.
Components affected:
awsui.RadioGroup/awsui.Tiles/awsui.Cards: newoptionsproperty —Array<{value, label, description?}>awsui.Tabs: newtabsproperty —Array<{value, label, disabled?}>awsui.Table: newrowsproperty —Array<Array<string>>(opt-in viaincludeAllTableRowsoption)API change:
getComponentsTreenow accepts an optional second parameterGetComponentsTreeOptions:The extraction uses stable ARIA semantics (
aria-labelledby,aria-label,aria-describedby,aria-disabled) and existing DOM structure — no changes required to component source code.Related links, issue #, if available: n/a
How has this been tested?
Review checklist
Correctness
getComponentsTreesecond parameter is optional, existing callers are unaffected.Testing
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.