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

UHF-7853: Notification components accessibility #641

Merged
merged 3 commits into from
May 2, 2023

Conversation

jeremysteerio
Copy link
Contributor

@jeremysteerio jeremysteerio commented Apr 25, 2023

UHF-7853

Some accessibiity work for announcement and status message components

What was done

  • Add preprocess hook too expose accessibility-related variables to announcements template
  • Implement accessibiity fixes to announcement and status message templates

How to install

  • Boot up an instance of your choice
  • Get this branch. composer require drupal/hdbt:dev-UHF-7853-notification-components-accessibility

How to test

  • Create 3 instances of announcements (/node/add/announcement) and select a different type for each of them. Make sure that all have "Show on all pages" option checked.
  • After you save the last of them, Drupal should redirect you to the announcement's node page. On this page you should see:
    • All the announcements you created
    • Drupal's status message informing you that that you have just published an announcement

Check for these things:

In the Drupal's status message:

  • Root container should no longer have role=contentinfo or aria-labelledby attributes

In the announcement component:

  • Root container should now be a section element with an aria-label informing the use of the announcement's type
  • Close button aria label should now read Close [announcement type] instead of being a static Close announcement

Designers review

  • This PR does not need designers review
  • This PR has been visually reviewed by a designer (Name of the designer)

@jeremysteerio jeremysteerio changed the title Uhf 7853 notification components accessibility UHF-7853: Notification components accessibility Apr 28, 2023
@juho-lehmonen juho-lehmonen self-requested a review April 28, 2023 11:39
- Wrap announcement in <section>
- Add preprocess function to generate type-specific aria-labels
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