-
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
Merged
Merged
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
ab90f39
fix readme and set up nav bar
LinKCoding 846138c
testing a11y guidelines
LinKCoding 3317d03
revert preview.ts
LinKCoding b5b0908
working story and small clean up
LinKCoding e09f585
add ux copy checklist
LinKCoding 0a22161
alerts and bell notification
LinKCoding 228eae5
fix bell notification's title
LinKCoding 96891ca
added button and links page
LinKCoding f996a08
removed root aboutheader, which wasn't being used
LinKCoding 8a9848e
added confirmation dialog
LinKCoding 18f899f
added error messages page
LinKCoding 1136a67
added toasts, tooltips, and toc for component guidelines
LinKCoding db71462
fix ups
LinKCoding e6d7d51
added tocs and final touch ups
LinKCoding dec8c02
addressed immediate feedback
LinKCoding 1e29f71
update ui checklist
LinKCoding 0737979
more updates
LinKCoding 3a5dc24
updated a11y guidelines
LinKCoding beae8de
added alt text page
LinKCoding 695eb7a
update links
LinKCoding 0e74ccb
updated brand voice link
LinKCoding c6decef
fix broken links
LinKCoding 350f11a
reordering links and typo
LinKCoding b23cdb1
clean up tsconfig file
LinKCoding 2d598e3
Merge branch 'main' into kl-gm-960
LinKCoding c7a13d6
remove href from tableofcontents type
LinKCoding 6601b1b
Merge branch 'main' into kl-gm-960
LinKCoding File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| 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._ ✨ | ||
|
|
||
| --- | ||
|
|
||
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
This file was deleted.
Oops, something went wrong.
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| 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/wiki/spaces/UXW/database/4482760850?savedViewId=6f9f7fdc-f2b8-4746-b99b-689d804c979b) | ||
|
|
||
| ## Pages | ||
|
|
||
| <TableOfContents | ||
| links={[ | ||
| { | ||
| id: 'UX Writing/DIY UX writing in 8 steps', | ||
| subtitle: 'Follow these steps to write clear, useful UI copy.', | ||
| title: 'DIY UX writing in 8 steps', | ||
| }, | ||
| { | ||
| id: 'UX Writing/Accessibility guidelines', | ||
| subtitle: 'In order for content to be accessible, it must be perceivable, operable, understandable, and robust.', | ||
| title: 'Accessibility guidelines', | ||
| }, | ||
| { | ||
| id: 'UX Writing/Component Guidelines/About', | ||
| subtitle: 'Get up to speed on best practices for writing for user interfaces, including guidance for writing for specific components in Gamut.', | ||
| title: 'Component Guidelines', | ||
| }, | ||
| ]} | ||
| /> | ||
|
|
||
| <br /> | ||
|
|
||
| ## Resources | ||
|
|
||
| ### External Tools & Resources: | ||
|
|
||
| 🖍 **[Hemingway App](https://hemingwayapp.com/):** Tool for checking copy for grade level and readability | ||
|
|
||
| ⬆️ **[Capitalize My Title](https://capitalizemytitle.com/style/AP/):** Paste in any title to properly capitalize (use AP style) | ||
|
|
||
| 📚 **[The UX Writing Library](https://www.uxwritinglibrary.com/):** Massive compilation of UX writing tools and resources | ||
|
|
||
| 💅 **[Polish](https://www.producthunt.com/posts/polish):** Browser extension that lets you edit the text on any website | ||
|
|
113 changes: 113 additions & 0 deletions
113
packages/styleguide/src/lib/UX Writing/Accessibility guidelines.mdx
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,113 @@ | ||
| import { Meta } from '@storybook/blocks'; | ||
|
|
||
| import { AboutHeader, LinkTo } 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/). | ||
|
|
||
| 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 | ||
| - 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 the CTA 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 <LinkTo id="UX Writing/Component guidelines/Alternative text" > alt text</LinkTo>? | ||
| - Does the alt text provide all the information a user needs to understand what the image is being used to convey? | ||
| - Are all words understandable without reliance on imagery? | ||
|
|
||
|
|
||
| ### Readability | ||
| - Do users have enough time to read the text? | ||
| - Is the reading level grade 7 or below? Use [Hemingway App](https://hemingwayapp.com) to check. | ||
| - 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? | ||
60 changes: 60 additions & 0 deletions
60
packages/styleguide/src/lib/UX Writing/Component guidelines/About.mdx
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| 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/DIY UX writing in 8 steps">step-by-step guide</LinkTo> to ensure the copy is clear and useful. | ||
|
|
||
| <TableOfContents | ||
| links={[ | ||
| { | ||
| id: 'UX Writing/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: 'UX Writing/Component guidelines/Alternative text', | ||
| title: "Alternative text", | ||
| subtitle: 'Alternative text, or alt text, is a brief description of an image for users who cannot view it.', | ||
| }, | ||
| { | ||
| id: 'UX Writing/Component guidelines/Buttons', | ||
| 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: 'Buttons', | ||
| }, | ||
| { | ||
| id: 'UX Writing/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: 'UX Writing/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: 'UX Writing/Component guidelines/Notifications', | ||
| subtitle: 'Keep it brief (<86 characters), make it actionable, and ensure the messaging is in support of the learner’s journey.', | ||
| title: 'Notifications', | ||
| }, | ||
| { | ||
| id: 'UX Writing/Component guidelines/Toasts', | ||
| subtitle: 'Keep it brief, ensure the message is personal and relevant, and avoid distracting from the learning experience.', | ||
| title: 'Toasts', | ||
| }, | ||
| { | ||
| id: 'UX Writing/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', | ||
| }, | ||
| ]} | ||
| /> |
76 changes: 76 additions & 0 deletions
76
packages/styleguide/src/lib/UX Writing/Component guidelines/Alerts.mdx
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
| 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? |
29 changes: 29 additions & 0 deletions
29
packages/styleguide/src/lib/UX Writing/Component guidelines/Alternative text.mdx
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| import { Meta } from '@storybook/blocks'; | ||
|
|
||
| import { AboutHeader } from '~styleguide/blocks'; | ||
|
|
||
|
|
||
| export const parameters = { | ||
| title: "Alternative text", | ||
| subtitle: 'Alternative text, or alt text, is a brief description of an image for users who cannot view it.', | ||
| status: 'static', | ||
| }; | ||
|
|
||
| <Meta title="UX Writing/Component guidelines/Alternative text" /> | ||
|
|
||
| <AboutHeader {...parameters} /> | ||
|
|
||
|
|
||
| Alternative text, or alt text, is a short written description of an image that helps users make sense of the image when it can’t be viewed. Alt text is read by screen readers, search engines, and is displayed in browsers upon hover or when an image file is unable to load. | ||
|
|
||
| ## Best practices | ||
|
|
||
| Writing alt text is pretty straightforward, but here are some best practices to keep in mind: | ||
| - There's no need to use "picture of" or "image of" language. Screen readers will announce the image as an image. | ||
| - Be descriptive. Alt text should provide all of the information the image is being used to convey. | ||
| - Use alt text for non-decorative images. Decorative image alt text can be left out since they don't add useful context. | ||
| - Images with text should not be used. If it can't be avoided, be sure to use the same text in the alt text as is displayed on the image. | ||
|
|
||
| ## Checklist | ||
| * 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? |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.