Opened 8 years ago

Closed 8 years ago

#4126 closed bug (fixed)

focus on dialog open should be constrained to the contents of the dialog

Reported by: jonspalmer Owned by: scottgonzalez
Priority: critical Milestone: 1.7
Component: ui.dialog Version: 1.6rc6
Keywords: Cc:
Blocked by: Blocking:

Description

The open function of dialog attempts to find the first tabbable element and give it the focus via:

this.uiDialog.find(':tabbable:first').focus();

however if the dialog has a close icon then it will be first tabbable element and it receives the focus. Instead the find should be done on this.element not thus.uiDialog so that the focus is applied to the contents and not the header.

might be some overlap with #3768

Change History (3)

comment:1 Changed 8 years ago by jzaefferer

  • Milestone changed from TBD to 1.6
  • Priority changed from minor to critical

I consider this critical. The focused close button is annoying me all the time, as it doesn't have a seperate hover-style and looks broken.

comment:2 Changed 8 years ago by scottgonzalez

  • Owner set to scott.gonzalez
  • Status changed from new to accepted

This has already been fixed in r1658 for dialogs that contain tabbable elements in the content area or have buttons.

comment:3 Changed 8 years ago by scottgonzalez

  • Resolution set to fixed
  • Status changed from accepted to closed

Fixed in r2068.

NOTE: This breaks accessibility in Safari, which doesn't allow setting focus on elements that are not natively tabbable. However, our current stance is that people who require accessibility will not be using Safari specifically for this type of reason.

Note: See TracTickets for help on using tickets.