Skip to content

Conversation

@avinashbot
Copy link
Member

Description

You can't put <div>s inside <label>s, so using divs for the abstract switch disqualifies it from a bunch of pretty common situations.

Related links, issue #, if available: n/a

How has this been tested?

Both divs are flexboxes, so nothing should change.

Review checklist

The following items are to be evaluated by the author(s) and the reviewer(s).

Correctness

  • Changes include appropriate documentation updates.
  • Changes are backward-compatible if not indicated, see CONTRIBUTING.md.
  • Changes do not include unsupported browser features, see CONTRIBUTING.md.
  • Changes were manually tested for accessibility, see accessibility guidelines.

Security

Testing

  • Changes are covered with new/existing unit tests?
  • Changes are covered with new/existing integration tests?

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@avinashbot avinashbot requested a review from a team as a code owner January 23, 2023 12:26
@avinashbot avinashbot requested review from YueyingLu and removed request for a team January 23, 2023 12:26
@codecov
Copy link

codecov bot commented Jan 23, 2023

Codecov Report

Base: 92.97% // Head: 92.97% // Increases project coverage by +0.00% 🎉

Coverage data is based on head (765032f) compared to base (d52870f).
Patch has no changes to coverable lines.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #660   +/-   ##
=======================================
  Coverage   92.97%   92.97%           
=======================================
  Files         574      574           
  Lines       16766    16769    +3     
  Branches     4628     4627    -1     
=======================================
+ Hits        15588    15591    +3     
  Misses       1101     1101           
  Partials       77       77           
Impacted Files Coverage Δ
src/internal/components/abstract-switch/index.tsx 100.00% <ø> (ø)
src/input/index.tsx 100.00% <0.00%> (ø)
src/input/internal.tsx 100.00% <0.00%> (ø)
src/tag-editor/index.tsx 90.81% <0.00%> (ø)
src/autosuggest/internal.tsx 95.23% <0.00%> (ø)
src/text-filter/internal.tsx 100.00% <0.00%> (ø)
src/property-filter/token-editor.tsx 98.13% <0.00%> (ø)
src/s3-resource-selector/s3-in-context/index.tsx 100.00% <0.00%> (ø)
src/multiselect/internal.tsx 97.50% <0.00%> (+0.02%) ⬆️
...rc/internal/components/autosuggest-input/index.tsx 95.27% <0.00%> (+0.03%) ⬆️
... and 2 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@YueyingLu
Copy link
Member

Could it be added test toValidateA11y() for <label><AbstractSwitch/><label> to avoid regression?

@avinashbot avinashbot merged commit 4808e7d into main Jan 27, 2023
@avinashbot avinashbot deleted the fix-checkbox-div branch January 27, 2023 10:44
@karthshen
Copy link

It seems like this change broke some of our xpath selectors in our integration tests. Does Cloudscape have a general solution to these problems? We often have to adjust our selectors after an CloudScape update and it's getting frustrating.

@just-boris
Copy link
Member

Yes, please have a look at our test-utils and their usage example in our demo package

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.

4 participants