Validate backend screens
you will get several
type="button" is invalid for links
<a class="btn"
there are cases of :
<a class="btn" type="button"
J3.7.4
Is there a reason that it is like the above ??
Labels |
Added:
?
|
Category | ⇒ | Code style |
Also you say they were changed. If you can see when there should be an explanation with the pull request that made the change
i should have said they were copy-pasted
and the
<input type="button"
was made:
<a class="btn" type="button"
or
<a type="button" class="btn"
or
similar
but the type="button" was forgotten and it was not removed ,
thus we get invalid HTML markup
and i asked the question if there is a reason it was removed in some cases and it was not removed in other cases
Title |
|
<button type="button"
is unneeded a button has already a type button
So <a class="btn" type="button"
probably should be <a class="btn" role="button"
Status | New | ⇒ | Discussion |
<button type="button" is unneeded a button has already a type button
You would think so but the specification says otherwise
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button
https://www.w3.org/TR/2011/WD-html5-20110525/the-button-element.html#attr-button-type
Status | Discussion | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-08-16 14:03:14 |
Closed_By | ⇒ | ggppdk |
i think you meant to look here: at the A tag instead of the BUTTON tag
since the discussion about INPUT and BUTTON tags was done only to understand why the invalid tag parameter (type="button") was added at the A tag
correct link is this
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a
so @dgt41 is right about
So <a class="btn" type="button" probably should be <a class="btn" role="button"
in short the conclusion is that the type="button" should either be removed for links or be replaced with role="button"
Status | Closed | ⇒ | New |
Closed_Date | 2017-08-16 14:03:14 | ⇒ | |
Closed_By | ggppdk | ⇒ |
no i meant exactly what I said.
@brianteeman from w3c:
type="button"
does nothing, so it's useless. The only time that you need it is either for submit or reset.
Now for <a>
tag for accessibility we need to specify that this element should be interpreted as button not as link, thus the role="button"
@brianteeman, ok, you meant what you said, i see it now. But can we stick to the original issue, i tried to make all valid html pages on backend , and i am hitting on invalid link tags, do you agree that this should be fixed ? Lets forget of the button tag ?
since you edited the original issue i no longer know what it is
since you edited the original issue i no longer know what it is
i did not edit description part speaking of the issue reported here
it remain exactly the same,
A tags (aka link tags) that have an invalid parameter
also original title spoke of invalid a tags that originated from input-type-button tags:
Invalid HTML for input-type-button that were converted to a-class-btn ??? to
So i will make a PR to change invalid A Tags
ok closed awaiting the pr
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-08-16 21:06:38 |
Closed_By | ⇒ | brianteeman |
Shouldnt the expected markup be
<button type="button"
??
Also you say they were changed. If you can see when there should be an explanation with the pull request that made the change