WordPress.org

Make WordPress Core

Opened 5 months ago

Last modified 3 months ago

#26167 reopened enhancement

Plugin activation links need to contain plugin name and the "Plugin" column should be marked as row header

Reported by: grahamarmfield Owned by:
Milestone: Future Release Priority: low
Severity: normal Version: 3.8
Component: Plugins Keywords: has-patch
Focuses: accessibility Cc:

Description

In the plugins table within admin, the Activate, Deactivate, Edit and Delete links need to contain the plugin name they relate to. This is to provide context for screen reader users.

If required, the plugin name portion of the link can be hidden from sighted users with the use of the 'screen-reader-text' CSS class. An example:

<a href="">Activate<span class="screen-reader-text"> Akismet</span></a>

This shouldn't clash with internationalisation processing since the plugin name won't change in different languages (I believe).

Attachments (2)

26167.patch (5.0 KB) - added by SergeyBiryukov 5 months ago.
26167-1.patch (6.2 KB) - added by bramd 5 months ago.
This patch depends on 25459-functions.patch (see #25459). It solves the internationalization issues by using a placeholder for the plugin name and making this string translatable. I've also sneaked in another little change that marks the column containing the plugin name as row header (<th>) instead of the checkbox which is more appropriate. Probably the ticket title/description should be updated to reflect this change.

Download all attachments as: .zip

Change History (14)

SergeyBiryukov5 months ago

comment:1 SergeyBiryukov5 months ago

  • Keywords has-patch added
  • Milestone changed from Awaiting Review to 3.8

This shouldn't clash with internationalisation processing since the plugin name won't change in different languages (I believe).

Actually, plugin headers (including title) are translatable, but I don't think that would cause an issue here either.

comment:2 follow-up: ocean905 months ago

  • Keywords needs-patch added; has-patch removed

I think this needs some more work since there are some translation issues.

First: This needs probably a swap in RTL.
Second: This needs some context since in German "Activate" is currently "Aktivieren". So a screen reader would read "Aktivieren Akismet", that's wrong. It must be "Aktiviere Akismet" in this context - or "Akismet aktivieren".

comment:3 dd325 months ago

Activate %s should probably be used with the span and translated plugin name injected.

comment:4 MikeLittle5 months ago

It seems from the German example that the verb needs to be translatable in two different contexts. With the plugin name (for screen readers), and without the plugin name for visual readers. That is, with the name is it "verb object", without it is "command".
That cannot be handled with a single translation.

Suggested alternates (assume plugin name is wrapped in the span):
Activate: Plugin name
Activate (plugin name)

comment:5 johnbillion5 months ago

  • Type changed from defect (bug) to enhancement

Related: #25459

comment:6 matt5 months ago

  • Priority changed from normal to low

comment:7 in reply to: ↑ 2 daveshine5 months ago

Replying to ocean90:

I think this needs some more work since there are some translation issues.

First: This needs probably a swap in RTL.
Second: This needs some context since in German "Activate" is currently "Aktivieren". So a screen reader would read "Aktivieren Akismet", that's wrong. It must be "Aktiviere Akismet" in this context - or "Akismet aktivieren".

+1 to this!
This patch needs more testing and I doubt that it is ready for 3.8 already. We should test more and maybe include with 3.9. The translation issues are very important as it directly effects the user experience. The current view should not be changed for sighting users, IMHO.

My suggestion is, to use @MikeLittle's approach with translation context here, maybe in combination with sprintf() and string placeholders.

comment:8 daveshine5 months ago

  • Cc daveshine added

comment:9 ocean905 months ago

  • Milestone changed from 3.8 to Future Release

bramd5 months ago

This patch depends on 25459-functions.patch (see #25459). It solves the internationalization issues by using a placeholder for the plugin name and making this string translatable. I've also sneaked in another little change that marks the column containing the plugin name as row header (<th>) instead of the checkbox which is more appropriate. Probably the ticket title/description should be updated to reflect this change.

comment:10 bramd5 months ago

  • Cc bramd added
  • Keywords has-patch added; needs-patch removed
  • Status changed from new to closed
  • Summary changed from Plugin activation links need to contain plugin name to Plugin activation links need to contain plugin name and the "Plugin" column should be marked as row header

comment:11 bramd5 months ago

  • Status changed from closed to reopened

Whoops, didn't want to close the ticket...

comment:12 nacin3 months ago

  • Component changed from Accessibility to Plugins
  • Focuses accessibility added
Note: See TracTickets for help on using tickets.