[wp-trac] [WordPress Trac] #47094: Widgets: current-page links are not programmatically labelled as such
WordPress Trac
noreply at wordpress.org
Thu Sep 5 15:29:57 UTC 2019
#47094: Widgets: current-page links are not programmatically labelled as such
-------------------------------------------------+-------------------------
Reporter: audrasjb | Owner: audrasjb
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: 5.3
Component: Widgets | Version:
Severity: normal | Resolution:
Keywords: has-screenshots has-patch needs- | Focuses:
dev-note wpcampus-report aria-current | accessibility
-------------------------------------------------+-------------------------
Comment (by afercia):
I'd like some feedback from devs more experience than me about the two
options. The current patch uses this check:
`if ( is_single() && get_the_ID() === $recent_post->ID ) { ...`
I ''think'' it could be simplified to:
`if ( get_queried_object_id() === $recent_post->ID ) { ...`
Pinging the Widgets component maintainers @welcher and @audrasjb.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/47094#comment:11>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list