Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#34944 closed defect (bug) (fixed)

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

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

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 10 years ago.
Make the "required" title attributes translatable in wp-admin/includes/media.php
patch.2.diff (2.5 KB) - added by andg 10 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 10 years ago.
34944.2.patch (8.2 KB) - added by afercia 10 years ago.

Download all attachments as: .zip

Change History (19)

@andg
10 years ago

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

#1 @swissspidy
10 years ago

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

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

#2 @andg
10 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 10 years ago by andg (previous) (diff)

@andg
10 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.


10 years ago

#4 follow-up: @afercia
10 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
10 years ago

  • Owner set to ocean90
  • Status changed from new to reviewing

#6 in reply to: ↑ 4 ; follow-up: @SergeyBiryukov
10 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
10 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
10 years ago

#8 @afercia
10 years ago

  • Keywords has-screenshots added

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

#9 @afercia
10 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 10 years ago by afercia (previous) (diff)

#10 follow-up: @ocean90
10 years ago

  • Keywords close added
  • Owner ocean90 deleted

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

#11 @markoheijnen
10 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
10 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
10 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
10 years ago

#14 in reply to: ↑ 13 @afercia
10 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
10 years ago

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

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.