Open Bug 1413897 Opened 7 years ago Updated 2 years ago

Make <summary> unselectable by default

Categories

(Core :: Layout, defect, P5)

56 Branch
defect

Tracking

()

People

(Reporter: xfq, Unassigned)

References

()

Details

Attachments

(1 file)

Attached file details.html
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:56.0) Gecko/20100101 Firefox/56.0
Build ID: 20171024165158

Steps to reproduce:

1. Create a <details> element, containing one <summary> element followed by flow content.

2. Click the <summary> element quickly for several times


Actual results:

The text in the <summary> element is selected.


Expected results:

The text in the <summary> element should not be selected.

When expanding/collapsing the <details> element, it's really easy to select the text in the <summary> element accidentally when expanding and collapsing a section quickly (just for a quick short look at the section, for example), which is annoying.

Personally, I'd really like to disable the selection of the <summary> element by default, but I'm also glad to hear other people's comments on this suggestion.
Fwiw, I disagree that making <summary> non-selectable by default is a good idea.
The content inside it is meant to be summary, which is usually more than a word
or two, and thus selecting its content is useful to users.  It seems to me
the intended semantics is more like a "heading" than a "button".

Anyway, this is the wrong forum for discussing changes like this.
You should post your proposal to the whatwg@whatwg.org mailing list
instead.  If there is consensus to change the HTML spec as you suggest
then we'll change our UA sheet accordingly.
https://html.spec.whatwg.org/multipage/rendering.html#the-details-and-summary-elements
Thanks for the hint, Mats!

I'll file an issue on https://github.com/whatwg/html/issues, because it'll be properly tracked and it's the recommended way for discussing spec issues nowadays, I believe.[1]

Footnote(s):

[1] https://github.com/whatwg/whatwg.org/pull/89
Also, in https://html.spec.whatwg.org/multipage/infrastructure.html#renderingUA :

   In particular, even user agents that do implement the suggested default rendering are encouraged to offer settings that override this default to improve the experience for the user, e.g. changing the color contrast, using different focus styles, or otherwise making the experience more accessible and usable to the user.

Although I'm not sure whether adding a (-moz-)user-select bug is considered "override this default" or not.
s/bug//
Just to be clear, the "adding a (-moz-)user-select bug" should be "adding a (-moz-)user-select declaration".
(In reply to Fuqiao Xue [:xfq] from comment #3)
> See https://github.com/whatwg/html/issues/3191

Let's wait the resolution of this issue and see how it goes.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P5
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: