Skip to content
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

USWDS-Site - In-page navigation: Update component location documentation #2033

Merged
merged 13 commits into from
May 8, 2023

Conversation

amyleadem
Copy link
Contributor

@amyleadem amyleadem commented Mar 21, 2023

Summary

Updated the component location in the in-page navigation documentation to be more accurate and inclusive of other languages.

Thanks to @bonnieAcameron and @sarah-sch for the copywriting help!

Related issue

Closes #2011

Preview link

Preview link: In-page navigation component page

Problem statement

Currently, the in-page navigation guidance states that the component should be "displayed to the right of the main content".

However, it is not clear if the component should always be to the right of the main content and is guidance fit only for left-to-right languages. We should update the guidance to be more explicit and based on content flow to make it applicable in all situations.

Solution

Instructing users to display the in-page navigation "after the main content in the language's natural reading order" adds clarity and is more inclusive of other language types.

This PR also fixes a couple of formatting issues and replaces references to "in-page nav" with "in-page navigation".

Testing and review

Confirm that the updated content makes sense, is accurate, and has no punctuation and grammatical errors.


- **Enable tab order so keyboard users access the in-page navigation before the main content section.** When a user tabs through a page that contains the in-page navigation component, they should find the in-page navigation before the `main` content. Since the in-page nav will most commonly exist to the right of the content (and follows the `main` element in the markup) this may seem like a tab-order error, but tabbing through the entire page before getting to in-page navigation links is not logical, creates confusion, and diminishes the user experience.
- **Keyboard users should access the in-page navigation before the main content.** When a user tabs through a page that contains the in-page navigation component, they should find the in-page navigation _before_ the `main` content. Since the in-page navigation appears after the main content in the reading order, this may seem like a tab-order error. However, tabbing through the entire page before getting to in-page navigation links is not logical, creates confusion, and diminishes the user experience.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Made some additional updates here because the the recommended markup shows the in-page nav element is added before the main markup, not after.

Because of this, there is no need to ask users to force tab order with keyboard navigation by default, so I removed reference to this. However, if we wanted to be explicit, we can restore that copy.

@amyleadem amyleadem marked this pull request as ready for review March 24, 2023 22:31
@amyleadem amyleadem requested a review from mejiaj March 27, 2023 17:48
Copy link
Contributor

@bonnieAcameron bonnieAcameron left a comment

Choose a reason for hiding this comment

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

Read and suggested changes to Amy directly. She's pushed the changes, and I approve

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.

Looks good! Added a question and a comment, but they aren't blocking. Let me know what you think.

_components/in-page-navigation/guidance/implementation.md Outdated Show resolved Hide resolved
_components/in-page-navigation/guidance/usability.md Outdated Show resolved Hide resolved
Copy link
Contributor

@sarah-sch sarah-sch left a comment

Choose a reason for hiding this comment

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

Looks good!

Copy link
Member

@thisisdano thisisdano left a comment

Choose a reason for hiding this comment

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

Nice work!

@thisisdano thisisdano merged commit e3513f8 into main May 8, 2023
@thisisdano thisisdano deleted the al-in-page-nav-location branch May 8, 2023 18:27
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 - In-page navigation: Update guidance on component location
5 participants