Make WordPress Core

Opened 11 years ago

Closed 11 years ago

#34944 closed defect (bug) (fixed)

The "required" title attributes are not translatable in wp-admin/includes/media.php

Reported by: andg Owned by: afercia
Priority: normal Milestone: 4.5
Component: I18N Version: 4.4
Severity: normal Keywords: has-patch has-screenshots commit
Cc: Focuses: accessibility, administration

Description

In the wp-admin/includes/media.php file, a few title attributes with an hardcoded value of required (the title is present because the content of those links is just an asterisk) are not translatable.

Attachments (4)

patch.diff (2.4 KB ) - added by andg 11 years ago.
Make the "required" title attributes translatable in wp-admin/includes/media.php
patch.2.diff (2.5 KB ) - added by andg 11 years ago.
Make the "required" title attributes translatable in wp-admin/includes/media.php, with proper context.
34944.patch (8.4 KB ) - added by afercia 11 years ago.
34944.2.patch (8.2 KB ) - added by afercia 11 years ago.

Download all attachments as: .zip

Change History (19)

@andg
11 years ago

Make the "required" title attributes translatable in wp-admin/includes/media.php

#1 @swissspidy
11 years ago

  • Keywords has-patch added
  • Milestone Awaiting Review4.5

Looks good to me. Perhaps strings need context for translators?

#2 @andg
11 years ago

Something along the line of input fields title attribute, perhaps? Better have context than not, preparing another patch. Thanks for the feedback, @swissspidy!

Last edited 11 years ago by andg (previous) (diff)

@andg
11 years ago

Make the "required" title attributes translatable in wp-admin/includes/media.php, with proper context.

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


11 years ago

#4 follow-up: @afercia
11 years ago

Was struggling a bit trying to find where these title attributes are actually used. Looks like some of them were used in the pre-3.5.0 media upload popup, not sure if still used somewhere, maybe worth checking a bit before introducing new strings? cc @ocean90

Screenshot from WP 3.4:

https://cldup.com/jG_sQWocF5.png

#5 @swissspidy
11 years ago

  • Owner set to ocean90
  • Status newreviewing

#6 in reply to: ↑ 4 ; follow-up: @SergeyBiryukov
11 years ago

Replying to afercia:

Was struggling a bit trying to find where these title attributes are actually used. Looks like some of them were used in the pre-3.5.0 media upload popup, not sure if still used somewhere, maybe worth checking a bit before introducing new strings?

The old media UI can be re-enabled with a plugin, and I've seen some plugins using it.

Should we perhaps add aria-label in addition to (or instead of) the title attribute?

#7 in reply to: ↑ 6 @afercia
11 years ago

  • Focuses accessibility added

Replying to SergeyBiryukov:

The old media UI can be re-enabled with a plugin, and I've seen some plugins using it.

Then the best thing would probably be mimicking the Comment form and:

  • remove the title attribute
  • add the sentence "Required fields are marked *" before the form
  • move the asterisk inside the labels
  • add both aria-required="true" and required on the required fields

@afercia
11 years ago

#8 @afercia
11 years ago

  • Keywords has-screenshots added

First pass with the new approach. Any feedback and improvements welcome :)

#9 @afercia
11 years ago

Screenshot with an example of the patch applied. The asterisk won't be replaced by the icons but the "no", "OK" and spinner icons will still work:

https://cldup.com/5lV6kGeh-6.png

Last edited 11 years ago by afercia (previous) (diff)

#10 follow-up: @ocean90
11 years ago

  • Keywords close added
  • Owner ocean90 removed

I'm voting for a wontfix. The old media UI is … old and we shouldn't encourage people to still using it.

#11 @markoheijnen
11 years ago

I can see both points. I do think we should fix it. Not to encourage people but to create a better experience if a user is still seeing this. Wasn't this also not enabled if a certain action/filter was used?

#12 in reply to: ↑ 10 @afercia
11 years ago

Replying to ocean90:

we shouldn't encourage people to still using it.

I see both points but if won't fix, then maybe it should be deprecated? I'd vote to just fix it, it's simpler :)

#13 follow-up: @kirasong
11 years ago

  • Owner set to afercia

I don't see this as a priority, but also don't have a problem with it being fixed. Up to you.

@afercia
11 years ago

#14 in reply to: ↑ 13 @afercia
11 years ago

  • Keywords commit added; close removed

Replying to mikeschroder:

I don't see this as a priority, but also don't have a problem with it being fixed. Up to you.

Refreshed patch. Definitely not a priority, I'd just like to kill all the title attributes :)

#15 @afercia
11 years ago

  • Resolutionfixed
  • Status reviewingclosed

In 36879:

Accessibility: Remove the title attributes from the old Media UI.

Also, adds better indication and attributes for the required form fields.
Moves some styles to deprecated-media.css.

Props andg, afercia.
Fixes #34944.

Note: See TracTickets for help on using tickets.