Opened 8 years ago

Closed 8 years ago

#8124 closed bug (worksforme)

Handler doesn't respond to arrow keys anymore when removing "href" attribute

Reported by: simonferndriger Owned by:
Priority: minor Milestone: 1.9.0
Component: ui.slider Version: 1.8.17
Keywords: Cc:
Blocked by: Blocking:

Description

When removing the "href" attribute with .removeAttr("href") from the generated <a href="#"></a> within the slider tag for the handler, the handler does NOT respond anymore the the keyboard arrow keys.

--- Context: --- Why does the "href" attribute need to be removed anyway? Because (especially in fullscreen mode), the browser does show the (irrelevant) link in the browser status bar at the bottom. This statusbar does overlap some important navigation items in fullscreen mode (i.e. when watching a fullscreen movie). So, the only way to remove the status info, is to use a different tag or to remove the "href" attribute of a link tag.

Change History (1)

comment:1 Changed 8 years ago by rdworth

Resolution: worksforme
Status: newclosed

When you remove the href attribute it makes the element no longer focusable. You can fix that by setting the tabindex to 0. Demo: http://jsbin.com/oqerip

Or, the slider does support using a different element type than A for the handle. Simply add the element yourself (such as a span) and give it the ui-slider-handle class before initializing the slider. Demo: http://jsbin.com/oritoz

Note: See TracTickets for help on using tickets.