Skip to content

USWDS-Site: Fix component pages from audit (Phase 1) #2149

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 43 commits into from
Nov 20, 2023

Conversation

amyleadem
Copy link
Contributor

@amyleadem amyleadem commented Jun 22, 2023

Summary

Updated component pages according to the findings reported in the code/developer content audit (Google Docs 🔒)

To make the review process more manageable, the changes will be implemented in phases.

⚠️ Before merge, we should update all NNNN-NN-NN changelog dates.

Related issue

Closes #2099

Preview link

Solution

Update code according to the findings in code/developer content audit (Google Docs 🔒).

Please note that all items highlighted yellow in the spreadsheet will be investigated/discussed in the last phase of the component page fixes.

Testing and review

  • Confirm that all updates are accurate and make sense
  • Confirm that all meaningful updates have a related changelog
    • "Meaningful" updates here mostly applied to adding or removing documentation about variants, dependencies, etc. Copy tweaks to add clarity were not considered meaningful, but a case could be made for them to be included.
  • Confirm grammar and spelling for all updates

@amyleadem amyleadem changed the title USWDS-Site: Fix component pages from audit USWDS-Site: Fix component pages from audit (Phase 1) Jun 23, 2023
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note
Reorganized the content here a bid to add bolded summaries and make meaning a bit more clear.
Also re-ordered these tasks based on relevancy/priority.

@@ -1,2 +1 @@
- **Associate the character count message to the input.** Use `aria-describedby` on the input to allow the message to be announced to those using screen readers.
- **Use the `aria-live` attribute on character count message.** Use `aria-live="polite"` so that updates to character count message are also announced when using a screen reader.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note
Removed the aria-live item because it is added dynamically and no user-action is required

@amyleadem amyleadem marked this pull request as ready for review June 26, 2023 15:39
@amyleadem amyleadem removed the request for review from sarah-sch July 13, 2023 14:42
Copy link
Contributor

@mejiaj mejiaj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice fixes in this PR. I tested for:

  • Typos.
  • Accuracy of content.
  • Visual regressions (mobile & desktop)
  • Formatting tweaks.
  • Changelog entries exist.
  • PR description is up-to-date & accurate.

PR preview lists the following, but I didn't see any code changes for them in this PR:

  • Breadcrumb
  • Combo box
  • Data viz
  • Date pcker

I also see language pattern got updated, but not seeing it in PR description.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a preview link for this? Not seeing immediately where it appears.

Copy link
Contributor Author

@amyleadem amyleadem Jul 17, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not seeing this section on the language selector page? Am I misunderstanding?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I got mixed up. These changes should have been added to the accordion page. The language content changes have been reverted in 3f5c877.

Looks like the _patterns/language directory just includes content that was copied from accordion content (and other sections). We should investigate if we can remove this directory because it does not look like it is being used.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going to be out the next two weeks, but happy to help if this gets held until then!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've opened up Issue #2289 so that we can investigate the directory question at a later time.

Copy link
Contributor Author

@amyleadem amyleadem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mejiaj Thanks for the thorough review. I believe I have addressed all of your comments. I had one question for you in this comment. Please let me know if you have questions.

Copy link
Contributor Author

@amyleadem amyleadem Jul 17, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@amyleadem amyleadem requested a review from mejiaj July 17, 2023 18:13
Copy link
Contributor

@mahoneycm mahoneycm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed a couple changes noted in the spreadsheet were missing from the demo. If these were decided against, maybe we can update the spreadsheet to reflect!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not seeing this section on the language selector page? Am I misunderstanding?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • add-aspect mixin still missing backticks

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Added backticks in 1b5f36c

Copy link
Contributor Author

@amyleadem amyleadem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mahoneycm @mejiaj Thanks for all your comments. This is ready for re-review.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note
Alphabetized the variants and added emergency variant.

@@ -1,4 +1,3 @@
- **Code header areas in the accordion as buttons.** Using a `<button type="button">` assures accordions are usable with both screen readers and keyboards.
- **Use `aria-expanded` on buttons to express an accordion’s default state.** Buttons should state if they are expanded by default with `aria-expanded="true"`. The `aria-expanded="false"` attribute will be added to other buttons when the accordion is initialized by the JavaScript.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note
This content was moved to the implementation section with some edits

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note
Added usa-alert--emergency and alphabetized variants

Comment on lines +1 to +3
- **Control card size and layout with USWDS utilities.** The card component works well with [layout grid utilities]({{ site.baseurl }}/utilities/layout-grid/). The `usa-card-group` block is functionally a wrap-able `grid-row`, and each individual `usa-card` is a `grid-col`. This means you can use a grid utility like `tablet:grid-col-4` to set a four-column size on a card at `tablet` width. You can also set custom grid gaps on a `usa-card-group` using `grid-gap` utilities.

Since the Design System grid is based on flexbox, you can use [flex positioning utilities]({{ site.baseurl }}/utilities/flex/) on the card group. The default alignment is stretch (stretch aligns the top and bottom of each card in a row), but the `flex-align-start` utility can set the alignment to the top of the row.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note
Broke this into two paragraphs for readability and added links to relevant resources

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I got mixed up. These changes should have been added to the accordion page. The language content changes have been reverted in 3f5c877.

Looks like the _patterns/language directory just includes content that was copied from accordion content (and other sections). We should investigate if we can remove this directory because it does not look like it is being used.

@amyleadem amyleadem requested a review from mahoneycm September 28, 2023 18:49
Copy link
Contributor

@mahoneycm mahoneycm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm! Thank you for tackling those changes and for the detailed change notes! Made re-review much easier 💯

@mejiaj mejiaj merged commit 41912e5 into main Nov 20, 2023
@mejiaj mejiaj deleted the al-component-audit-fixes branch November 20, 2023 20:59
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.

USWDS-Site - Code audit: Fix inaccuracies in component pages (Phase 1)
3 participants