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

WordPress Trac noreply at wordpress.org
Mon Feb 10 13:30: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 sabernhardt):

 Sorry, I have managed to make this quite confusing. Parts of comment:9
 relate better to the Site Title and Home Link blocks.

 Regarding `get_custom_logo()`:
 1. The front-page conditions used in [48749] already created false
 positives for home logo links (and the unlink option) on the two network
 pages.
 2. Introducing an `is_home()` condition theoretically can add `aria-
 current` in [https://github.com/WordPress/wordpress-
 develop/blob/78bcb74bdfbb58cdd494058458e5bbc4b84df022/src/wp-includes
 /class-wp-query.php#L1041-L1045 unknown edge cases], though
 `parse_query()` corrects some situations in the lines following
 `$this->is_home = true` (so it might not be a //major// concern).

 > What happens if you do assign a static home page (in addition to a page
 of posts)?

 The static home page would match `is_front_page()`, and `aria-current` is
 appropriate there (before or after PR 8206).

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


More information about the wp-trac mailing list