Duplicate H1: hidden screen-reader title H1 rendered alongside custom layout H1 when page title is hidden
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 48/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Ambito
- accessibility, frontend
Direzione di ricerca
Start by reading views/page-header.php, especially the hidden-title branch and its H1 check, then trace inc/views/page_header.php to understand how the view is hooked. Try reproducing the case with a hidden title and a Custom Layout H1 on both a regular page and the posts page. Done means the page renders only the custom layout H1; no relevant test coverage was found, so identify or add a regression check.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
When a page's title is hidden and a Custom Layout supplies its own H1, the page ends up with two H1 headings. The second is Neve's visually hidden title.
Expected: only one H1 on the page, the one from the custom layout.
Actual: Neve outputs an extra H1 with the screen-reader-text class in addition to the custom layout H1.
Impact: SEO and heading-checker tools flag multiple H1s on the page.
Customer context
- Product / area: Neve page header with Neve Pro Custom Layouts
- Version: Not provided
- Environment: Page using a custom layout with an H1 heading; the page title is hidden (inferred)
- Integration / third party: Neve Pro custom layouts
- Reported error / symptom: Two H1 headings reported on a page that uses a custom layout
- Impact: SEO concern; customer is using a heading checker
Reproduction notes
Not reproduced. Likely steps (inference): 1) Hide the page title through the global setting or the per-page setting. 2) Add a Neve Pro Custom Layout that renders an H1. 3) Inspect the frontend HTML for two H1 elements. Missing: Neve and Neve Pro versions, and the exact custom layout hook.
Diagnosis
Conclusion
When the title is hidden, views/page-header.php outputs a visually hidden H1 unless it finds an H1 in the post's raw post_content. Markup injected by a custom layout or hook is not in post_content, so the check does not see it and a second H1 can render. This is inferred from reading the code; no runtime reproduction was done.
Where this likely occurs
views/page-header.phpapprox. lines 15-27 and 46-56 (hide-title decision and theelsebranch):$content_has_h1is computed fromget_post_field('post_content')only. If false, it echoes thescreen-reader-textH1.inc/views/page_header.php—Page_Header::run()line 43 andrender_page_header()lines 53-67 hook the view intoneve_page_headerat priority 9.- The page the customer linked is not necessarily the blog page. The staff reply described the case as the blog/posts page, via
is_home. The archive hide-title default at lines 21-23 of the view may be involved.
Engineering notes
The H1 check looks only at post content. It does not look at output from other sources such as Neve Pro custom layouts hooked into the page header. Neve Pro was only grepped for neve_page_header usage; the custom layout rendering code was not inspected in depth. Custom layouts may also inject at other hooks.
Test coverage status
No relevant coverage was found during inspection (not exhaustive).
What to verify or explore next
- Reproduce with a Custom Layout containing an H1 on the posts page and on a regular page, with the title hidden, and count the H1 elements.
- Check whether archive and blog pages hide the title by default for new users via
neve_archive_hide_title.
Unknowns / follow-up
- Theme and Pro versions, and the hook where the customer's layout renders.
- Whether an open issue already tracks this.
Confidence
Confidence: 70/100
The hidden-title branch in views/page-header.php only checks the post's raw content for an H1. A custom layout that outputs its own H1 is not detected, so a second H1 renders. No existing GitHub issue was searched, and I did not inspect customer-side layout markup.
Source: HelpScout #3479313350
Generated by bug-report-triage (ID: bug-report-triage_6acb421c5ba113.05905873)
- Lingua principale
- PHP
- Stelle
- 307
- Fork
- 88
- Merge medio
- 2g 21h
- PR unite (30g)
- 15
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Codeinwp/neve
-
Customizer responsive sanitizer fatals when input is an arrayForse già presa @HardeepAsrani l’ha presa 6 giorni fa. Apertabug-report bug-report-triage crash-report
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
Codeinwp/neve#4651 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Customizer controls script throws when WooCommerce is inactive and an Elementor shop template exists (woocommerce_product_catalog section missing)Forse già presa @girishpanchal30 l’ha presa 2 giorni fa. Apertabug-report bug-report-triage customer report
Codeinwp/neve#4653 · 3 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
feature-request-triage
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
I maintainer di solito rispondono entro 1 giorno
-
feature-request-triage
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
I maintainer di solito rispondono entro 1 giorno
-
customer report feature-request-triage
Difficoltà 4/5 3-5 giorni Idoneità per principianti 52/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di Codeinwp/neve
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
Automattic/blocks-engine#2866 ·
I maintainer di solito rispondono entro 1 giorno
-
Good first issue: add laravel-inertia stack budget preset (Laravel 11 + Inertia.js + PHP 8.3)Apertaenhancement good first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
-
backend gamification P0
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
semanadeinformatica/website#461 ·
-
HttpRequestTrait fatals on WordPress 7.2: $blocked_http_requests clashes with WP_UnitTestCase_BaseAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
area: docs eco: php good first issue help wanted lane: free-agent roadmap size: XS type: docs
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
arminazimi/evergreen#453 ·
I maintainer di solito rispondono entro 1 giorno