[wp-trac] [WordPress Trac] #62879: get_custom_logo does not apply the aria-current attribute in all cases

WordPress Trac noreply at wordpress.org
Sun Feb 2 16:36:13 UTC 2025


#62879: get_custom_logo does not apply the aria-current attribute in all cases
---------------------------+----------------------------
 Reporter:  bschneidewind  |       Owner:  audrasjb
     Type:  defect (bug)   |      Status:  reviewing
 Priority:  normal         |   Milestone:  6.8
Component:  General        |     Version:
 Severity:  normal         |  Resolution:
 Keywords:  has-patch      |     Focuses:  accessibility
---------------------------+----------------------------

Comment (by siliconforks):

 Replying to [ticket:62879 bschneidewind]:
 > When reading settings have a posts page set but not a page set for the
 homepage

 Some questions:

 1. Is that actually considered a valid, supported configuration (to have a
 posts page set but not a page set for the homepage)?  That doesn't really
 seem like it would be useful combination of settings to me.  I see that
 the WordPress admin section does in fact allow you to configure things
 that way, which is a bit odd and might be a bug?

 2. Assuming that this ''is'' a configuration that should be supported by
 WordPress, doesn't that imply that `is_front_page()` and
 `WP_Query::is_front_page()` are broken in that configuration?  It appears
 that they will never return `true` in that configuration, which doesn't
 really make sense (obviously the site still has a front page).

 3. The current proposed changes to support this configuration involve
 adding some rather complex conditional logic.
   It is currently proposed that this logic be copied into multiple
 different places in the code?
   * https://github.com/WordPress/wordpress-develop/pull/8206 - this fixes
 `get_custom_logo()`
   * https://github.com/WordPress/wordpress-develop/pull/8237 - this fixes
 the `twentytwenty` theme (#62895)
 4. Copying this complex code into multiple places doesn't seem very
 [https://en.wikipedia.org/wiki/Don%27t_repeat_yourself DRY].  Is this
 going to need to get copied into other places too?  What about all the
 other themes besides `twentytwenty`?  Fixing `is_front_page()` could
 perhaps eliminate the need for this.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/62879#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list