Automattic / Automattic/jetpack
Simple payments: semantically correct HTML output
- Dominant language
- PHP
- Stars
- 1.8k
- Forks
- 898
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 774
Description
When rendering a simple payments shortcode like`[simple-payment id="1"]`, the output could be simplified and made more semantically correct for both better accessibility and SEO:
>The title is a paragraph tag. I suggest we use a h-tag instead for semantics if it makes sense or to use an appropriate WAI-ARIA implementation such as labelledby. See more at https://www.w3.org/WAI/PF/aria/states_and_properties#aria-labelledby
Since this will affect existing CSS styling folks might've done, it's preferable to do this only when we anyway need to break the HTML from the block in future when possibly converting the block use inner blocks.
Additionally, simple payments HTML would also have Product Schema for better SEO: https://schema.org/Product
At the current state of Simple payments, these changes would need to be done [at Jetpack](https://github.com/Automattic/jetpack/blob/59d3303512ffe7b2c27443d8736367c945eea7e1/modules/simple-payments/simple-payments.php).
via p1HpG7-5V3-p2 #comment-29104
cc @aldavigdis
Contributor guide
Research direction
Start with modules/simple-payments/simple-payments.php and inspect how the [simple-payment id="1"] shortcode renders its HTML. Compare the current title markup and payment data with the linked WAI-ARIA guidance and Product Schema reference. Done means an agreed semantically correct, accessible output and Product Schema, with the future CSS-breaking and inner-block migration considerations resolved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- html, php, wordpress
- Domain
- accessibility, frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100