Uploaded image for project: 'Fluid Infusion'
  1. Fluid Infusion
  2. FLUID-1313

It's awkward to override the default activation keys. Provide a clear means for overriding default keys

    XMLWordPrintable

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 0.4, 1.3, 1.4, 1.5, 2.0
    • None
    • Keyboard Accessibility
    • None

    Description

      At the moment, the keyboard-a11y's activatable() feature assumes that you'll always want the default key bindings: Enter and Spacebar. If you want to override this with only your own custom key bindings, you have do something like this:

               newQueueRow.activatable(null, {additionalBindings: [
                {key: $.a11y.keys.DELETE, activateHandler: function(){
                        // do something
                    }
                }
              ]});
      

      We're specifying a null handler for the default keys, then binding our own custom key and handler.

      We should change the activatable() API so that keys can be overridden. The documentation currently suggests that this is possible, but the implementation doesn't allow for it. Here's what I'd suggest:

              row.activatable(deleteHandler, {
                  keys: [$.a11y.keys.DELETE]
              });
      

      This means that, if you want different handlers for different key strokes, you'll have to make multiple calls to activatable(), but I think this is reasonable.

      Attachments

        Issue Links

          Activity

            People

              antranig Antranig Basman
              colin Colin Clark
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: