Newsletter: match subscriber row avatar fallback to the detail panel#49581
Newsletter: match subscriber row avatar fallback to the detail panel#49581dhasilva wants to merge 1 commit into
Conversation
The modernized Newsletter subscriber row dropped `displayName` from the shared Gravatar to avoid a duplicate screen-reader announcement, but that also stripped the `&name=` parameter the `d=initials` fallback uses to derive the initials. Subscribers without a Gravatar got a generic placeholder in the row that didn't match the detail panel's initials tile. Pass `displayName` again — the `aria-hidden` wrapper already keeps the avatar (and its alt) out of the accessibility tree, so there's no double announcement, and the row now renders the same initials fallback as the detail panel. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.
Interested in more tips and information?
|
|
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖 Follow this PR Review Process:
If you have questions about anything, reach out in #jetpack-developers for guidance! |
Code Coverage SummaryThis PR did not change code coverage! That could be good or bad, depending on the situation. Everything covered before, and still is? Great! Nothing was covered before? Not so great. 🤷 |
|
@dhasilva can we make the line vertically centred. So that the gravatar is the center aligned. |


Fixes #
Proposed changes
displayNameon the sharedGravatarcomponent (originally to avoid a duplicate screen-reader announcement).displayNamedoes double duty — it's thealttext and becomes the&name=URL parameter that Gravatar'sd=initialsdefault image uses to derive the initials. Dropping it stripped&name=, so the row's initials fallback had nothing to render from.displayNameto the row'sGravataragain. The avatar is already wrapped inaria-hidden="true", which keeps it (and itsalt) out of the accessibility tree — so there's no double announcement, and the row now renders the same initials fallback as the detail panel.name=parameter (so it matches the detail panel).Related product discussion/links
Does this pull request change what data or activity we track or use?
No.
Testing instructions
Before / After
Subscriber row avatar vs. detail-panel avatar for a subscriber with no Gravatar (emails redacted). Before, the row fell back to a generic placeholder while the panel showed the initials tile; after, both render the same initials tile.