Visitar URL original
Accessibility updates [uswds-site 1227] by thisisdano · Pull Request #4197 · uswds/uswds · GitHub
Skip to content

Accessibility updates [uswds-site 1227] - #4197

Merged
thisisdano merged 28 commits into
developfrom
dw-site-pa11y
May 17, 2021
Merged

thisisdano merged 28 commits into
developfrom
dw-site-pa11y

Conversation

@thisisdano

@thisisdano thisisdano commented May 14, 2021 •

Copy link
Copy Markdown
Contributor

Summary

This adjusts some of the component code templates to allow the final output code to pass accessibility tests on our website

Requirements

This is a companion to uswds/uswds-site#1227
Approve and merge this PR first. Then link the uswds-site PR to the develop branch.

Details

See code comments

@thisisdano thisisdano changed the title Accessibility updates Accessibility updates [uswds-site 1227] May 17, 2021
@thisisdano
thisisdano requested a review from mejiaj May 17, 2021 03:30
Comment thread README.md
### Use another framework or package manager

If you’re using another framework or package manager that doesn’t support `npm`, you can find the source files in this repository and use them in your project. Otherwise, we recommend that you follow the [download instructions](#download). Please note that the core team [isn’t responsible for all frameworks’ implementations](https://github.com/uswds/uswds/issues/877).
If you’re using another framework or package manager that doesn’t support `npm`, you can find the source files in this repository and use them in your project. Otherwise, we recommend that you follow the [download instructions](#download-and-install). Please note that the core team [isn’t responsible for all frameworks’ implementations](https://github.com/uswds/uswds/issues/877).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fix internal link

banner:
text: "An official website of the United States government"
action: "Here’s how you know"
aria_label: "Official government website"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Use explicit ARIA label metadata...

<ul class="usa-button-group">
<li class="usa-button-group__item">
<a href="#" class="usa-button usa-button--outline">Back</a>
<a href="javascript:void(0);" class="usa-button usa-button--outline">Back</a>

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Avoid em empty hash links, use javascript:void(0); instead

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Does this mean we have to update the href's in breadcrumb?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I guess so... I wonder why those weren't flagged as errors....

- name: dot-mil
context:
banner:
aria_label: "Official government website,"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

... and use trailing commas as a hack to provide legible ARIA labels but still make them unique

@@ -1,21 +1,21 @@
<div class="usa-summary-box" role="complementary">
<div class="usa-summary-box">

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Remove complementary role for content inside a main element

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Does this appear as a region in Voiceover or do we need to add an aria-label?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It does not have an explicit region now. I can give it one

<ul class="usa-list">
<li>If you are under a winter storm warning,
<a class="usa-summary-box__link" href="#usa-anchor-find-shelter">find shelter</a>
<a class="usa-summary-box__link" href="javascript:void(0);">find shelter</a>

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Don't use fake anchor links

@@ -1,4 +1,4 @@
<div class="usa-table-container--scrollable">
<div class="usa-table-container--scrollable" tabindex="0">

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Assure that scrollable elements are focusable

<div class="grid-row grid-gap">
<div class="mobile-lg:grid-col-4">
<h6 class="margin-0">Unordered list</h6>
<h3 class="site-preview-heading margin-0">Unordered list</h3>

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Use proper heading level

</section>
</div>
<div class="usa-line-length-example">
<h3 class="site-preview-heading margin-top-0">Line length</h3>

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Use proper heading level and only include sample text within the usa-prose

@thisisdano
thisisdano marked this pull request as ready for review May 17, 2021 04:42

@mejiaj mejiaj left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

A few questions on Identifier and Breadcrumb href. Everything else looks good.

Comment thread src/components/breadcrumb/breadcrumb.config.yml Outdated
<ul class="usa-button-group">
<li class="usa-button-group__item">
<a href="#" class="usa-button usa-button--outline">Back</a>
<a href="javascript:void(0);" class="usa-button usa-button--outline">Back</a>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Does this mean we have to update the href's in breadcrumb?

Comment thread src/components/identifier/identifier.config.yml
Comment thread src/components/navigation/sidenav.config.yml
@@ -1,21 +1,21 @@
<div class="usa-summary-box" role="complementary">
<div class="usa-summary-box">

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Does this appear as a region in Voiceover or do we need to add an aria-label?

@thisisdano
thisisdano merged commit 2650f15 into develop May 17, 2021
@thisisdano
thisisdano deleted the dw-site-pa11y branch May 17, 2021 21:26
mejiaj pushed a commit that referenced this pull request Jun 24, 2021
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.

2 participants