Make WordPress Core

Opened 4 years ago

Last modified 6 months ago

#32940 new enhancement

Add IDs to Admin Hyperlinks

Reported by: charlestonsw Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.3
Component: Administration Keywords: needs-patch
Focuses: Cc:
PR Number:


Suggestion: add Ids to the primary admin interface hyperlinks.

Adding IDs to primary anchor tags in the admin UI makes it far easier to create and maintain UI test suites such as Selenium IDE. UI testing catches problems that phpUnit is not designed to address.

Example: Pages / Add New

xpath = /html/body/div/div[1]/div[2]/ul/li[5]/ul/li[3]/a

css = html.wp-toolbar body.wp-admin.wp-core-ui.js.edit-php.auto-fold.admin-bar.post-type-page.branch-4-3.version-4-3.admin-color-fresh.locale-en-us.customize-support.sticky-menu.svg div#wpwrap div#adminmenumain div#adminmenuwrap ul#adminmenu li#menu-pages.wp-has-submenu.wp-has-current-submenu.wp-menu-open.menu-top.menu-icon-page ul.wp-submenu.wp-submenu-wrap li a

Would be nice to reference key elements with things like a#menu-page-add-new instead. Especially when updates to WP Core change the higher level HTML DOM classesor structures.

Change History (1)

#1 @wonderboymusic
4 years ago

  • Keywords needs-patch added
Note: See TracTickets for help on using tickets.