Codeinwp / Codeinwp/wp-maintenance-mode
Don't wrap text in an <h2>
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 163
- Forks
- 82
- Avg merge
- 8h 31m
- Merged PRs (30d)
- 8
Description
When entering text in the rich text editor, it automatically adds all the HTML we need (<p>,<ul> or <ol>, etc.).
The plugin then wraps all of that content in an <h2> element, which is invalid HTML. The W3C HTML validator returns errors such as:
- Element p not allowed as child of element h2 in this context.
- Element ul not allowed as child of element h2 in this context.
Can the <h2> element be dropped and just use what the rich text editor generates?
If you were to implement this, you could stylize other block level elements using the same default CSS that you're currently using for <h2>. So unless users have overridden the default CSS, their content will still look the same.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate the plugin code that wraps rich text editor output in an h2 element, then inspect the generated markup for paragraphs and lists. Confirm the change with the W3C HTML validator; done means block elements are no longer nested inside h2 and the existing default styling remains effective.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- html, php, wordpress
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100