WordPress / twentytwentyfour

198 stars 122 forks source link

Accessibility Issue: Archive Page Headline Not Reflecting Pagination #682

Closed KevinTaron closed 1 year ago

KevinTaron commented 1 year ago

Description In the WordPress default theme, there's a discrepancy between the title tag and the on-page headline for paginated archive pages. While the title tag correctly indicates pagination, such as "page 2", the on-page headline remains unchanged across paginations, leading to potential confusion and duplicate headlines.

Step-by-step reproduction instructions

  1. Go to a WordPress site using the default theme.
  2. Navigate to an archive page with multiple paginations.
  3. Click on the pagination to go to page 2 (/page/2/).
  4. Observe that the title tag correctly indicates "page 2".
  5. Compare this with the on-page headline which remains generic and does not reflect the pagination.
  6. Navigate to further paginated pages and note the consistent discrepancy.

Expected behavior

The on-page headline for each paginated archive page should align with its respective title tag, indicating the current page number. This ensures clear navigation, avoids duplicate headlines, and improves overall user experience.

Additional context Although the title tag correctly displays the pagination, having the on-page headline not reflect this can be misleading for users. It's not certain if this is an intentional design choice or a bug, but from a usability standpoint, unique headlines for different paginations would be beneficial.

carolinan commented 1 year ago

Hi @KevinTaron WordPress does not include the functionality to display a page number in the archive title. Any theme you may have seen using that feature, is using a custom solution, like a filter for get_the_archive_title.

Because this is a block theme, there are limitations to what should be changed in the theme versus the query title block. If you want the block to have this feature, you can suggest it as a feature request in the Gutenberg GitHub repository. If that feature is added, you can open new tickets about updating the bundled themes.

KevinTaron commented 1 year ago

Okay cool. Will do this.