Make WordPress Core

Opened 6 weeks ago

Closed 10 days ago

#61011 closed defect (bug) (fixed)

Plugin management: The "Install Now/Activate" button should be a button not a link

Reported by: stevejonesdev's profile stevejonesdev Owned by: rcreators's profile rcreators
Milestone: 6.6 Priority: normal
Severity: normal Version: 6.5
Component: Plugins Keywords: has-patch
Focuses: accessibility Cc:


On the WordPress plugin installation page, the "Install Now/Activate" link acts more like a button than a typical link, it triggers actions rather than leading you somewhere else. To make this clearer and improve accessibility, it would be better to convert it into an actual button. This can be done by either updating the HTML to use a <button> tag or by adding a role="button" attribute to the link.

Attachments (4)

61011.diff (2.5 KB) - added by vipulgupta003 3 weeks ago.
Patch file.
61011-Install-now.png (70.3 KB) - added by rcreators 3 weeks ago.
61011-Installing.png (68.6 KB) - added by rcreators 3 weeks ago.
61011-Activate.png (88.7 KB) - added by rcreators 3 weeks ago.

Download all attachments as: .zip

Change History (12)

#1 @stevejonesdev
6 weeks ago

Interestingly the link markup changes to a button once the plugin is active. But with the Ajax plugin activation introduced in version 6.5, the markup doesn't refresh until a manual page refresh, which I've detailed in this ticket / 60992.

#2 @sabernhardt
4 weeks ago

You already noticed the related ticket #60992, and #60663 is also related. I'm not sure whether this should be closed as a duplicate of either of them.

#3 @stevejonesdev
4 weeks ago

Those tickets are related but neither of them would fully address this accessibility issue. The initial state of the "Install Now/Activate" button is an anchor link when it should be a button or have a role of button. Once a plugin is installed and activated it is not until after the page is reloaded that it turns into a button. Since the page no longer reloads as noted in ticket #60992 the "Install Now/Activate" button never changes to a button unless the user does a manual page refresh. This is also why it's still clickable as noted in ticket ticket #60663.

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

3 weeks ago

#5 @joedolson
3 weeks ago

  • Milestone changed from Awaiting Review to 6.6
  • Owner set to rcreators
  • Status changed from new to assigned

3 weeks ago

Patch file.

#6 @vipulgupta003
3 weeks ago

@joedolson I have submitted the patch for the same.

#7 @rcreators
3 weeks ago

  • Keywords has-patch added; needs-patch removed

@vipulgupta003 Thanks for the patch. Tested and works Fine. Here are the test results after the patch.

Install Link

Installing Link

Activate Link

Last edited 3 weeks ago by rcreators (previous) (diff)

#8 @jorbin
10 days ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 58161:

Plugins: Assign role of button to links that act as buttons.

Clicking on these links initiates an action, so they are more semantically a button rather than a link. Keeping them as an anchor in html allows any existing JS that is targeted to these items to continue to function. The addition of the role helps assistive technology to know that they should treat this as a button.

Props stevejonesdev, sabernhardt, vipulgupta003, rcreators, joedolson.
Fixes #61011.

Note: See TracTickets for help on using tickets.