Make WordPress Core

Opened 7 years ago

Closed 6 years ago

Last modified 4 years ago

#43522 closed enhancement (fixed)

Add aria-current to output of Walker_Page

Reported by: chetan200891's profile chetan200891 Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 5.1 Priority: normal
Severity: normal Version: 4.8
Component: Themes Keywords: dev-feedback has-patch
Focuses: accessibility Cc:

Description

From the reference of ticket #43191, Also need to add area-current to output of Walker_Page.

I think below modifications can help.

if ( $page->ID == $current_page ) {
        $atts['aria-current'] = 'page';
}

Attachments (2)

43522.diff (503 bytes) - added by wpzinc 7 years ago.
43522.1.diff (691 bytes) - added by chetan200891 4 years ago.
Updated patch.

Download all attachments as: .zip

Change History (21)

This ticket was mentioned in Slack in #accessibility by chetan200891. View the logs.


7 years ago

This ticket was mentioned in Slack in #accessibility by afercia. View the logs.


7 years ago

#3 @afercia
7 years ago

  • Component changed from General to Themes
  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to 5.0
  • Version trunk deleted

@wpzinc
7 years ago

#4 @lonelyvegan
7 years ago

  • Keywords has-patch added; needs-patch removed

Looks like this has a patch, so updating the keywords.

This ticket was mentioned in Slack in #accessibility by afercia. View the logs.


6 years ago

#6 @afercia
6 years ago

  • Milestone changed from 5.0 to 4.9.9

Discussed during today's accessibility bug scrub and we'd like to propose this ticket for 4.9.9 consideration.

#7 @pento
6 years ago

  • Milestone changed from 4.9.9 to 5.0.1

#8 @pento
6 years ago

  • Milestone changed from 5.0.1 to 5.0.2

#9 @pento
6 years ago

  • Milestone changed from 5.0.2 to 5.0.3

#10 @audrasjb
6 years ago

  • Keywords 2nd-opinion dev-feedback added

Patch looks fine on my side.

This ticket is triaged in milestone 5.0.3. It will needs commit and backport to the related branch.

This ticket was mentioned in Slack in #core by desrosj. View the logs.


6 years ago

#12 @desrosj
6 years ago

  • Milestone changed from 5.0.3 to 5.1

Going to punt this to 5.1. It is outside of the scope for 5.0.3 (block
editor bugs, regressions, and major bugs).

#13 @SergeyBiryukov
6 years ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to closed

In 44416:

Accessibility: Themes: use aria-current for the Walker_Page current link.

See [42808] for Walker_Nav_Menu.

The aria-current attribute is a simple, effective way to help assistive
technologies users orientate themselves within a list of items. Continues the
introduction in core of aria-current after [42440], [41683], [41359], and [41371].

Props chetan200891, wpzinc.
Fixes #43522.

#15 @jnylen0
4 years ago

  • Keywords needs-patch added; has-patch 2nd-opinion removed
  • Version set to 4.8

[44416] has an issue: the array key is named aria-current in the code but referred to as aria_current in the docs.

This ticket was mentioned in Slack in #core by jnylen. View the logs.


4 years ago

This ticket was mentioned in Slack in #accessibility by jnylen. View the logs.


4 years ago

@chetan200891
4 years ago

Updated patch.

#18 @chetan200891
4 years ago

  • Keywords has-patch added; needs-patch removed

I have updated patch 43522.1.diff

#19 @SergeyBiryukov
4 years ago

In 50823:

Docs: Correct the aria-current array key in the documentation for two widget filters.

This applies to nav_menu_link_attributes and page_menu_link_attributes filters.

Follow-up to [42808], [44416].

Props jnylen0, chetan200891, alexstine.
See #43522, #52628.

Note: See TracTickets for help on using tickets.