-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[OptionList] consolidate se23 styles and logic (#10177)
<!-- ☝️How to write a good PR title: - Prefix it with [ComponentName] (if applicable), for example: [Button] - Start with a verb, for example: Add, Delete, Improve, Fix… - Give as much context as necessary and as little as possible - Prefix it with [WIP] while it’s a work in progress --> ### WHY are these changes introduced? Fixes #9953 Fixes #10197 ### WHAT is this pull request doing? - `OptionList` consolidate se23 logic - `OptionList` consolidate se23 styles - Remove custom `Checkbox` component in favour of the standard Polaris Checkbox - Removes the `optionRole` prop from the `OptionList` component. This is presently being used to toggle the `presentation` role on the custom checkbox input. This PR removes this prop for a few reasons: - Its no longer used, since the custom Checkbox has been deleted. - The functionality it was providing (toggling presentation role) doesn't seem to be [supported by browsers](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/presentation_role). The browser ignores the `presentation` role on all focusable elements (including inputs). See excerpt from MDN below - A cursory [Grokt](https://grokt.shopify.io/results?q=optionRole) search, rules out internal usage of this prop ![Screenshot 2023-08-23 at 10 16 07 am](https://github.com/Shopify/polaris/assets/12119389/fbf6718b-ad35-46ee-ad00-6c79840ff02b) ### How to 🎩 - Storybook - Prod storybook ### 🎩 checklist - [ ] Tested on [mobile](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting.md#cross-browser-testing) - [ ] Tested on [multiple browsers](https://help.shopify.com/en/manual/shopify-admin/supported-browsers) - [ ] Tested for [accessibility](https://github.com/Shopify/polaris/blob/main/documentation/Accessibility%20testing.md) - [ ] Updated the component's `README.md` with documentation changes - [ ] [Tophatted documentation](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting%20documentation.md) changes in the style guide
- Loading branch information
1 parent
8755b46
commit 9621658
Showing
11 changed files
with
110 additions
and
531 deletions.
There are no files selected for viewing
This file contains 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
84 changes: 0 additions & 84 deletions
84
polaris-react/src/components/OptionList/components/Checkbox/Checkbox.scss
This file was deleted.
Oops, something went wrong.
57 changes: 0 additions & 57 deletions
57
polaris-react/src/components/OptionList/components/Checkbox/Checkbox.tsx
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
polaris-react/src/components/OptionList/components/Checkbox/index.ts
This file was deleted.
Oops, something went wrong.
36 changes: 0 additions & 36 deletions
36
polaris-react/src/components/OptionList/components/Checkbox/tests/Checkbox.test.tsx
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.