WordPress.org

Make WordPress Core

Opened 9 years ago

Last modified 8 months ago

#17520 new enhancement

cite element used incorrectly

Reported by: holizz Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Administration Keywords: has-patch needs-refresh
Focuses: Cc:
PR Number:

Description

Here's what the HTML5 specification says about the cite element:

The cite element represents the title of a work (e.g. a book, a paper, an essay, a poem, a score, a song, a script, a film, a TV show, a game, a sculpture, a painting, a theatre production, a play, an opera, a musical, an exhibition, a legal case report, etc). […]


A person's name is not the title of a work — even if people call that person a piece of work — and the element must therefore not be used to mark up people's names. (In some cases, the b element might be appropriate for names; e.g. in a gossip article where the names of famous people are keywords rendered with a different style to draw attention to them. In other cases, if an element is really needed, the span element can be used.)

http://www.whatwg.org/specs/web-apps/current-work/multipage/text-level-semantics.html#the-cite-element

The element is used plugins/hello.php correctly to mark up the title "Hello, Dolly". But many more places it is used incorrectly to mark up an author's name.

The obvious fix would be to replace all but the one correct instance of the cite element with spans with an appropriate class.

Attachments (1)

17520.patch (4.3 KB) - added by jakub.tyrcha 9 years ago.

Download all attachments as: .zip

Change History (10)

#1 @aaroncampbell
9 years ago

  • Priority changed from normal to low
  • Type changed from defect (bug) to enhancement

According to the working draft for HTML5 you are correct about cite. However, that's for HTML5 and the WordPress admin doctype is XHTML 1.0 Transitional.

Although previous versions of HTML implied that the cite element can be used to mark up the name of a person, that usage is no longer considered conforming.

It seems to me that we're fine until we switch wp-admin to HTML5. I could see possibly fixing the one occurrence of this in twentyeleven, but even then it doesn't seem like this is a bug.

#2 @holizz
9 years ago

According to the HTML 4.01 spec (XHTML 1.0 doesn't define any elements - it relies on HTML4 for that):

CITE:
Contains a citation or a reference to other sources.

http://www.w3.org/TR/html4/struct/text.html#edef-CITE

I wouldn't consider a person's name to fit that definition, though it's not as specific about names as the HTML5 spec.

And cite does appear several places outside of wp-admin.

#3 @iandstewart
9 years ago

In [18030]:

Twenty Eleven: using the cite element to markup a name doesn't conform to the HTML spec; Props holizz and aaroncampbell; See #17520

@jakub.tyrcha
9 years ago

#4 @jakub.tyrcha
9 years ago

Some of these cite tags were immediately stripped out just after being defined anyway, in other places I double checked with firebug to make sure all styles are maintained

#5 @jakub.tyrcha
9 years ago

  • Keywords has-patch added

#6 @ocean90
8 years ago

  • Component changed from General to Administration
  • Milestone changed from Awaiting Review to 3.3

It's HTML5 time.

#7 @ryan
8 years ago

  • Milestone changed from 3.3 to Future Release

Punting enhancements from 3.3.

#8 @chriscct7
5 years ago

  • Severity changed from trivial to normal

#9 @chriscct7
4 years ago

  • Keywords needs-refresh added
  • Priority changed from low to normal
Note: See TracTickets for help on using tickets.