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

Jetpack pricing: fix alternative texts in modals #69003

Merged
merged 2 commits into from Oct 17, 2022

Conversation

monsieur-z
Copy link
Contributor

@monsieur-z monsieur-z commented Oct 12, 2022

Changes proposed in this Pull Request

This PR adds an accessible name to the close button of the language selector, in the footer of the Jetpack pricing page, and the products lightbox. This way, visitors using a screen reader get proper context when the button gets focus (see video below).

Implementation notes

Name is added via the aria-label HTML attribute.

Testing instructions

  • Spin up the pricing page, by running this branch locally, or by using the live link below
  • Visit the pricing page, and open the language selector located in the footer

Screen Shot 2022-10-12 at 3 55 55 PM

  • Using a screen reader, notice that the close button has an accessible name (see video below). Alternatively, check in the inspector that the HTML element has a aria-label attribute.

Screen Shot 2022-10-12 at 3 59 12 PM

  • Do the same with the products lightbox (click More on X).

Screenshots

close-button.mov

Voice Over gives information about the close button when it is given focus.

lightbox.mov

Same here. Besides, Voice Over ignores icons completely.


  • To see the specific tasks where the Asana app for GitHub is being used, see below:
    • 0-as-1203150321101696

@monsieur-z monsieur-z added Accessibility (a11y) Jetpack Cloud Anything related to the Jetpack Cloud (cloud.jetpack.com) [Size] XS Tiny sized issue [Feature] Pricing Feedback related to the pricing structure of WordPress.com's plans and services. labels Oct 12, 2022
@monsieur-z monsieur-z requested a review from a team October 12, 2022 20:00
@matticbot matticbot added the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Oct 12, 2022
@matticbot
Copy link
Contributor

matticbot commented Oct 12, 2022

Here is how your PR affects size of JS and CSS bundles shipped to the user's browser:

Sections (~125 bytes added 📈 [gzipped])

name                   parsed_size           gzip_size
jetpack-cloud-pricing       +276 B  (+0.0%)     +125 B  (+0.1%)
plans                       +135 B  (+0.0%)      +60 B  (+0.0%)
jetpack-connect             +135 B  (+0.0%)      +60 B  (+0.0%)

Sections contain code specific for a given set of routes. Is downloaded and parsed only when a particular route is navigated to.

Legend

What is parsed and gzip size?

Parsed Size: Uncompressed size of the JS and CSS files. This much code needs to be parsed and stored in memory.
Gzip Size: Compressed size of the JS and CSS files. This much data needs to be downloaded over network.

Generated by performance advisor bot at iscalypsofastyet.com.

Copy link
Contributor

@jkguidaven jkguidaven left a comment

Choose a reason for hiding this comment

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

Nice catch @monsieur-z! tested and working as expected. code looks good to me👍

@jkguidaven
Copy link
Contributor

jkguidaven commented Oct 13, 2022

Though not required for this PR. The close button in the lightbox also needs to have the aria-label. It might also need some styling when it is active.

Screen Shot 2022-10-13 at 3 19 27 PM

@monsieur-z monsieur-z changed the title Jetpack pricing: add accessible name to lang selector close button Jetpack pricing: fix alternative texts in modals Oct 13, 2022
@@ -32,7 +32,7 @@ const TagItems: React.FC< { tags: JetpackTag[] } > = ( { tags } ) => (
<>
{ tags.map( ( tag ) => (
<div className="product-lightbox__detail-tags-tag" key={ tag.tag }>
<span>{ Tags[ tag.tag ] }</span>
<span aria-hidden="true">{ Tags[ tag.tag ] }</span>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Making sure icons are not read by screen readers here, since they are purely decorative.

@monsieur-z
Copy link
Contributor Author

Thanks @jkguidaven! I missed that modal. I've updated the code and instructions accordingly.

Copy link
Contributor

@jkguidaven jkguidaven left a comment

Choose a reason for hiding this comment

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

Thanks for fixing all accessibility issues @monsieur-z .. the code looks good to me and it tested good. 💯 👍

@monsieur-z monsieur-z merged commit 42af5bd into trunk Oct 17, 2022
@monsieur-z monsieur-z deleted the fix/cloud-pricing-lang-switcher-close-btn branch October 17, 2022 19:27
@github-actions github-actions bot removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Oct 17, 2022
@a8ci18n
Copy link

a8ci18n commented Oct 17, 2022

This Pull Request is now available for translation here: https://translate.wordpress.com/deliverables/7582258

Thank you @monsieur-z for including a screenshot in the description! This is really helpful for our translators.

@a8ci18n
Copy link

a8ci18n commented Oct 27, 2022

Translation for this Pull Request has now been finished.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accessibility (a11y) [Feature] Pricing Feedback related to the pricing structure of WordPress.com's plans and services. Jetpack Cloud Anything related to the Jetpack Cloud (cloud.jetpack.com) [Size] XS Tiny sized issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants