Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#16960 closed defect (fixed)

a11yclick excludes inputs/buttons but not textareas

Reported by: Kenneth G. Franqueiro Owned by: bill
Priority: blocker Milestone: 1.9
Component: Dijit Version: 1.9.0b1
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by Kenneth G. Franqueiro)

The clickKey function in dijit/a11yclick will return falsy if the node in question is an input or button element, due to a regex check being performed. However, this regex likely should also check for textarea elements, but is not. This leads to space/enter keypresses being eaten if dojoClick is truthy on the textarea or a parent element.


The fix is extremely simple, but I'll attach the patch first and then if Bill wants, I can just commit it.

Attachments (1)

a11yclick.diff (812 bytes) - added by Kenneth G. Franqueiro 6 years ago.

Download all attachments as: .zip

Change History (5)

Changed 6 years ago by Kenneth G. Franqueiro

Attachment: a11yclick.diff added

comment:1 Changed 6 years ago by Kenneth G. Franqueiro

Description: modified (diff)
Milestone: tbd1.9
Priority: undecidedblocker

comment:2 Changed 6 years ago by bill

I guess that's OK, go ahead and check it in.

For the record, the clickKey() function was designed to prevent emitting a synthetic click for <button> and <input type=button> nodes, because those nodes emit a click event naturally on ENTER or SPACE key. <input type=text> and especially <textarea> are a different ball of wax in that the SPACE and ENTER keys are for input rather than clicking... so anyway the comment for that function should be updated to list the second case in addition to the first one.

comment:3 Changed 6 years ago by Kenneth G. Franqueiro

Resolution: fixed
Status: newclosed

In [31099]:

a11yclick should not prevent enter/space keypresses for textareas; fixes #16960 !strict

comment:4 Changed 6 years ago by Kenneth G. Franqueiro

I had the same thoughts RE the comments in the clickKey method. I've updated those as well.

Note: See TracTickets for help on using tickets.