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

Usagov 1919 consistent alert messages update #2028

Merged
merged 6 commits into from
Nov 6, 2024

Conversation

developer43
Copy link
Contributor

@developer43 developer43 commented Oct 22, 2024

Jira Task

https://cm-jira.usa.gov/browse/USAGOV-1919

Description

Make alert components accessible with a screen reader

Type of Changes

  • New Feature
  • Bugfix
  • Frontend (Twig, Sass, JS)
    • Add screenshot showing what it should look like
  • Drupal Config (requires "drush cim")
  • New Modules (requires rebuild)
  • Documentation
  • Infrastructure
    • CMS
    • WAF
    • WWW
    • Egress
    • Tools
    • Cron
  • Other

Testing Instructions

  1. Clear you cache (bin/drush cr)
  2. Goto http://localhost/avoid-foreclosure
  3. Start Voice Over on Mac (command F5) and tab through the left navigation
  4. Before you get the the alert component you need to use the arrow key to get to the component, hold down the "control" and "option" keys together while using the right arrow key.
  5. You should hear the screen reader announce "info important, region".
  6. Continue to hold down the "control" and "option" keys together while using the right arrow key and you should hear the word "info" and then the heading and body text of the alert component.
Screenshot 2024-10-22 at 2 09 51 PM

Change Requirements

  • Requires New Documentation (Link: {})
  • Requires New Config
  • Requires New Content

Validation Steps

  • Test instruction 1
  • Test instruction 2
  • Test instruction 3

Security Review

  • Adds/updates software (including a library or Drupal module)
  • Communication with external service
  • Changes permissions or workflow
  • Requires SSPP updates

Reviewer Reminders

  • Reviewed code changes
  • Reviewed functionality
  • Security review complete or not required

Post PR Approval Instructions

Follow these steps as soon as you merge the new changes.

  1. Go to the USAGov Circle CI project.
  2. Find the commit of this pull request.
  3. Build and deploy the changes.
  4. Update the Jira ticket by changing the ticket status to Review in Test and add a comment. State whether the change is already visible on cms-dev.usa.gov and beta-dev.usa.gov, or if the deployment is still in process.

@omerida omerida self-requested a review October 28, 2024 13:39
Copy link
Contributor

@omerida omerida left a comment

Choose a reason for hiding this comment

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

Confirmed the voice reader announces the info region like you described in the validation steps. Only change is to reuse an existing CSS class.

Comment on lines 939 to 948
.usa-screen-reader {
border: 0;
clip: rect(0, 0, 0, 0);
height: 1px;
overflow: hidden;
padding: 0;
position: absolute;
width: 1px;
word-wrap: normal;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

There is an existing .visuallyhidden class that is the same as this (save a line or two). Let's re-use the existing class instead of adding a new one.

We could rename it. That involves touching a bunch of files. Looks like 4 in the theme folder, and benefitSearch.js in the modules\custom folders.

@developer43
Copy link
Contributor Author

Hi @omerida I removed the duplicate class and used the existing .visuallyhidden class. This is ready to verify, thanks

@omerida omerida merged commit 9fb8be8 into dev Nov 6, 2024
5 of 6 checks passed
@omerida omerida deleted the usagov-1919-consistent-alert-messages-update branch November 6, 2024 22:03
@omerida
Copy link
Contributor

omerida commented Nov 6, 2024

@developer43 I merged this PR but I'm not sure if we're supposed to deploy to dev atm.

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