mdo / github-buttons

Showcase the success of any GitHub repo or user with these simple, static buttons with dynamic counts.

Home Page:https://ghbtns.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error: The frameborder attribute on the iframe element is obsolete. Use CSS instead.

kimwalisch opened this issue · comments

When I validate my website using the W3C validation service (https://validator.w3.org/) it prints the following errors:

Error: The frameborder attribute on the iframe element is obsolete. Use CSS instead.
From line 91, column 11; to line 91, column 193
<iframe src="https://ghbtns.com/github-btn.html?user=kimwalisch&repo=primesieve&type=watch&count=true&size=large" frameborder="0" scrolling="0" style="width:170px; height: 30px;"></iframe>↩

Error: The scrolling attribute on the iframe element is obsolete. Use CSS instead.
From line 91, column 11; to line 91, column 193
<iframe src="https://ghbtns.com/github-btn.html?user=kimwalisch&repo=primesieve&type=watch&count=true&size=large" frameborder="0" scrolling="0" style="width:170px; height: 30px;"></iframe>↩

It seems like frameborder and scrolling have been obsoleted in HTML5.

This ins't in the source code. The docs need to be updated though.

But being we can't know if you do it via CSS, hence why the docs should stay the same for now, unless we do it via JS ourselves.

Since we can't know if one is using CSS for those, I think the best way would be to add a callout/section in the docs informing people that if they use CSS for frameborder and scrolling they can drop the related HTML attributes.

For our site this is fixed in the v4 branch.