Results 1 to 8 of 8

Thread: Menu does not pull focus when displayed

    You found a bug! We've classified it as EXTJS-21382 . We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1
    Sencha Premium User
    Join Date
    Feb 2012
    Posts
    18

    Default Menu does not pull focus when displayed

    Ext version tested:
    • Ext 6.0.2 rev 437
    Browser versions tested against:
    • Latest Chrome
    Description:
    • Ext.menu.Menu does not pull focus when displayed.
    • Here is a fiddle created that specifically has to set the focusOnToFront for this to work correctly (when using the fiddle it might be easier to use the L key to invoke the menu, since you have to be a bit more careful to not hover the mouse over the menu when it opens - hence the x offset of 10 px):
      https://fiddle.sencha.com/#fiddle/1b4l
    Steps to reproduce the problem:
    • Display a Menu
    The result that was expected:
    The result that occurs instead:
    • Menu does not gain focus.

  2. #2
    Sencha Premium User evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    19,254

    Default

    It looks as though this is just a documentation issue. The menu class explicitly configures:

    Code:
    focusOnToFront: false
    However because it's not tagged the doc parser doesn't pick up the value and just uses whatever exists as the default in the mixin.
    Twitter - @evantrimboli
    Former Sencha framework engineer, available for consulting.
    As of 2017-09-22 I am not employed by Sencha, all subsequent posts are my own and do not represent Sencha in any way.

  3. #3
    Sencha Premium User
    Join Date
    Feb 2012
    Posts
    18

    Default

    Are you sure this is the intended implementation? I'm just wondering since this contradicts the WAI-ARIA best practices for a popup(context) menu with regards to keyboard navigation (see the docs where it talks about Shift F10 for opening the popup menu).

    Thanks

  4. #4
    Sencha Premium User evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    19,254

    Default

    I'm not the resident accessibility expert, but from reading that it's talking about showing a context menu from some already focused element (implying a connection between the two). As such, I'd say that it would be up to user code to toggle that flag as appropriate.

    For example, if you use Ext.button.Button with a menu and you click the button to show the menu, it doesn't focus by default. If you use the keyboard to focus the button and hit the down arrow, it does focus the menu. This functionality is handled by the button, because it's dependent on how the menu was shown.
    Twitter - @evantrimboli
    Former Sencha framework engineer, available for consulting.
    As of 2017-09-22 I am not employed by Sencha, all subsequent posts are my own and do not represent Sencha in any way.

  5. #5
    Sencha Premium User
    Join Date
    Feb 2012
    Posts
    18

    Default

    The button example you mention is actually a menu button, which has its own ARIA documentation and works exactly as you described. The popup menu according to the docs has "no visible trigger widget" and as such it is more akin to a right-click (context) menu. In any case you are correct in saying that the dev could determine what they would want to accomplish and set that flag appropriately. I just wanted to ensure that accessibility was being taken into consideration when making this kind of call.

  6. #6
    Sencha Premium User evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    19,254

    Default

    Right, that's what I was getting at. In this case if you were showing a menu, it's coming from user code to begin with, so I think it makes sense for the user to manage the focus behaviour.

    Anyway, as I said I'm not really too well versed in this, I'll ask the guy who is to have a look.
    Twitter - @evantrimboli
    Former Sencha framework engineer, available for consulting.
    As of 2017-09-22 I am not employed by Sencha, all subsequent posts are my own and do not represent Sencha in any way.

  7. #7
    Sencha - Ext JS Dev Team nohuhu's Avatar
    Join Date
    Jun 2011
    Location
    Redwood coast
    Posts
    402

    Default

    @smoolman,

    We try to accommodate for WAI-ARIA requirements as much as we can but this is one of the cases where we don't provide a clear cut solution out of the box, relying instead on the developer to do the right thing. That's because context menus are hard to implement in a generalistic way, they are usually very app specific.

    Looking at the WAI-ARIA spec for context menus again I realized that in fact we do miss some of the required behaviors. This might warrant a specific Menu descendant come to think of it; I'll file a feature request. Thanks for pointing this out!
    Regards,
    Alex.

  8. #8
    Sencha Premium User
    Join Date
    Feb 2012
    Posts
    18

    Default

    No problem, glad I could help. Thanks for taking a look at this and getting back to me.

Similar Threads

  1. Accordion menu with pull effect
    By koolll in forum Sencha Touch 2.x: Q&A
    Replies: 2
    Last Post: 24 Nov 2012, 12:43 PM
  2. [CLOSED] Options pull out menu bug in portal example
    By nabberuk in forum Ext:Bugs
    Replies: 1
    Last Post: 17 Feb 2012, 7:17 AM
  3. Help: pull down menu on grid cell
    By Joe Kuan in forum Ext 3.x: Help & Discussion
    Replies: 3
    Last Post: 6 Oct 2010, 2:26 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •