-
Notifications
You must be signed in to change notification settings - Fork 31
docs: Add back old UX Writing docs into SB8 #3001
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 13 commits
ab90f39
846138c
3317d03
b5b0908
e09f585
0a22161
228eae5
96891ca
f996a08
8a9848e
18f899f
1136a67
db71462
e6d7d51
dec8c02
1e29f71
0737979
3a5dc24
beae8de
695eb7a
0e74ccb
c6decef
350f11a
b23cdb1
2d598e3
c7a13d6
6601b1b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,5 @@ | ||
| # Gamut | ||
|
|
||
| // Storybook 8 branch | ||
|
|
||
| _The component library & design system for Codecademy._ ✨ | ||
|
|
||
| --- | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -28,6 +28,7 @@ const preview: Preview = { | |
| 'Typography', | ||
| 'Atoms', | ||
| 'Molecules', | ||
| 'Organisms', | ||
| '*', | ||
| ], | ||
| }, | ||
|
|
||
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| import { Meta } from '@storybook/blocks'; | ||
|
|
||
| import { AboutHeader, TableOfContents } from '~styleguide/blocks'; | ||
|
|
||
| export const parameters = { | ||
| id: 'UX Writing', | ||
| title: 'UX Writing', | ||
| subtitle: 'Help learners find success by surfacing the right copy and content to the right people at the right time.', | ||
| } | ||
|
|
||
| <Meta title='UX Writing/About' /> | ||
|
|
||
| <AboutHeader {...parameters} /> | ||
|
|
||
| Words are powerful tools that can help us achieve our mission of empowering inspiring careers in technology. When we surface the right words and content to the right people at the right time, we help learners reach their goals. When our learners are successful, so are we. | ||
|
|
||
| In the following pages, you’ll find a collection of tips and tools for writing effective product copy on your own. Need a little help? [Submit a UX writing request here.](https://skillsoftdev.atlassian.net/jira/software/c/projects/WRITE/boards/685) | ||
|
|
||
|
|
||
| <TableOfContents | ||
| links={[ | ||
| { | ||
| id: 'Alerts', | ||
| subtitle: 'Make clear what you’re alerting the user to. Then, clarify any next steps they need to take or inform them about the timing of a resolution on our end.', | ||
| title: 'Alerts', | ||
| }, | ||
| { | ||
| id: 'Bell notification', | ||
| subtitle: 'Keep it brief (<86 characters), make it actionable, and ensure the messaging is in support of the learner’s journey.', | ||
| title: 'Bell notification', | ||
| }, | ||
| { | ||
| id: 'Button and links', | ||
| subtitle: 'Be specific, use action-oriented language, and emphasize value. Keep to 3 words or less (unless necessary for clarity), and use sentence case.', | ||
| title: 'Button and links', | ||
| }, | ||
| { | ||
| id: 'Confirmation dialogs', | ||
| subtitle: 'Simplify the language, prioritize the message, and make sure the implication of what learners are saying "Yes" (or "No") to is crystal clear.', | ||
| title: 'Confirmation dialogs', | ||
| }, | ||
| { | ||
| id: 'Error messages', | ||
| subtitle: 'Above all else, error messages should explain and resolve. Inform learners of what went wrong and let them know how to proceed.', | ||
| title: 'Error messages', | ||
| }, | ||
| { | ||
| id: 'Toasts', | ||
| subtitle: 'Keep it brief, ensure the message is personal and relevant, and avoid distracting from the learning experience.', | ||
| title: 'Toasts', | ||
| }, | ||
| { | ||
| id: 'Tooltips', | ||
| subtitle: `Keep tooltips short and useful. Avoid using them to share information that's vital for learners to complete tasks.`, | ||
| title: 'Tooltips', | ||
| }, | ||
| ]} | ||
| /> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,115 @@ | ||
| import { Meta } from '@storybook/blocks'; | ||
|
|
||
| import { AboutHeader } from '~styleguide/blocks'; | ||
|
|
||
|
|
||
| export const parameters = { | ||
| title: "Accessibility guidelines", | ||
| subtitle: 'In order for content to be accessible, it must be perceivable, operable, understandable, and robust.', | ||
| status: 'static', | ||
| }; | ||
|
|
||
| <Meta title="UX Writing/Accessibility guidelines" /> | ||
|
|
||
| <AboutHeader {...parameters} /> | ||
|
|
||
| ## The 4 principles of accessibility | ||
|
|
||
| The World Wide Web Consortium (W3C) is the Internet's main international standards organization. W3C maintains a set of guidelines for web accessibility. The most up-to-date version of W3C's Web Content Accessibility Guidelines is [WCAG 2.2](https://www.w3.org/TR/WCAG22/). | ||
LinKCoding marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| The Web Content Accessibility Guidelines contain 4 principles for creating accessible content. Understanding these 4 principles is key to understanding how to write accessible content. | ||
|
|
||
| ### 1. Perceivable | ||
|
|
||
| Information on-screen must be perceivable to blind, deaf, low-vision, or color-blind learners. | ||
|
|
||
| - Include meaningful and unique alt text for all non-decorative images or icons | ||
| - Don't rely on visuals for words to make sense | ||
| - If text is meant to be read, include it as text and not an image | ||
| - Include captions for video and audio content | ||
|
|
||
| ### 2. Operable | ||
|
|
||
| Content should be easy for users to navigate and find what they're looking for. Touch and click targets should be easy to hit and content should be accessible with a screen reader. | ||
|
|
||
| - Make hyperlink text long enough that it's easy to hover over and click | ||
| - Use meaningful, unique, and descriptive CTAs | ||
| - Avoid ambiguous link text like "Click here" or "Read more" | ||
| - If more than one label contains the same text, clarify with screen-reader-only text | ||
| - Write so that labels, tooltips, and input fields appear in a logical order | ||
| - Avoid directional language like "above" or "below" | ||
| - Ensure users have enough time to read text | ||
|
|
||
| ### 3. Understandable | ||
|
|
||
| Content should be easy to understand. Plus, it should appear and operate in predictable ways. | ||
|
|
||
| - Use H1, H2, H3 headings correctly and consistently ([Learn more about headings](https://www.notion.so/Headings-be907c4d24c84dffb970cedc3ee54936)) | ||
| - Check to ensure copy is at a 7th-grade reading level or below | ||
| - Use short, clear sentences and paragraphs | ||
| - Avoid jargon, slang, and idioms | ||
| - Expand acronyms on first use | ||
| - Use list formatting when appropriate | ||
|
|
||
| ### 4. Robust | ||
|
|
||
| - Write in a way that's platform-agnostic (i.e. select or choose vs. tap or click) | ||
|
|
||
| ### Bonus: Meaningful | ||
|
|
||
| You'll find the word "meaningful" used a lot in guidance for writing for accessibility. So we're taking the opportunity to throw in a quick definition of what we mean when we use it. | ||
|
|
||
| Meaningful text is useful text. It provides the full context a user needs to understand a situation. | ||
|
|
||
| Meaningful alt text describes what's important about an image a user can't see. Meaningful button text clearly where a link will go. It avoids ambiguous standalone phrases like "click here" or "read more." | ||
|
|
||
| ## Accessible content checklist | ||
|
|
||
| ### Alt text | ||
| - Is alt text included for all non-decorative images on the page? | ||
| - Does your alt text provide all the information a user needs to understand what the image is being used to convey? | ||
|
|
||
| ### Buttons | ||
| - Is CTA text meaningful? Is it clear where clicking will take the user? | ||
| - If there is more than one button on the page, is the text for each button unique? | ||
| - If each button is not unique, have you provided screen-reader-only text to clarify? | ||
|
|
||
| ### Headings | ||
| - Does your page include a single, unique H1 title? | ||
| - Are H2 and H3 headings used correctly and consistently? | ||
|
|
||
|
|
||
|
|
||
| ### Hyperlinks | ||
| - Is link text meaningful? Is it clear where clicking will take the user? | ||
| - Are hyperlinks long enough (2-3 words) to be easy to click on? | ||
| - If there is more than one hyperlink on the page, is the text for each link unique? | ||
| - If each hyperlink is not unique, have you provided screen-reader-only text to clarify? | ||
|
|
||
|
|
||
| ### Imagery | ||
| - Do all non-decorative images or icons contain[alt text](https://skillsoftdev.atlassian.net/wiki/spaces/265f8fcabee0479ea6841c6b0b7e2171/pages/4440883349/Alternate+alt+text)? | ||
|
||
| - Does the alt text provide all the information a user needs to understand what the image is being used to | ||
| - Are all words understandable without reliance on imagery? | ||
|
|
||
|
|
||
| ### Readability | ||
| - Do users have enough time to read the text? | ||
| - Is your copy at a reading level of grade 7 or below? Test with [Hemingway App](https://hemingwayapp.com). | ||
| - Are sentences and paragraphs short and clear? | ||
| - Is your content free of jargon, slang, and idioms? | ||
| - Have you used list formatting when appropriate? | ||
| - Do users have enough time to read the text? | ||
|
|
||
| ### Screenreader compatibility | ||
| - Does text appear in chronological order? | ||
| - Are headings used correctly and appropriately? | ||
| - Have you avoided directional language (i.e. "the form on the right" or "in the section below")? | ||
| - Is the language platform-agnostic? | ||
| - Have you passed the buttons, headings, hyperlinks, imagery, and readability checklists? | ||
|
|
||
|
|
||
| ### Video and audio content | ||
| - Are captions included for all audio and video content? | ||
| - For video, do the captions match what's happening on-screen? | ||
| - For audio, are transcripts available? | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| import { Meta } from '@storybook/blocks'; | ||
|
|
||
| import { AboutHeader, LinkTo, TableOfContents } from '~styleguide/blocks'; | ||
|
|
||
| export const parameters = { | ||
| id: 'Component Guidelines', | ||
| title: 'Component Guidelines', | ||
| subtitle: 'Get up to speed on best practices for writing for user interfaces, including guidance for writing for specific components in Gamut.', | ||
| } | ||
|
|
||
| <Meta title='UX Writing/Component Guidelines/About' /> | ||
|
|
||
| <AboutHeader {...parameters} /> | ||
|
|
||
| Writing on your own? Use the <LinkTo id="UX Writing/UI copy checklist">step-by-step guide</LinkTo> to ensure the copy is clear and useful. | ||
|
|
||
| <TableOfContents | ||
| links={[ | ||
| { | ||
| id: 'Component Guidelines/Alerts', | ||
| subtitle: 'Make clear what you’re alerting the user to. Then, clarify any next steps they need to take or inform them about the timing of a resolution on our end.', | ||
| title: 'Alerts', | ||
| }, | ||
| { | ||
| id: 'Component Guidelines/Bell notification', | ||
| subtitle: 'Keep it brief (<86 characters), make it actionable, and ensure the messaging is in support of the learner’s journey.', | ||
| title: 'Bell notification', | ||
| }, | ||
| { | ||
| id: 'Component Guidelines/Button and links', | ||
| subtitle: 'Be specific, use action-oriented language, and emphasize value. Keep to 3 words or less (unless necessary for clarity), and use sentence case.', | ||
| title: 'Button and links', | ||
| }, | ||
| { | ||
| id: 'Component Guidelines/Confirmation dialogs', | ||
| subtitle: 'Simplify the language, prioritize the message, and make sure the implication of what learners are saying "Yes" (or "No") to is crystal clear.', | ||
| title: 'Confirmation dialogs', | ||
| }, | ||
| { | ||
| id: 'Component Guidelines/Error messages', | ||
| subtitle: 'Above all else, error messages should explain and resolve. Inform learners of what went wrong and let them know how to proceed.', | ||
| title: 'Error messages', | ||
| }, | ||
| { | ||
| id: 'Component Guidelines/Toasts', | ||
| subtitle: 'Keep it brief, ensure the message is personal and relevant, and avoid distracting from the learning experience.', | ||
| title: 'Toasts', | ||
| }, | ||
| { | ||
| id: 'Component Guidelines/Tooltips', | ||
| subtitle: `Keep tooltips short and useful. Avoid using them to share information that's vital for learners to complete tasks.`, | ||
| title: 'Tooltips', | ||
| }, | ||
| ]} | ||
| /> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,76 @@ | ||
| import { Alert, Text } from '@codecademy/gamut/src'; | ||
| import { Meta } from '@storybook/blocks'; | ||
|
|
||
| import { AboutHeader, LinkTo } from '~styleguide/blocks'; | ||
|
|
||
|
|
||
| export const parameters = { | ||
| title: "Alerts", | ||
| subtitle: 'Make clear what you’re alerting the user to. Then, clarify any next steps they need to take or inform them about the timing of a resolution on our end.', | ||
| status: 'static', | ||
| }; | ||
|
|
||
| <Meta title="UX Writing/Component guidelines/Alerts" /> | ||
|
|
||
| <AboutHeader {...parameters} /> | ||
|
|
||
|
|
||
|
|
||
|
|
||
| Alerts are used to display important information and, if relevant, provide relevant actions the learner needs to take to resolve the alert. | ||
|
|
||
| Alerts are similar to <LinkTo id="UX Writing/Component guidelines/Error messages">error messages</LinkTo>, but the approach is slightly different. An error message informs users of **what went wrong** and **how to proceed**, but with an alert nothing has gone wrong _yet_. | ||
|
|
||
| Alerts should make clear **what the issue or information is** and **how to proceed**. In the event of an alert, the user might need to take action to proceed _or_ they may simply need to be informed that _we_ will be taking action within a specific timeframe. | ||
|
|
||
| ## Examples | ||
|
|
||
| <br /> | ||
|
|
||
| <Alert type="general" cta={{ children: 'Resend verification' }} mx={0} > | ||
| <Text> Please verify your email so we can make sure your account is secure. A link | ||
| has been sent to name@email.com. </Text> | ||
| </Alert> | ||
|
|
||
| <br /> | ||
|
|
||
| <Alert type="success" cta={{ children: '' }}> | ||
| <Text>Success! Your content has been assigned.</Text> | ||
| </Alert> | ||
|
|
||
| <br /> | ||
|
|
||
| <Alert type="error" cta={{ children: '' }}> | ||
| <Text>We were unable to add this team member. Please refresh the page and try again.</Text> | ||
| </Alert> | ||
|
|
||
| <br /> | ||
|
|
||
| <Alert type="notice" cta={{ children: 'Learn more' }}> | ||
| <Text>Maintenance: Codecademy will be offline between 2AM and 4AM EST.</Text> | ||
| </Alert> | ||
|
|
||
| <br /> | ||
|
|
||
| <Alert type="feature" cta={{ children: 'Add your name' }}> | ||
| <Text>Update your profile with your name to help your team with account management.</Text> | ||
| </Alert> | ||
|
|
||
| <br /> | ||
|
|
||
| ## Best practices | ||
|
|
||
| - **Start with the full context in mind.** Your goal is to alert the learner without frustration. That's why, before you start writing, you'll need to know answers to the following questions: | ||
| 1. What will a learner be trying to do when this alert appears? | ||
| 2. What might happen if the learner doesn't receive the information in this alert? | ||
| 3. Does the learner need to take action to remove the alert? | ||
| 4. If the learner can't resolve the alert on their own, what information can we provide so they know what to expect? | ||
| - **Explain and clarify how to proceed.** Inform learners of the issue or information (explain) and let them know how to proceed. For example, we may alert learners that they need to verify their email address before they can update their profile. If there is no way for them to proceed, don't just leave them hanging. For instance, if the site has scheduled downtime, let them know when it will be back up. If more information is needed, prompt them to contact customer support or share a link to an FAQ where they can learn more. | ||
| - **Write in a conversational style.** Oftentimes, alerts end up sounding robotic. Instead of writing like a computer, write like a human. Before you start writing, try explaining things to yourself or someone else out loud. This practice can help you figure out how to write the alert in a more human way. | ||
| - **Front-load the most important information.** While our alert component allows for multiple lines of text, we truncate after the first line and users can expand to see the full message. | ||
|
|
||
| ## Checklist | ||
| - Does the alert explain the information or issue clearly? | ||
| - If relevant, have you explained what the user can do to resolve the alert or what we're doing on our end? | ||
| - Is important information front-loaded? | ||
| - Have you asked someone unrelated to the project to read the message and did they understand it? |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| import { Meta } from '@storybook/blocks'; | ||
|
|
||
| import { AboutHeader } from '~styleguide/blocks'; | ||
|
|
||
| export const parameters = { | ||
| title: "Bell notification", | ||
LinKCoding marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| subtitle: 'Keep it brief (<86 characters), make it actionable, and ensure the messaging is in support of the learner’s journey.', | ||
| status: 'static', | ||
| }; | ||
|
|
||
| <Meta title="UX Writing/Component guidelines/Bell notification" /> | ||
|
|
||
| <AboutHeader {...parameters} /> | ||
|
|
||
| Bell notifications let us share CTAs relevant to a learner’s personal experience. This includes things like changes to a course a learner is taking, responses to a forum post they wrote, or other calls to action that support their learning journey. | ||
|
|
||
| ## Best practices | ||
|
|
||
| - **Notifications are personal.** Bell notifications should be used to surface calls to action that are relevant to a learner’s personal experience. | ||
| - **Notifications support focused learning.** Bell notifications should notify learners about information in support of their learning journey. They should not be a deterrent or distractor to that learning. The messaging should be relevant to the interactions, content, goals, and interests of the individual learner. | ||
| - **Notifications are actionable.** All notifications should have a personalized, clickable action. Use a bell notification only when there is a relevant action to take. Otherwise, opt for a different communication channel. | ||
| - **Notifications are brief messages.** Notifications should be no longer than 86 characters (max. 3 lines). Unless otherwise specified — or directly removed by the learner — a notification should disappear after 30 days. | ||
|
|
||
| ## Checklist | ||
| - Does the notification include an action for the learner to take? | ||
| - Is the action clear? | ||
| - Is the notification copy 86 characters or less? | ||
Uh oh!
There was an error while loading. Please reload this page.