Ticket #20274 (new Bug)

Opened 13 months ago

Archetypes File widget generates invalid (X)HTML

Reported by: esrever_otua Owned by: davisagli
Priority: minor Milestone: 4.x
Component: Archetypes Version: 4.2
Keywords: Archetypes Cc:

Description

Archetypes File widget creates a label element with an attribute "for=" which does not map to the id of any input element on the page. This is because all of the input elements for the File widget get various suffixes appended to them such as "_file" "_upload" etc.

I propose this should be fixed by making the FileWidget.render_own_label() == True and by having a generic label applied to the whole widget which does not reference any specific input element id; (as per the calendar.pt widget), and to have a secondary label for="${id}_file" for the specific file input element that is otherwise label-less.

Attachments

at_widget_file.pt Download (7.4 KB) - added by esrever_otua 13 months ago.
Example of customised override widget template.

Change History

Changed 13 months ago by esrever_otua

Example of customised override widget template.

Note: See TracTickets for help on using tickets.