Make WordPress Core

Opened 20 years ago

Closed 20 years ago

Last modified 4 years ago

#3530 closed enhancement (fixed)

Change tag for MORE link text

Reported by: coolmann Owned by: rob1n
Priority: normal Milestone: 2.2
Component: Template Version: 2.1
Severity: normal Keywords: has-patch commit has-unit-tests
Cc: Focuses:

Description

I'd like to ask a small hack for Wordpress 2.x (both 2.0.x and 2.1 series are affected). For accessibility reasons, it would be nice to customize the "read more" link text added when using the <!--more--> separator. In post-template.php (for milestone 2.1) you have at row 98:

$output .= '<a id="more-'.$id.'"></a>'.$content[1];

Could you please replace this with

$output .= '<span id="more-'.$id.'">&nbsp;</span>'.$content[1];

Because an "empty link" is a bad practice, and raises an error when validating the page against W3C automatic validators.

Attachments (2)

3530.diff​ (506 bytes ) - added by Nazgul 20 years ago.
3530.2.diff​ (500 bytes ) - added by rob1n 20 years ago.

Download all attachments as: .zip

Change History (12)

#1 @Nazgul
20 years ago

  • Keywords has-patch added

#2 @ryan
20 years ago

  • Milestone 2.1 → 2.2

#3 @rob1n
20 years ago

  • Keywords more post-template removed
  • Owner changed from anonymous to rob1n
  • Status new → assigned

#4 follow-up: @rob1n
20 years ago

While Nazgul's patch does apply fine, I would like to question the &nbsp; that is in there. You don't need one for the anchor (the ID) to register, and it just adds a little space that might look weird.

#5 in reply to: ↑ 4 @foolswisdom
20 years ago

Replying to rob1n:

While Nazgul's patch does apply fine, I would like to question the &nbsp;

In the bug description Nazgul suggests an "empty link" does not validate.

#6 @rob1n
20 years ago

But an empty span does.

#7 @rob1n
20 years ago

  • Keywords commit added

#8 @ryan
20 years ago

  • Resolution → fixed
  • Status assigned → closed

(In [4925]) Change more from anchor to span for proper validation. Props coolmann and rob1n. fixes #3530

#9 @coolmann
20 years ago

Yes, Rob1n is right, the "space" is not really needed inside the SPAN element, sorry for that. I'm happy you approved my prop!

This ticket was mentioned in ​PR #3596 on ​WordPress/wordpress-develop by ​@peterwilsoncc.


4 years ago
#10

  • Keywords has-unit-tests added

Just the tests from PR #3530.

Note: See TracTickets for help on using tickets.