Opened 3 years ago

Closed 3 years ago

#21234 closed defect (fixed)

Fix W3C validator issues

Reported by: cypherpunks Owned by: irl
Priority: Medium Milestone:
Component: Metrics/Relay Search Version:
Severity: Normal Keywords:
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

Validating Atlas with the W3C Markup Validation Service shows some issues.

Patch is coming once i have a ticket number.

Child Tickets

Attachments (2)

0001-Fix-W3C-markup-validation-service-issues.patch (1.6 KB) - added by cypherpunks 3 years ago.
0001-Remove-the-action-attribute-from-the-search-form.patch (946 bytes) - added by cypherpunks 3 years ago.

Download all attachments as: .zip

Change History (9)

Changed 3 years ago by cypherpunks

comment:1 Changed 3 years ago by cypherpunks

Status: newneeds_review

comment:2 Changed 3 years ago by irl

Resolution: fixed
Status: needs_reviewclosed

Merged, thanks! (:

comment:3 Changed 3 years ago by cypherpunks

Resolution: fixed
Status: closedreopened

The changes in my initial patch weren't good enough for the validator. I've attached an additional patch which fixes the remaining issue.

comment:4 Changed 3 years ago by cypherpunks

Status: reopenedneeds_review

comment:5 Changed 3 years ago by irl

Status: needs_reviewneeds_revision

Thanks for the patch cypherpunks, but I don't think this can be merged.

We do kinda need an action there. The reason it's empty is because it's for the same page. Apparently browsers can cope with this, and semantically action="" is the same as just action, which is how this worked before. I think removing it would not be the best course to take as this would change (potentially, but I'm not a browser expert) the semantic meaning.

If it needs to be non-empty, perhaps action="#" is the answer we're looking for. I'll test that out when I get some time, if you have time beforehand to check then it would be appreciated.

(You may also be interested in #21274)

comment:6 Changed 3 years ago by cypherpunks

Like i mention in the commit message of 0001-Remove-the-action-attribute-from-the-search-form.patch, search form submits are caught by an JavaScript event so the action attribute is unused. Without JavaScript the page is simply refreshed and nothing is submitted which is equal to the current behavior.

comment:7 Changed 3 years ago by irl

Resolution: fixed
Status: needs_revisionclosed

Looking at the HTML 5 specification (https://www.w3.org/TR/html5/forms.html#attr-fs-action) which we claim to be following in the doctype, you are indeed correct that the action attribute can be removed from the form element.

Tested that this is functional and that it now passes W3C validation.

Merged, thanks for your work on this. (:

Note: See TracTickets for help on using tickets.