This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 14059 - Reconsider backspace behavior at the start of a list item
Summary: Reconsider backspace behavior at the start of a list item
Status: NEW
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: HISTORICAL - HTML Editing APIs (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: Aryeh Gregor
QA Contact: HTML Editing APIs spec bugbot
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-07 13:54 UTC by Aryeh Gregor
Modified: 2012-12-04 03:11 UTC (History)
5 users (show)

See Also:


Attachments

Description Aryeh Gregor 2011-09-07 13:54:12 UTC
If you backspace at the beginning of a list item that's not the first in the list, the spec says to merge the current item with the previous one, preserving a line break in between but getting rid of the list marker.  In other words:

   <ol><li>foo<li>[]bar</ol>
-> <ol><li>foo<br>[]bar</ol>

Then if you backspace again, it will get rid of the preceding break as usual:

-> <ol><li>foo[]bar</ol>

IIRC, browsers all just merge the blocks straight away, which is not desired:

   <ol><li>foo<li>[]bar</ol>
-> <ol><li>foo[]bar</ol>

According to my comments in the spec, the current spec matches OpenOffice.org 3.2.1 Ubuntu.  Word 2007 behaves the same for the first backspace, but the second backspace outdents the current paragraph:

   <ol><li>foo<br>[]bar</ol>
-> <ol><li>foo</ol>[]bar

Google Docs right now seems to make the first backspace outdent the item:

   <ol><li>foo<li>[]bar</ol>
-> <ol><li>foo</ol>[]bar

I'm not totally sure what the best behavior is.  I think browsers' behavior (if I remember it correctly) is just wrong.  The OO/spec behavior seems reasonable, but it gives no obvious way to outdent a list item by just using Backspace and Enter and such.  (You'd have to make an empty item before the item you want to outdent, then hit Enter while in that item to outdent it, then backspace twice in the item you want to outdent so that it merges with it, or something similarly counterintuitive.)

Google Docs' behavior is reasonable, but it takes away one way of making a multiparagraph list item.  Users would have to use Ctrl-Enter or such, which is not discoverable.

Word 2007's behavior is the most flexible, since it allows you to accomplish any of the three effects: one backspace gives a multiparagraph item, two outdents, three merges.  But it's also the most cumbersome to merge, requiring three consecutive keystrokes.

So I'm not sure where to go here.  I wonder if the Docs people have usability research whose conclusions they could share?
Comment 1 Jeff Harris 2011-09-10 22:11:50 UTC
Just to chime in as someone who designed the behavior in Google Docs.

We didn't like the MS Word behavior because the first backspace makes it look like you've added your item to the previous list bullet paragraph (with a hard linebreak), but really it's a new paragraph at the same indentation level and not part of the list at all. If you indent/center the previous bullet, the line below it (which now no longer has a bullet) is not affected. We felt that this was unintuitive.

The two main cases that we cared about were:
1) Make it easy to merge the current list item with the previous one (two backspaces for non-indented lists). Browsers today make this quite easy (usually just a single backspace).
2) Make it easy to remove an item from the list. This is especially import for breaking out the last paragraph from a list. Often you'll press enter at the end of a list and you'll want an easy way to unlist the new paragraph that you just created and start inputting regular text. Browsers don't make this at all easy right now.

