Code

Opened 2 years ago

Closed 23 months ago

Last modified 23 months ago

#17138 closed Cleanup/optimization (fixed)

Admin sets the "summary" attribute on table, which is obsolete

Reported by: aaugustin Owned by: teraom
Component: contrib.admin Version: master
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

The admin templates were recently converted to HTML5. Since then, the W3C validator raises the following error on the admin index:

The summary attribute is obsolete. Consider describing the structure of the table in a caption element or in a figure element containing the table; or, simplify the structure of the table so that no description is needed.

Attachments (1)

html5-remove-summary-17138.diff (861 bytes) - added by teraom 2 years ago.

Download all attachments as: .zip

Change History (12)

comment:1 Changed 2 years ago by julien

  • Triage Stage changed from Unreviewed to Accepted

comment:2 Changed 2 years ago by teraom

  • Owner changed from nobody to teraom
  • Status changed from new to assigned

Changed 2 years ago by teraom

comment:3 Changed 2 years ago by teraom

  • Has patch set

comment:4 Changed 2 years ago by jezdez

  • Triage Stage changed from Accepted to Ready for checkin

comment:5 Changed 2 years ago by claudep

I'm not sure this is ready. Summary attribute was not displayed by default in browsers, while caption tag is. I'm not sure we suddenly want to display the summary content.

comment:6 Changed 2 years ago by julien

I agree with claudep. That would look weird.

comment:7 Changed 2 years ago by ramiro

  • Triage Stage changed from Ready for checkin to Accepted

Yes, the problem reported might be real but the proposed solution isn't semantically right for our use case. Moving back to accepted.

Last edited 2 years ago by ramiro (previous) (diff)

comment:8 Changed 23 months ago by Samuel Sutch <sam@…>

Created a pull request for this: https://github.com/django/django/pull/104

It moves the contents of the summary attribute into the title attribute of the a tag. This may be more useful than before because the summary tag was usually completely thrown away by most browsers. In this case, in most browsers, hovering over the text in the table caption will show the desired "summary"

comment:9 Changed 23 months ago by Julien Phalip <jphalip@…>

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

In [f29234167ad0193f35360023c65212c39cf87d1b]:

Merge pull request #104 from samuraisam/17138-html5-remove-summary

Fixed #17138 -- Removed the 'summary' attribute from the admin index tables to be html5-valid.

comment:10 Changed 23 months ago by Julien Phalip <jphalip@…>

In [f699641161a4ec8b6cbee938fd3a4379e7889ff2]:

Fixed #17138 -- Made the sensitive_variables decorator work with object methods.

comment:11 Changed 23 months ago by julien

Sorry, I've referenced the wrong ticket in the commit message above. It should have been #18379.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.