Skip to content

Layered navigation breaks HTML5 Validation #22363

Open
@ioweb-gr

Description

@ioweb-gr

Preconditions (*)

  1. Magento 2.3.1 using Luma Theme
  2. Install sample data

Steps to reproduce (*)

  1. Install magento 2.3.1
  2. Install sample data
  3. Navigate to category women/tops-women/hoodies-and-sweatshirts-women.html
  4. Pass this page through the validator at http://validator.w3.org/
  5. Multiple html5 errors for attributes that are not defined in the specification.

Expected result (*)

Validation passes with warnings only and no errors.

Actual result (*)

Multiple html5 errors due to layered navigaton

  1. Error: Attribute option-type not allowed on element div at this point.
  2. Error: Attribute option-id not allowed on element div at this point.
  3. Error: Attribute option-label not allowed on element div at this point.
    etc etc

According to the specification custom attributes should be prefixed via data-
For example it would be proper to say data-option-type="..." but option-type="..." is invalid.

https://www.w3schools.com/tags/att_global_data.asp

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: CatalogComponent: CatalogIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P4No current plan to fix. Fixing can be deferred as a logical part of more important work.Progress: ready for devReported on 2.3.1Indicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branch

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions