[wp-trac] [WordPress Trac] #47094: Widgets: current-page links are not programmatically labelled as such

WordPress Trac noreply at wordpress.org
Wed May 1 20:38:14 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         |   Keywords:  needs-patch
  Focuses:  accessibility  |
---------------------------+-------------------------
 Note: this issue was first reported by Karl Groves (@karlgroves) in
 Gutenberg Github repository.
 https://github.com/WordPress/gutenberg/issues/15333

 Current-page link is not programmatically labelled as such

 Severity: Medium

 Affected Populations:
 Low-Vision
 Cognitively Impaired

 Platform(s):
 All / Universal

 Components affected:
 Output Markup
 Issue description

 When a page is created and users view it, its name appears in the
 sidebar under "Recent Posts", however there is no visual or semantic
 indication that this link relates to the current page.

 Since it's possible for authors to create multiple articles with the
 same name, the lack of indication may cause confusion for users with
 cognitive disabilities and screen reader users.

 Issue Code:
 {{{
     <li>
         <a href="...">...</a>
     </li>
 }}}

 Remediation Guidance
 Whenever the current page is reflected in a menu on that page, add
 aria-current="page" to the applicable link.

 Use the aria-current attribute as a hook to add a distinctive visual
 style to separate it from other links.

 Recommended Code:

 {{{
     <li>
         <a href="..." aria-current="page">...</a>
     </li>
 }}}

 {{{
     widget_recent_entries a[aria-current] {
         /*  styles */
     }

 }}}

 Relevant standards:
 2.4.4 Link Purpose (In Context) (Level A)
 https://www.w3.org/TR/WCAG20/#navigation-mechanisms-refs
 2.4.8 Location (Level AAA)
 https://www.w3.org/TR/WCAG20/#navigation-mechanisms-location

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/47094>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list