WordPress.org

Make WordPress Core

Opened 3 months ago

Closed 3 months ago

Last modified 3 months ago

#52232 closed defect (bug) (fixed)

Remove useless <strong> tags in labels displayed in plugin/theme editor screens

Reported by: audrasjb Owned by: sarahricker
Milestone: 5.7 Priority: normal
Severity: normal Version:
Component: Administration Keywords: good-first-bug has-patch
Focuses: ui, accessibility Cc:

Description

In both wp-admin/plugin-editor.php and wp-admin/theme-editor screens, all labels use <strong> tags.

As every single label is emphasized with a <strong> tag, none of them is really emphasized anymore.

I think it would be nice to remove all strong tags, and if we really need bold font for design purposes (but I really doubt it), we should rather use CSS 😃

Attachments (5)

Capture d’écran 2021-01-05 à 22.41.42.png (372.5 KB) - added by audrasjb 3 months ago.
Plugin code editor screen
Capture d’écran 2021-01-05 à 22.42.58.png (470.8 KB) - added by audrasjb 3 months ago.
Theme code editor screen
Remove strong tags.diff (1.2 KB) - added by chemiker 3 months ago.
Remove strong tags.diff - This will remove <strong> tags as in the GitHub pull request. As a result "Select plugin to edit:" will a normal font-weight while the other labels ("Selected file content:" and "Documentation:") remain bold.
Remove strong tags and remove bold appearance of all labels.diff (1.6 KB) - added by chemiker 3 months ago.
Remove strong tags and remove bold appearance of all labels.diff - This will remove <strong> tags and apply a normal font-weight for all labels.
Remove strong tags and keep bold appearance of all labels.diff (1.6 KB) - added by chemiker 3 months ago.
Remove strong tags and keep bold appearance of all labels.diff - This will remove <strong> tags and keep a bold font-weight for all labels (like it looks in the current WordPress version).

Download all attachments as: .zip

Change History (19)

@audrasjb
3 months ago

Plugin code editor screen

@audrasjb
3 months ago

Theme code editor screen

#1 @SergeyBiryukov
3 months ago

  • Keywords good-first-bug added
  • Milestone changed from Awaiting Review to 5.7

Good catch. At a glance, I agree these labels don't really need the <strong> tags :)

This ticket was mentioned in PR #856 on WordPress/wordpress-develop by chemiker.


3 months ago

  • Keywords has-patch added

Removes <strong> tags as suggested in #52232. It must be mentioned that the font-weight of the labels "Documentation" and "Select plugin to edit:" remain bold due to their CSS styling.

Trac ticket: https://core.trac.wordpress.org/ticket/52232

#3 @chemiker
3 months ago

Hi,

I just submitted a pull request that removes the <strong> tags. In case it is desired that the label "Selected file content:" remains bold please let me know. I'll update the pull request and include the necessary CSS styling.

Best

Alex

#4 @mukesh27
3 months ago

In both wp-admin/plugin-editor.php and wp-admin/theme-editor screens Selected file content: doesn't use <strong> tag. and Documentation: also not use that tag both elements use font-weight: 600; CSS property so @audrasjb do you think that we need to remove that property from CSS also?

@chemiker PR looks good for other elements.

@chemiker
3 months ago

Remove strong tags.diff - This will remove <strong> tags as in the GitHub pull request. As a result "Select plugin to edit:" will a normal font-weight while the other labels ("Selected file content:" and "Documentation:") remain bold.

@chemiker
3 months ago

Remove strong tags and remove bold appearance of all labels.diff - This will remove <strong> tags and apply a normal font-weight for all labels.

@chemiker
3 months ago

Remove strong tags and keep bold appearance of all labels.diff - This will remove <strong> tags and keep a bold font-weight for all labels (like it looks in the current WordPress version).

#5 @chemiker
3 months ago

I've just provided three .diff files which consider three different options for styling:

  • Remove strong tags.diff - This will remove <strong> tags as in the GitHub pull request. As a result "Select plugin to edit:" will have a normal font-weight while the other labels ("Selected file content:" and "Documentation:") remain bold.
  • Remove strong tags and remove bold appearance of all labels.diff - This will remove <strong> tags and apply a normal font-weight for all labels.
  • Remove strong tags and keep bold appearance of all labels.diff - This will remove <strong> tags and keep a bold font-weight for all labels (like it looks in the current WordPress version).

Sorry for the "double" pull request on GitHub but as far as I understood the .diff files are needed anyway.

Last edited 3 months ago by chemiker (previous) (diff)

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


3 months ago

#7 @ryokuhi
3 months ago

  • Owner set to sarahricker
  • Status changed from new to assigned

This ticket was mentioned in Slack in #design by estelaris. View the logs.


3 months ago

#9 follow-up: @paaljoachim
3 months ago

  • Keywords needs-design-feedback removed

We brought up this ticket during a design triage.
Removing the <strong> tag and instead styling with CSS is a better idea.

I have removed the needs design feedback label.

#10 in reply to: ↑ 9 @chemiker
3 months ago

Replying to paaljoachim:

We brought up this ticket during a design triage.
Removing the <strong> tag and instead styling with CSS is a better idea.

I have removed the needs design feedback label.

Thanks for your feedback. The patch "Remove strong tags and keep bold appearance of all labels.diff" should be considered then.

This ticket was mentioned in Slack in #design by paaljoachim. View the logs.


3 months ago

#12 @audrasjb
3 months ago

Hi,

Remove strong tags and keep bold appearance of all labels.diff looks good to me as well.

#13 @SergeyBiryukov
3 months ago

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

In 49958:

Accessibility: Administration: Remove <strong> tags from labels on plugin/theme editor screens.

If every single label is emphasized with a <strong> tag, none of them is really emphasized anymore.

This removes the tags in favor of CSS styling, for consistency with the other labels on the screen.

Props chemiker, audrasjb, mukesh27, paaljoachim, estelaris, ibdz, SergeyBiryukov.
Fixes #52232.

#14 @prbot
3 months ago

chemiker commented on PR #856:

Merged with #72ad4e1bcfecab298f0798c0acb2367a754d7f2b

Note: See TracTickets for help on using tickets.