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

My Home: Add aria labels and list markup to site setup checklist #53565

Merged
merged 3 commits into from
Jun 10, 2021

Conversation

p-jackson
Copy link
Member

Changes proposed in this Pull Request

  • Add aria-labels for the icons in the checklist
    • The tick icon has the label "Task complete"
    • The gray circle icon has the label "Task incomplete"
  • Make the checklist a real "list" semantically

The diff in GH makes it look scarier than it is. Ignoring the indentation change it wraps the checklist in a <ul> and replaces a <Fragment> with a <li>.

This change is important because we want to be supporting users who use assistive technology anyway. But this came up because we were discussing whether to change the task labels when the task gets completed. Previously that would have been the only way for screen readers to tell the difference between a complete and incomplete task. Adding the aria labels in this PR means we can make the decision about task labels independently of a11y concerns.

In mobile view the checklist switches to an accordian view. We should really be using GB's according component for this since it has better support for assistive technology.

Testing instructions

  • Open a site where site setup isn't complete using calypso.live
  • Open the same site in production and compare that the checklist looks the same
  • You can also check in voiceover that the icon labels are being read (although My Home doesn't have great support for a11y so it might be hard to move the narrator to the list)
  • Test in mobile view, the checklist should switch to an accordian view and work as it used to

This change has actually improved the placement of one of the borders in accordian view.
Before
Screenshot 2021-06-10 at 10 49 19 AM

After
Screenshot 2021-06-10 at 10 49 06 AM

Related to the discussion in #52936, although not the main issue.

@p-jackson p-jackson added [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. Accessibility (a11y) [Feature] My Home The main dashboard for managing a WordPress.com site. My Home Pod Back to Basics work in the My Home Pod labels Jun 9, 2021
@p-jackson p-jackson requested a review from a team June 9, 2021 23:06
@p-jackson p-jackson self-assigned this Jun 9, 2021
@p-jackson p-jackson requested a review from a team as a code owner June 9, 2021 23:06
@matticbot
Copy link
Contributor

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

Sections (~49 bytes added 📈 [gzipped])

name  parsed_size           gzip_size
home       +143 B  (+0.0%)      +49 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

@autumnfjeld autumnfjeld left a comment

Choose a reason for hiding this comment

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

✅ Verified aria-label
image

image

✅ Accordion view
image

@autumnfjeld
Copy link
Contributor

In mobile view the checklist switches to an accordian view. We should really be using GB's according component for this since it has better support for assistive technology.

Is this change worth the dev effort? Or perhaps worthy of a comment in the code, in the event of a larger piece of work or refactor , then refactoring to GB accordion could be integrated with another piece of work.

@p-jackson
Copy link
Member Author

p-jackson commented Jun 10, 2021

Is this change worth the dev effort?

Yes, because at the moment users who use assistive technology to navigate Calypso will struggle to work through the setup checklist.

Is it specific to the work of the My Home pod? Probably not. But a11y (and security, and performance, and supporting mobile web) are just part of the status quo of development imo.

@p-jackson p-jackson merged commit d4bebd8 into trunk Jun 10, 2021
@p-jackson p-jackson deleted the add/small-a11y-features-to-site-setup branch June 10, 2021 05:52
@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 Jun 10, 2021
@autumnfjeld
Copy link
Contributor

Is this change worth the dev effort?

Yes, because at the moment users who use assistive technology to navigate Calypso will struggle to work through the setup checklist.

Coolio. Then let's make a ticket for that work. :) bitmoji

@p-jackson
Copy link
Member Author

Or perhaps worthy of a comment in the code

Oh I think I see what you mean now, maybe we should have a // TODO in the code.

Then let's make a ticket for that work. :)

Yeah lets do this instead, I'm not sure TODO comments in code ever lead to much action 😅

@jordesign
Copy link
Contributor

From a visual/user POV this is looking good to me. Seems like a bonus win that the animation when opening a task with the accordion (in the mobile view) is much smoother looking

@a8ci18n
Copy link

a8ci18n commented Jun 10, 2021

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

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

@p-jackson
Copy link
Member Author

let's make a ticket for that work

Ticket created #53617

@a8ci18n
Copy link

a8ci18n commented Jun 17, 2021

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] My Home The main dashboard for managing a WordPress.com site. My Home Pod Back to Basics work in the My Home Pod
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants