-
Notifications
You must be signed in to change notification settings - Fork 148
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
Conversation
|
|
||
| - **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. |
There was a problem hiding this comment.
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.
…-page-nav-location
There was a problem hiding this 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
There was a problem hiding this 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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work!
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.