-
Notifications
You must be signed in to change notification settings - Fork 50
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
fix: Apply accessibility violation fixes #1344
Conversation
…nsure all interactive functionality is operable with the keyboard"
…without loss of content or functionality"
A new generated diff is ready to view.
|
This comment has been minimized.
This comment has been minimized.
A new generated diff is ready to view.
|
A new generated diff is ready to view.
|
This comment has been minimized.
This comment has been minimized.
A new generated diff is ready to view.
|
This comment has been minimized.
This comment has been minimized.
A new generated diff is ready to view.
|
This comment has been minimized.
This comment has been minimized.
A new generated diff is ready to view.
|
This comment has been minimized.
This comment has been minimized.
// | ||
/** | ||
* Ensure that content (specifically, code blocks) reflows on small page sizes. | ||
* Fix for accessibility violation: "Ensure pages reflow without requiring two-dimensional scrolling without loss of content or functionality" |
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.
style: it's a bit easier to read if we say Fixes accessibility violation: ...
if (element.children.length > 1) { | ||
element.insertBefore(skipLink, element.children[1]); | ||
} else { | ||
element.appendChild(skipLink); |
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.
question: do we have elements with 0 children?
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.
No, the leaf nodes in our documentation have 1 child which is what this condition matches.
The structure for this condition is like this:
<div sideMenuPart>
<div overview>
<div skip-to-main-content> -- added via appendChild
The other condition is for structures like like this:
<div sideMenuPart>
<div overview>
<div skip-to-main-content> -- added via insertBefore element.children[1]
<div child sideMenuPart>
<div overview>
<div child sideMenuPart>
<div overview>
<div child sideMenuPart>
<div overview>
Quality Gate passedIssues Measures |
A new generated diff is ready to view.
|
Affected ArtifactsChanged in size
|
Fixes various docs accessibility issues:
aria-label
,aria-controls
,aria-expanded
attributes on the left sidebar arrow button. The fix was to add these attributes to eachnavButton
.Issue #
N/A
Description of changes
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.