[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 18:41:12 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 bschneidewind):
@siliconforks - my thoughts on things:
1 - The UX already supports this in the admin area, I don't think it's the
most logical approach overall but how could you force users to add a
'homepage' that may have already set it up this way? The
render_block_core_home_link function already has support for this edge
case as well.
2 - Agreed, it would be better if is_front_page always rang true when it's
the root page but there are edge cases that need to be accounted for and
there is some debate on whether is_front_page should remain true. Ex: if
it's a paginated page... from an accessibility point it shouldn't, but the
argument may differ in other aspects.
3 - This PR fixes get_custom_logo(). The TwentyTwenty update is to address
the specific template function where the text version is missing the aria-
current attribute. Yes, I am proposing this in multiple places to fix
older themes and in core to address block based themes.
4 - I am proposing a similar approach be added in some of the older themes
here where site logo support does not currently exist: #61766
Additional theme updates will be needed for bundled themes prior to
TwentyTwentyTwo because of how things were built on each theme. Even if
the is_front_page() was updated to account for the edge case, a theme
update would be needed on those bundled themes that do not have support
for aria-current on the site title links.
With TwentyTwentyTwo and up using block based approach, the aria-current
attribute is applied correctly there on the text links for the site-title.
It does create some repeated code between TwentyTwentyOne and earlier
bundled themes and the update to get_custom_logo, however I think it makes
sense in these cases as the theme updates are only needed because of a
different approach to building in TwentyTwentyOne and prior.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/62879#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list