Skip to content
This repository has been archived by the owner on May 22, 2021. It is now read-only.

A few HTMLLint errors #261

Closed
pdehaan opened this issue Jul 20, 2017 · 3 comments
Closed

A few HTMLLint errors #261

pdehaan opened this issue Jul 20, 2017 · 3 comments

Comments

@pdehaan
Copy link
Contributor

pdehaan commented Jul 20, 2017

Via text input on https://html5.validator.nu/ (and view-source on https://send.dev.mozaws.net/):

  1. Error: Bad value localization for attribute rel on element link: The string localization is not a registered keyword.

    1. From line 13, column 3; to line 13, column 61
      en-US"><link rel="localization" href="/locales/send.{locale}.ftl"><sc
  2. Error: Bad value /locales/send.{locale}.ftl for attribute href on element link: Illegal character in path segment: { is not allowed.

    1. From line 13, column 3; to line 13, column 61
      en-US"><link rel="localization" href="/locales/send.{locale}.ftl"><sc
  3. Error: An img element must have an alt attribute, except under certain conditions. For details, consult guidance on providing text alternatives for images.

    1. From line 18, column 5; to line 18, column 41
      ogo"><img src="/resources/send_logo.svg"/><
    2. From line 19, column 5; to line 19, column 46
      vg"/><img src="/resources/send_logo_type.svg"/></d
    3. From line 29, column 26; to line 29, column 87
      load-img"><img data-l10n-id="uploadSvgAlt" src="/resources/upload.svg"/></div>
    4. From line 91, column 3; to line 91, column 98
      ></div><img id="upload-error-img" data-l10n-id="errorAltText" src="/resources/illustration_error.svg"/><a 
    5. From line 110, column 42; to line 110, column 102
      illa.org"><img class="mozilla-logo" src="/resources/mozilla-logo.svg"/></a>
    6. From line 118, column 65; to line 118, column 118
      ="_blank"><img class="github" src="/resources/github-icon.svg"/></a>
    7. From line 119, column 65; to line 119, column 120
      ="_blank"><img class="twitter" src="/resources/twitter-icon.svg"/></a>
  4. Error: The width attribute on the th element is obsolete. Use CSS instead.

    1. From line 43, column 46; to line 44, column 57
      false" --><th width="35%" data-l10n-id="sentFilesTitle1"></th>
    2. From line 44, column 63; to line 45, column 57
      le1"></th><th width="25%" data-l10n-id="sentFilesTitle2"></th>
    3. From line 45, column 63; to line 46, column 57
      le2"></th><th width="21%" data-l10n-id="sentFilesTitle3"></th>
    4. From line 46, column 63; to line 47, column 57
      le3"></th><th width="12%" data-l10n-id="sentFilesTitle4"></th>
  5. Error: Bad value true for attribute hidden on element div.

    1. From line 57, column 1; to line 57, column 40
      </div>↩↩<div id="upload-progress" hidden="true"><di
    2. From line 75, column 1; to line 75, column 35
      ↩↩</div>↩↩<div id="share-link" hidden="true"><di
    3. From line 88, column 1; to line 88, column 37
      ></div>↩↩<div id="upload-error" hidden="true"><di
    4. From line 95, column 1; to line 95, column 44
      ></div>↩↩<div id="unsupported-browser" hidden="true"><di
@ghost ghost added this to the Elegant Eagle (July 28) milestone Jul 20, 2017
@pdehaan
Copy link
Contributor Author

pdehaan commented Jul 20, 2017

TL;DR:
I think results (1) "Error: Bad value localization for attribute rel on element <link>: The string localization is not a registered keyword." and (2) "Error: Bad value /locales/send.{locale}.ftl for attribute href on element <link>: Illegal character in path segment: { is not allowed." are bogus.

I don't think (3) "Error: An <img> element must have an alt attribute, except under certain conditions." is entirely valid either, since I think we're injecting localized alt="" attributes through jQuery.

That only leaves (4) "Error: The width attribute on the <th> element is obsolete. Use CSS instead." and (5) "Error: Bad value true for attribute hidden on element <div>.", which I think are semi-valid.

@uname-yang
Copy link

uname-yang commented Aug 4, 2017

About /locales/{locale}/send.ftl part , i think this is not a bug.
This is how l20n.js use.
Please read the doc: A next-gen localization framework from Mozilla.

@pdehaan
Copy link
Contributor Author

pdehaan commented Aug 4, 2017

Closing this in favor of #139 meta-bug.
Out of that list above, I believe only (4) and (5) were errors, and they're already being tracked separately as:

@pdehaan pdehaan closed this as completed Aug 4, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants