-
Notifications
You must be signed in to change notification settings - Fork 2k
Improve voiceover navigation on the plan comparison step #103800
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
base: trunk
Are you sure you want to change the base?
Improve voiceover navigation on the plan comparison step #103800
Conversation
Jetpack Cloud live (direct link)
Automattic for Agencies live (direct link)
|
This PR modifies the release build for the following Calypso Apps: For info about this notification, see here: PCYsg-OT6-p2
To test WordPress.com changes, run |
Here is how your PR affects size of JS and CSS bundles shipped to the user's browser: Sections (~299 bytes added 📈 [gzipped])
Sections contain code specific for a given set of routes. Is downloaded and parsed only when a particular route is navigated to. Async-loaded Components (~285 bytes added 📈 [gzipped])
React components that are loaded lazily, when a certain part of UI is displayed for the first time. 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. Generated by performance advisor bot at iscalypsofastyet.com. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is an improvement and I have not found any regressions so I'm accepting this. But I think these changes would benefit from another review.
Before
CleanShot.2025-05-30.at.18.01.16.mp4
After
CleanShot.2025-05-30.at.18.02.37.mp4
@katinthehatsite thanks for the review! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bcotrim , thanks for improving the accessibility of the plan comparison step.
I tested it with the voiceover and I was able to navigate through the main items correctly.
I left a few suggestions, but feel free to apply them only if they make sense.
One last comment is that I'm seeing a few console warnings in the chrome dev tools:
Warning: validateDOMNesting(...): <div> cannot appear as a child of <tr>. Error Component Stack
I don't see any visual regression:
Before | After |
---|---|
![]() |
![]() |
@@ -11,6 +11,7 @@ export const WooLogo = ( props: React.SVGProps< SVGSVGElement > ) => ( | |||
viewBox="0 0 183.6 47.5" | |||
{ ...props } | |||
> | |||
<title>WooCommerce logo</title> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we translate it?
import { useI18n } from '@wordpress/react-i18n';
...
const { __ } = useI18n();
...
<title>{ __('WooCommerce logo') }</title>
...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we remove "logo" as suggested in #103800 (comment), it would probably be wise to leave it untranslated as a brand name.
key="feature-name" | ||
className="is-feature-group-row-title-cell" | ||
isFeatureGroupRowTitleCell | ||
{ ...{ scope: 'row' } } | ||
aria-label={ ( feature?.getTitle?.() as string ) || '' } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we move the aria-label
into a variable and check if getTitle
returns a string, and if not fallback to a string or the empty string ?
key="feature-name" | ||
className="is-feature-group-row-title-cell" | ||
isFeatureGroupRowTitleCell | ||
{ ...{ scope: 'row' } } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be possible to declare RowTitleCell
as styled.th ? That way we wouldn't need to override the element with as
and then we could pass the prop/attribute scope="row"
without destructuring the object.
If we use two different elements with the same style, we reuse the styles like:
const RowTitleCellBody = styled.td( RowTitleCell );
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a nice suggestion!
I tried with your suggestion and the style broke.
Duplicating the styled component definition worked.
@@ -11,6 +11,7 @@ export const WooLogo = ( props: React.SVGProps< SVGSVGElement > ) => ( | |||
viewBox="0 0 183.6 47.5" | |||
{ ...props } | |||
> | |||
<title>WooCommerce logo</title> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a related effort DS-216 to standardize all of our logos. I think this addition is consistent with that (using title
for text alternative), but we may want to leave out the word "logo" for consistency and to avoid redundancies.
<title>WooCommerce logo</title> | |
<title>WooCommerce</title> |
Part of DOTCOM-13283
Proposed Changes
aria-label
andaria-hidden
as necessaryStickyContainer
logic and behaviorNote: This PR only focus on the table elements and scope, there might still be more a11y improvements necessary on this workflow.
Why are these changes being made?
Testing Instructions
yarn start
http://calypso.localhost:3000/setup/onboarding/plans
Pre-merge Checklist