Sadly we don't have any real usability research on this. We just thought about our own usage of content editable, Word and did some hallway usability studies of different behaviors and settled on our current one. I don't doubt that there's room to improve.
Comment 2 Ryosuke Niwa 2011-09-10 23:12:52 UTC
TextEdit on Mac appears to match Google docs (except they don't correct list markers properly). 

1. hello
2. world
3. w3c

deleting before "world" results in

1. helloworld
3. w3c
Comment 3 Ryosuke Niwa 2011-09-10 23:14:10 UTC
Oops, correction.

The first deletion results in
1. hello
world
3. w3c

and the second deletion results in
1. helloworld
3. w3c
Comment 4 Aryeh Gregor 2011-09-12 20:28:55 UTC
(In reply to comment #1)
> We didn't like the MS Word behavior because the first backspace makes it look
> like you've added your item to the previous list bullet paragraph (with a hard
> linebreak), but really it's a new paragraph at the same indentation level and
> not part of the list at all. If you indent/center the previous bullet, the line
> below it (which now no longer has a bullet) is not affected. We felt that this
> was unintuitive.

The current spec actually does make it part of the previous list item, usually the same as if you merged the two and then separated them with Shift-Enter or such.

> The two main cases that we cared about were:
> 1) Make it easy to merge the current list item with the previous one (two
> backspaces for non-indented lists). Browsers today make this quite easy
> (usually just a single backspace).

Right.

> 2) Make it easy to remove an item from the list. This is especially import for
> breaking out the last paragraph from a list. Often you'll press enter at the
> end of a list and you'll want an easy way to unlist the new paragraph that you
> just created and start inputting regular text. Browsers don't make this at all
> easy right now.

Let's divide this into two separate use-cases:

2a) Make it easy to break out of the end of a list, when you're at the end of the last item and want to start typing non-list stuff again.  This is pretty easy regardless: just hit Enter twice.  Google Docs provides another way: Enter+Backspace.  Word allows it via Enter+Backspace+Backspace.  Do we need to provide another way to do this, though, or is Enter+Enter enough?

2b) Make it easy to outdent an existing item in a list.  Google Docs behavior makes this easy, and so does Word.  OO, the spec, and browsers make it hard.  But do we really need to make this easy?  Is it a common need?  Is the outdent button not simple enough for users to figure out?

And let's add a third use-case:

3) Make it easy to create a multiline list item.  You can already do this with Shift-Enter, but unsophisticated users are unlikely to figure that out.  The OO/spec behavior provides an additional, discoverable way to do this: Enter+Backspace.  How important is this?

> Sadly we don't have any real usability research on this. We just thought about
> our own usage of content editable, Word and did some hallway usability studies
> of different behaviors and settled on our current one. I don't doubt that
> there's room to improve.

Me neither.
Comment 5 Ehsan Akhgari [:ehsan] 2011-09-12 20:40:06 UTC
(In reply to comment #4)
> > 2) Make it easy to remove an item from the list. This is especially import for
> > breaking out the last paragraph from a list. Often you'll press enter at the
> > end of a list and you'll want an easy way to unlist the new paragraph that you
> > just created and start inputting regular text. Browsers don't make this at all
> > easy right now.
> 
> Let's divide this into two separate use-cases:
> 
> 2a) Make it easy to break out of the end of a list, when you're at the end of
> the last item and want to start typing non-list stuff again.  This is pretty
> easy regardless: just hit Enter twice.  Google Docs provides another way:
> Enter+Backspace.  Word allows it via Enter+Backspace+Backspace.  Do we need to
> provide another way to do this, though, or is Enter+Enter enough?

I think Enter+Enter should be enough.

> 2b) Make it easy to outdent an existing item in a list.  Google Docs behavior
> makes this easy, and so does Word.  OO, the spec, and browsers make it hard. 
> But do we really need to make this easy?  Is it a common need?  Is the outdent
> button not simple enough for users to figure out?

Yes, I believe this is a common need.  If the user has used the indent button to create the list, then they can probably figure out how to use the parallel outdent button.  Otherwise, I don't imagine that they would know about that command.  Backspace should do what they imagine that it would: pushing content "back" by removing the list marker/margin.

> And let's add a third use-case:
> 
> 3) Make it easy to create a multiline list item.  You can already do this with
> Shift-Enter, but unsophisticated users are unlikely to figure that out.  The
> OO/spec behavior provides an additional, discoverable way to do this:
> Enter+Backspace.  How important is this?

I think it's important, since I agree that ordinary users are unlikely to use Shift+Enter.  Basically, Enter and Backspace are the only tools in their toolbox.