Skip to content

Commit 2312cbb

Browse files
kellydanmajjgali
andauthored
Recommend using Close instead of OK (#8410)
<!-- ☝️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? <!-- Context about the problem that’s being addressed. --> When merchants need to dismiss a modal, they `Close` the modal. Today, we use `OK` when merchants don't need to _officially accept_, but `OK` is not an action. We should use language in buttons that better reflect the action merchants need to take. 1️⃣ `Close` also translates well into other languages. 2️⃣ `OK` does not translate super well. `OK` is often translated as: <details> <summary> OK (just uses the English word) </summary> <img width="668" alt="italian" src="https://user-images.githubusercontent.com/43160110/219497027-2480290f-d807-43c0-91b4-b40f93e30976.png"> </details> <details> <summary> Okay (language-specific spelling of Okay, not OK) </summary> <img width="670" alt="16-01-ylzgp-iqq83" src="https://user-images.githubusercontent.com/43160110/219498749-c60f0cbf-a648-44a0-9523-b7e36d3dfe97.png"> </details> <details> <summary> Accept (eg. Aceptar in Spanish) </summary> <img width="664" alt="16-00-fay6k-ux1nx" src="https://user-images.githubusercontent.com/43160110/219498903-d3c54159-5ca3-48c9-8e70-98e594f87e2e.png"> </details> <details> <summary> Sure, Certain (eg. 确定 in Chinese) </summary> <img width="662" alt="chinese" src="https://user-images.githubusercontent.com/43160110/219501039-166f9492-c5c6-4b97-be25-8de50f13f0cb.png"> </details> `OK` has an ambiguous translation while `Close` does not. Let's use `Close` to be more straightforward! ### WHAT is this pull request doing? <!-- Summary of the changes committed. Before / after screenshots are appreciated for UI changes. Make sure to include alt text that describes the screenshot. If you include an animated gif showing your change, wrapping it in a details tag is recommended. Gifs usually autoplay, which can cause accessibility issues for people reviewing your PR: <details> <summary>Summary of your gif(s)</summary> <img src="..." alt="Description of what the gif shows"> </details> --> <!-- ℹ️ Delete the following for small / trivial changes --> ### How to 🎩 🖥 [Local development instructions](https://github.com/Shopify/polaris/blob/main/README.md#local-development) 🗒 [General tophatting guidelines](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting.md) 📄 [Changelog guidelines](https://github.com/Shopify/polaris/blob/main/.github/CONTRIBUTING.md#changelog) <!-- Give as much information as needed to experiment with the component in the playground. --> <img width="1512" alt="Screenshot 2023-02-17 at 14 26 34" src="https://user-images.githubusercontent.com/43160110/219805555-a55c4b3d-07a6-484d-bdb4-d77e3682692d.png"> <details> <summary> Desktop (Chrome) </summary> <img width="1512" alt="Screenshot 2023-02-17 at 14 26 34" src="https://user-images.githubusercontent.com/43160110/219805555-a55c4b3d-07a6-484d-bdb4-d77e3682692d.png"> </details> <details> <summary> Desktop (Safari) </summary> <img width="1512" alt="Screenshot 2023-02-17 at 14 32 56" src="https://user-images.githubusercontent.com/43160110/219808123-1259f8e9-a43f-470a-8587-1633b2a6b398.png"> </details> <details> <summary> iPhone 12 Pro </summary> <img width="1512" alt="Screenshot 2023-02-17 at 14 29 48" src="https://user-images.githubusercontent.com/43160110/219806916-9ab6db1f-50bc-4410-9d21-78c56495d0c9.png"> <img width="1512" alt="Screenshot 2023-02-17 at 14 29 57" src="https://user-images.githubusercontent.com/43160110/219806958-b26d653d-4fc3-40d6-b994-f0cd7f90548f.png"> </details> <details> <summary> iPad Air </summary> <img width="1512" alt="Screenshot 2023-02-17 at 14 30 45" src="https://user-images.githubusercontent.com/43160110/219807213-e26b894a-4fcf-447f-a01f-682b8d636734.png"> </details> ### 🎩 checklist - [x] Tested on [mobile](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting.md#cross-browser-testing) - [x] 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) - [x] Updated the component's `README.md` with documentation changes - [x] [Tophatted documentation](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting%20documentation.md) changes in the style guide --------- Co-authored-by: jjgali <77791660+jjgali@users.noreply.github.com>
1 parent 3975668 commit 2312cbb

File tree

4 files changed

+13
-4
lines changed

4 files changed

+13
-4
lines changed

.changeset/witty-readers-glow.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'polaris.shopify.com': patch
3+
---
4+
5+
Use Close instead of OK

polaris.shopify.com/content/content/actionable-language.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -586,18 +586,21 @@ Use the adjective “Done” for datepickers.
586586

587587
---
588588

589-
## OK vs. accept
589+
## Close vs. accept
590590

591-
Use the adjective “OK” when merchants need to confirm they’ve read something, but aren’t required to legally accept terms of service before continuing. For example, use “OK” when presenting a security notification in a modal or sheet.
591+
Use the verb “Close” when merchants need to confirm they’ve read something, but aren’t required to legally accept terms of service before continuing. For example, use “Close” when presenting a security notification in a modal or sheet.
592+
593+
Don't use "OK". "OK" is an exclamation, not an action. When merchants click the "Close" button, they’re not saying “OK”, they’re doing a specific action.
592594

593595
<!-- dodont -->
594596

595597
#### Do
596598

597-
![modal with okay button spelled with capitalized letter O and K, no punctuation](/images/content/actionable-language/ok@2x.png)
599+
![modal with Close button](/images/content/actionable-language/modal-with-close@2x.png)
598600

599601
#### Don’t
600602

603+
- OK
601604
- Ok
602605
- O.k.
603606
- Okay
@@ -607,7 +610,7 @@ Use the adjective “OK” when merchants need to confirm they’ve read somethi
607610

608611
<!-- end -->
609612

610-
Use the adjective “Accept” when terms of service require legal confirmation before merchants can continue.
613+
Use the verb “Accept” when terms of service require legal confirmation before merchants can continue.
611614

612615
<!-- dodont -->
613616

@@ -619,6 +622,7 @@ Accept
619622

620623
- Ok
621624
- Done
625+
- Close
622626
- Continue
623627

624628
<!-- end -->
20 KB
Loading
Binary file not shown.

0 commit comments

Comments
 (0)