Skip to main content

Bug Tracker

Side navigation

#7903 closed bug (invalid)

Opened January 05, 2011 02:15PM UTC

Closed January 22, 2011 08:08AM UTC

.attr() does not recognize "shape" in <area>

Reported by: Anonymous Owned by: Anonymous
Priority: undecided Milestone: 1.next
Component: event Version: 1.4.4
Keywords: Cc:
Blocked by: Blocking:
Description

In <area>-tags the shape-attribute is not recognised by .attr()

Deleting areas with no shapes doesn't work:

focusable = focusable.map(function(){return($(this).attr('shape') === undefined && $(this).is('area')) ? null : this;});

Deleting areas with no href works:

focusable = focusable.map(function(){return($(this).attr('href') === undefined && $(this).is('area')) ? null : this;});

Attachments (0)
Change History (7)

Changed January 05, 2011 02:52PM UTC by ajpiano comment:1

owner: → Anonymous
status: newpending

Thanks for your time and interest in helping with jQuery! In accordance with the bug reporting guidelines, please create a reduced test case on jsFiddle that demonstrates the issue.

Changed January 05, 2011 11:03PM UTC by Anonymous comment:2

status: pendingnew

BACKGROUND-INFORMATION

=
  • Consider a plugin that emulates TAB-keyboard-navigation by the user, i.e. a plugin that is able to set the focus to the next element in the tab-order (given a certain block-element, a focusable inline-element)
  • "focusable" is a set of jQuery objects which was retrived by a .find() operation
  • According to http://dev.w3.org/html5/spec/editing.html#focus, especially "7.3.2 Focus management", <area>-tags which have no shape-attribute are regarded as 'not focusable'.

THE POTENTIAL BUG

=

Deleting areas with a missing shape attribute from the list of focusable jQuery object doesn't work:

focusable = focusable.map(function(){return($(this).attr('shape') === undefined && $(this).is('area')) ? null : this;});

If you do (just for the sake of testing) the same with missing href-attributes, the code works perfectly (however I don't need hrefs, but shapes!!):

focusable = focusable.map(function(){return($(this).attr('href') === undefined && $(this).is('area')) ? null : this;});

Changed January 06, 2011 02:49PM UTC by addyosmani comment:3

#7907 is a duplicate of this ticket.

Changed January 06, 2011 05:55PM UTC by anonymous comment:4

Replying to [comment:3 addyosmani]:

#7907 is a duplicate of this ticket.

!!! ATTENTION !!!

#7907 says that .focus() does not work with <area> (but should according to w3c). This ticket says that I can work with areas ( .attr() works in some way), but .attr() recognises only 'href' and not 'shape'. So it's not a REAL dublicate. However both bugs (without having looked at the jQuery code) maybe interrelated (maybe in so far that <area> and its attributes are poorly supported).

Therefore: When fixing this, please consider both use-cases.

Changed January 07, 2011 04:32PM UTC by rwaldron comment:5

status: newpending

Despite the information you've added...

Please provide a reduced jsFiddle test case, using the latest stable jQuery release and the jQuery 0 GIT version to ensure the issue still exists.

Part of creating a reduced test case helps us determine how to proceed with addressing the bug.

Changed January 07, 2011 04:32PM UTC by rwaldron comment:6

component: unfiledevent

Changed January 22, 2011 08:08AM UTC by trac-o-bot comment:7

resolution: → invalid
status: pendingclosed

Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!