Make WordPress Core

Opened 13 years ago

Closed 13 years ago

#15938 closed defect (bug) (maybelater)

HTML5 Obsolete Attribute

Reported by: tomchen1989's profile tomchen1989 Owned by: tomchen1989's profile tomchen1989
Milestone: Priority: normal
Severity: minor Version: 3.0.3
Component: Validation Keywords: 2nd-opinion
Focuses: Cc:

Description

general-template.php line 1135:

	$calendar_output = '<table id="wp-calendar" summary="' . esc_attr__('Calendar') . '">

When I checked the page with W3C Markup Validation Service, I got a warning saying that the "summary" attribute is obsolete in HTML5.

So I suggest you removing this "summary" attribute, it is not necessary at all and a obsolete attribute.

Thank you!

Change History (2)

#1 @GamajoTech
13 years ago

  • Keywords 2nd-opinion added; HTML5 Validation Obsolete Attribute removed

To be pedantic, most parts of HTML5 are not at Recommendation stage, and the summary attribute is valid for HTML4. At this moment in time, the current working draft of the Tabular Data module DOES include the summary attribute as there's no ideal replacement for it, meaning the validator is not correct.

In this case however, the value of "Calendar", while nicely surmising the table, does little to aid visually impaired users, especially when there's arguably a more descriptive caption element (month name + 4 digit year) right after that would be read out.

The relevant bit from http://www.w3.org/TR/html5/tabular-data.html:

The summary attribute on table elements was suggested in earlier versions of the language as a technique for providing explanatory text for complex tables for users of screen readers. One of the techniques described above should be used instead.

In particular, authors are encouraged to consider whether their explanatory text for tables is likely to be useful to the visually impaired: if their text would not be useful, then it is best to not include a summary attribute.

#2 @westi
13 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to maybelater
  • Status changed from new to closed

Too early to change this.

Review again later.

Note: See TracTickets for help on using tickets.