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

Add aria-label to aside landmarks on home page (Fixes #15000) #15016

Merged
merged 2 commits into from
Aug 29, 2024

Conversation

alexgibson
Copy link
Member

One-line summary

Gives each <aside> landmark on the home page a unique label for screen readers.

Issue / Bugzilla link

#15000

Testing

http://localhost:8000/en-US/

@alexgibson alexgibson added P3 Third level priority - Nice to have Needs Review Awaiting code review Review: µ Code review time: 5 minutes or less labels Aug 27, 2024
Copy link

codecov bot commented Aug 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.64%. Comparing base (d32bb17) to head (56b939b).
Report is 4 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #15016   +/-   ##
=======================================
  Coverage   77.64%   77.64%           
=======================================
  Files         162      162           
  Lines        8341     8341           
=======================================
  Hits         6476     6476           
  Misses       1865     1865           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@janbrasna janbrasna left a comment

Choose a reason for hiding this comment

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

Can more banner instances appear on the same page? You may run into the same labelling ambiguity in such case.

l10n/en/newsletter_form.ftl Outdated Show resolved Hide resolved
bedrock/base/templates/includes/banners/basic.html Outdated Show resolved Hide resolved
@alexgibson alexgibson added the Frontend HTML, CSS, JS... client side stuff label Aug 27, 2024
@alexgibson alexgibson force-pushed the home-banner-a11y-roles branch 2 times, most recently from 55983a2 to 4fa5283 Compare August 27, 2024 15:40
@stephaniehobson stephaniehobson self-assigned this Aug 27, 2024
l10n/en/ui.ftl Outdated Show resolved Hide resolved
l10n/en/newsletter_form.ftl Outdated Show resolved Hide resolved
l10n/en/ui.ftl Outdated Show resolved Hide resolved
@alexgibson
Copy link
Member Author

Thanks for the suggestions, updated!

Copy link
Contributor

@stephaniehobson stephaniehobson left a comment

Choose a reason for hiding this comment

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

R+ 🏷️

@stephaniehobson stephaniehobson merged commit 6705d27 into mozilla:main Aug 29, 2024
6 checks passed
@alexgibson alexgibson deleted the home-banner-a11y-roles branch August 30, 2024 08:21
Comment on lines +342 to 344
<aside class="c-newsletter" aria-label="{{ ftl('newsletter-form-label') }}">
<div class="c-newsletter-wrapper mzp-l-content mzp-t-content-lg">
<div class="c-newsletter-info">
Copy link
Contributor

@janbrasna janbrasna Aug 30, 2024

Choose a reason for hiding this comment

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

Would it make sense to also use this newly added string as a legend for fieldset.mzp-c-newsletter-content there, that's missing one?

<fieldset class="mzp-c-newsletter-content">
<div class="mzp-c-form-errors {% if not form.errors %}hidden{% endif %}" id="newsletter-errors" data-testid="newsletter-error-message">
{{ form.non_field_errors()|safe }}
<ul class="mzp-u-list-styled">

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Frontend HTML, CSS, JS... client side stuff Needs Review Awaiting code review P3 Third level priority - Nice to have Review: µ Code review time: 5 minutes or less
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants