DataTables / DataTables/DataTablesSrc

responsive dt creates invalid html

Open
#372 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
801
Forks
440
PR merge metrics
No merged PRs in 30d

Description

https://live.datatables.net/tuhikeno/1/edit?html,js,output

to see the errors, run the demo above and move the output to a new window, narrow the window to force the responsive plugin to work then validate the html in the window with W3C Markup validation service.

Once done you will see many errors like

Error: A table row was 6 columns wide and exceeded the column count established using column markup (4).

Obviously, this is the responsive plugin doing what it is intended to do, which is to hide some columns. Is there something datatables can do to update the layout to end up with valid markup also?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked live.datatables.net demo and reproduce the problem by moving the output to a new window, narrowing it, and validating the resulting HTML with the W3C Markup Validation Service. Investigate the responsive plugin behavior that hides columns and determine how the generated table can avoid the reported column-count errors. Done means the responsive output validates without these errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.