#9285 closed bug (notabug)
Removing href attributs of a elements in tablist causes unexpected problem
Reported by: | Ian Y. | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | none |
Component: | ui.tabs | Version: | 1.10.3 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Using the following codes to remove href
attributs of a
elements in tablist causes unexpected problem to tab behavior.
$("#tabs").tabs().find('ul[role="tablist"] a').removeAttr('href');
Please see the example: http://jsfiddle.net/bR82G/1/
Change History (4)
comment:1 follow-up: 2 Changed 10 years ago by
Resolution: | → notabug |
---|---|
Status: | new → closed |
comment:2 Changed 10 years ago by
Replying to scott.gonzalez:
I'm not sure why that's an unexpected problem.
Because tab panels should not rely on the anchors to function. The two examples provided by W3C don't rely on any anchor.
comment:4 Changed 10 years ago by
Okay. But mouseover anchors which has href
attributes makes browsers' status bar show url addresses. That can confuse users because users might think clicking on these anchors will make the page jump to a certain point. Removing href
can reduce confusions.
Besides, unwanted url address showing up often is unpleasant. Many developers remove href
attributes (or don't add them in HTML) of button anchors because of that reason.
I'm not sure why that's an unexpected problem. The anchors no longer point to anything. Either call the
refresh()
method, or just don't do that. Hint: Don't do that.