Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#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 Changed 7 years ago by Scott González

Resolution: notabug
Status: newclosed

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.

comment:2 in reply to:  1 Changed 7 years ago by Ian Y.

Replying to scott.gonzalez:

I'm not sure why that's an unexpected problem.


Because tab panels should not rely on the anchors for functioning. The two examples provided by W3C don't rely on any anchor.

Last edited 7 years ago by Ian Y. (previous) (diff)

comment:3 Changed 7 years ago by Scott González

ARIA is in no way a user's guide to jQuery UI.

comment:4 Changed 7 years ago by Ian Y.

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.

Note: See TracTickets for help on using tickets.