Opened 11 years ago

Closed 11 years ago

#11125 closed Bug (fixed)

AVT: When a menu is open and focus is on a menu item in that open menu, pressing Up or Down Arrow keys cycle focus through the items in that menu

Reported by: Satya Minnekanti Owned by: Frederico Caldeira Knabben
Priority: Normal Milestone: CKEditor 4.3.1
Component: General Version:
Keywords: IBM Cc: Damian, Teresa Monahan, Irina

Description

To reproduce the defect:

  1. Open any CK Sample, keep cursor in editor body.
  1. Press Alt + F10 to navigate in to toolbar.
  1. Navigate to Spell Check As You Type button menu.
  1. Press Enter to open the menu.
  1. Keep Pressing Down Arrow key until you reach Check Spelling Option
  1. Press Down arrow key one more time

Expected Result: Pressing Down Arrow key will cycle through the menu & focus moves to first option in the menu(which is Enable SCAYT)

Actual Result: Nothing happens & focus stays on last option in the menu. This is a violation of Accessibility Checkpoint 2.1a & 4.1b

Same issue happens when Navigating options in main Context Menu & sub-menus

Look at the following link for wai-aria authoring practices for button menu & keyboard interactions for menu http://www.w3.org/TR/wai-aria-practices/#menu

Change History (10)

comment:1 Changed 11 years ago by Jakub Ś

Status: newconfirmed

Yes you are right aria says that down/up arrow should cycle through menu. It has never worked that way from the very beginning but I'm setting start version as 4.0 since it is going to be in 4.x.

comment:2 Changed 11 years ago by Marek Lewandowski

Owner: set to Marek Lewandowski
Status: confirmedassigned

comment:3 Changed 11 years ago by Marek Lewandowski

Status: assignedreview

I've created two solutions:

t/11125 - does the job but has code duplication
t/11125b - reuses shared code, i would suggest pick that solution

I didn't create TC for that, as it would require calling very specific ui calls / many manual event simulations.

comment:4 Changed 11 years ago by Frederico Caldeira Knabben

Owner: changed from Marek Lewandowski to Frederico Caldeira Knabben

Sent a simpler solution to t/11125c.

comment:5 Changed 11 years ago by Olek Nowodziński

Status: reviewreview_failed

Failing case:

  1. Move focus to "Styles" combo.
  2. Down arrow (compo opens).
  3. Down arrow (first item is selected).
  4. Up arrow.

Expected result: Focus moved to the last item of the combo.

Actual result: Nothing happens, the first item remains focused.

Notes:

  • Skip 3. and the thing works as expected.
  • It works for other combos without any limitations so the failing case is styles-specific.

Implementation concerns:

arguments.callee is evil and no longer supported in ES5. We should really avoid it. Alternatively:

  • Named function expression:
    onKeyDown: function onKeyDown( keystroke, noCycle ) {
        ...
        return onKeyDown.call( this, keystroke, 1 );
        ...
    }
    
  • Or even simpler, with this context since the code is a part of the prototype:
    return this.onKeyDown( keystroke, 1 );
    

comment:6 Changed 11 years ago by Olek Nowodziński

Owner: changed from Frederico Caldeira Knabben to Olek Nowodziński
Status: review_failedassigned

comment:7 Changed 11 years ago by Olek Nowodziński

Status: assignedreview

Pushed two commits to the branch:

  • Got rid of arguments.callee.
  • Fixed failing case.

comment:8 Changed 11 years ago by Frederico Caldeira Knabben

Owner: changed from Olek Nowodziński to Frederico Caldeira Knabben

Pushed still another small correction to it.

comment:9 Changed 11 years ago by Olek Nowodziński

Status: reviewreview_passed

comment:10 Changed 11 years ago by Frederico Caldeira Knabben

Milestone: CKEditor 4.3.1
Resolution: fixed
Status: review_passedclosed

Fixed with git:6378c87.

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy