Make WordPress Core

Opened 16 years ago

Closed 15 years ago

Last modified 15 years ago

#9976 closed enhancement (wontfix)

The lang attribute missing

Reported by: redgecko's profile redgecko Owned by:
Milestone: Priority: lowest
Severity: trivial Version: 2.7.1
Component: Validation Keywords: has-patch 2nd-opinion
Focuses: Cc:

Description

In the current version, WordPress outputs either 'lang' or 'xml:lang' attribute in the html tag.
But W3C Recommendation require both attributes when specifying the language of an element.

Attachments (1)

general-template.php.patch (538 bytes) - added by redgecko 16 years ago.

Download all attachments as: .zip

Change History (11)

#1 follow-up: @ryan
16 years ago

see #5393, #8745

If the html_type option is set to anything other than text/html, both attributes will be output.

#2 in reply to: ↑ 1 @redgecko
16 years ago

I know those tickets.
However I think there were insufficient.
Although WordPress declares 'XHTML 1.0 Transitional' at the DOCTYPE declaration, it doesn't follow W3C Recommendation.

My attached patch changes the default output from 'html' into 'xhtml' in 'language_attributes()' function.
With this slight patch, you can enhance the compatibility with the recommendation.

#3 @Denis-de-Bernardy
16 years ago

  • Milestone changed from Unassigned to Future Release

#4 @Denis-de-Bernardy
15 years ago

  • Keywords 2nd-opinion added

#5 @Denis-de-Bernardy
15 years ago

  • Milestone changed from Future Release to 2.9
  • Priority changed from normal to lowest
  • Severity changed from major to trivial

#6 @Denis-de-Bernardy
15 years ago

  • Component changed from Template to Validation
  • Type changed from defect (bug) to enhancement

#7 @hakre
15 years ago

hmm xhtml does not really work for websites, we should stick with html per default. it just feels better without the x.

#8 @ryan
15 years ago

  • Milestone changed from 2.9 to Future Release

#9 @Denis-de-Bernardy
15 years ago

  • Milestone Future Release deleted
  • Resolution set to wontfix
  • Status changed from new to closed

trivial patch, uncommitted for 6 months

#10 @nacin
15 years ago

Doesn't WordPress aim for XHTML? http://codex.wordpress.org/HTML_to_XHTML

Note: See TracTickets for help on using tickets.