Make WordPress Core

Opened 12 years ago

Closed 12 years ago

#21347 closed defect (bug) (fixed)

There is no way to tab out of the plugins and themes editors textareas

Reported by: azaozz's profile azaozz Owned by: azaozz's profile azaozz
Milestone: 3.5 Priority: normal
Severity: normal Version:
Component: Accessibility Keywords:
Focuses: Cc:

Description

Currently we are inserting tab characters on pressing the Tab key in both file editors, even if Shift is pressed too. That breaks tabbing on these screens and leaves users stuck in the textarea.

Attachments (2)

21347.patch (4.1 KB) - added by azaozz 12 years ago.
screenshot.png (34.5 KB) - added by azaozz 12 years ago.

Download all attachments as: .zip

Change History (15)

@azaozz
12 years ago

#1 @azaozz
12 years ago

21347.patch adds checking of modifier keys when inserting a tab char in the file editors textareas, so Shift + Tab will work as expected. It also adds a key combination to be able to tab past the textarea: first press Esc, then press Tab. This behavior is described by aria-describedby elements for the textareas.

Last edited 12 years ago by azaozz (previous) (diff)

#2 follow-up: @grahamarmfield
12 years ago

If the action required to tab beyond the textarea is not a tab button then clear and visible text instructions should be included above the relevant fields.

#3 in reply to: ↑ 2 @azaozz
12 years ago

Replying to grahamarmfield:

It is still a tab keystroke, but to make it go beyond the textarea instead of typing a tab char, you need to press Esc first. That is described in the extended description of the textarea (added with aria-describedby attribute). Will commit the patch so it would be easier to test.

#4 @azaozz
12 years ago

  • Owner set to azaozz
  • Resolution set to fixed
  • Status changed from new to closed

In [21310]:

Make it possible to tab out of the plugin and theme editors textareas by pressing Esc followed by Tab, fixes #21347

#5 follow-up: @azaozz
12 years ago

Closed as fixed for now. If this behavior is not acceptable, feel free to reopen with other options.

#6 in reply to: ↑ 5 @grahamarmfield
12 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

Replying to azaozz:

Closed as fixed for now. If this behavior is not acceptable, feel free to reopen with other options.

Standard behaviour for a textarea when tab key is pressed is to move to the next item that can receive focus. I'm a little nervous about that behaviour being overridden. How about swapping the solution round to:

  • Tab key pressed - moves out of textarea
  • Esc + Tab - inserts a tab character

Also, using aria-describedby attribute is good for screen reader users, but where non-standard behaviour is present it's important that clear and visible instructions are provided for those who may be using a keyboard but not alongside a screen reader - eg some motor-impaired sighted people.

#7 follow-up: @dd32
12 years ago

Standard behaviour for a textarea when tab key is pressed is to move to the next item that can receive focus.

Standard behaviour for a "Code Editor" (Which the text area is in this case) is to insert a tab character for indention purposes, Shift+Tab would be to un-indent, so to remove the tab before the current position.

The Plugin/Theme editors being Code Editors rather than standard form elements makes me comfortable that the Esc key being added as an escape.. but that's just a Developers opinion, those that would be using the textarea, for the tab key to do anything other than inserting a tab makes muscle memory useless

#8 in reply to: ↑ 7 @grahamarmfield
12 years ago

Replying to dd32:

Fair comment dd32.

It would still be useful to have some visual indication that Esc+Tab is required to move out of the code editor.

#9 @dd32
12 years ago

It would still be useful to have some visual indication that Esc+Tab is required to move out of the code editor.

I don't disagree there, It's not going to be obvious when pressing Esc that anything has changed

@azaozz
12 years ago

#10 @azaozz
12 years ago

Sounds good. What would be the better place for this: in the Help tab or directly above the textarea?


#11 @nacin
12 years ago

I would rather put this in help, at most. This kind of instruction has very little benefit taking up space on the page.

#12 @azaozz
12 years ago

Yes, think the best place for this is in the Help tab too. Wanted to confirm before moving it.

#13 @azaozz
12 years ago

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

In [21358]:

Move the description for tabbing out of the plugin and theme editors textareas to the Help tab, fixes #21347

Note: See TracTickets for help on using tickets.